Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc Make __cerror protected to restore ABI leak in olde...



details:   https://anonhg.NetBSD.org/src/rev/68a685ae5a20
branches:  trunk
changeset: 777639:68a685ae5a20
user:      joerg <joerg%NetBSD.org@localhost>
date:      Mon Feb 27 12:26:21 2012 +0000

description:
Make __cerror protected to restore ABI leak in older libc versions,
where e.g. librt referenced the copy from libc. This still allows libc
to use PC-relative jumps.

diffstat:

 lib/libc/arch/arm/sys/cerror.S       |  4 ++--
 lib/libc/arch/i386/sys/cerror.S      |  6 +++---
 lib/libc/arch/mips/sys/cerror.S      |  8 ++++----
 lib/libc/arch/powerpc/sys/cerror.S   |  6 +++---
 lib/libc/arch/powerpc64/sys/cerror.S |  4 ++--
 lib/libc/arch/vax/SYS.h              |  4 ++--
 lib/libc/arch/x86_64/sys/cerror.S    |  6 +++---
 lib/libc/shlib_version               |  3 ++-
 8 files changed, 21 insertions(+), 20 deletions(-)

diffs (168 lines):

diff -r e300b1212c3d -r 68a685ae5a20 lib/libc/arch/arm/sys/cerror.S
--- a/lib/libc/arch/arm/sys/cerror.S    Mon Feb 27 04:25:12 2012 +0000
+++ b/lib/libc/arch/arm/sys/cerror.S    Mon Feb 27 12:26:21 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cerror.S,v 1.7 2011/01/14 06:12:17 matt Exp $  */
+/*     $NetBSD: cerror.S,v 1.8 2012/02/27 12:26:21 joerg Exp $ */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -34,7 +34,7 @@
 #include "SYS.h"
 
 #ifdef PIC
-       .hidden CERROR
+       .protected      CERROR
 #endif
 
 ASENTRY(CERROR)
diff -r e300b1212c3d -r 68a685ae5a20 lib/libc/arch/i386/sys/cerror.S
--- a/lib/libc/arch/i386/sys/cerror.S   Mon Feb 27 04:25:12 2012 +0000
+++ b/lib/libc/arch/i386/sys/cerror.S   Mon Feb 27 12:26:21 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cerror.S,v 1.15 2011/11/18 20:21:41 joerg Exp $        */
+/*     $NetBSD: cerror.S,v 1.16 2012/02/27 12:26:21 joerg Exp $        */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -36,13 +36,13 @@
 
 #include <machine/asm.h>
 #if defined(SYSLIBC_SCCS) && !defined(lint)
-       RCSID("$NetBSD: cerror.S,v 1.15 2011/11/18 20:21:41 joerg Exp $")
+       RCSID("$NetBSD: cerror.S,v 1.16 2012/02/27 12:26:21 joerg Exp $")
 #endif /* SYSLIBC_SCCS and not lint */
 
 #include "SYS.h"
 
        .globl  _C_LABEL(__errno)
-       .hidden CERROR
+       .protected      CERROR
 
 _ENTRY(CERROR)
        pushl   %eax
diff -r e300b1212c3d -r 68a685ae5a20 lib/libc/arch/mips/sys/cerror.S
--- a/lib/libc/arch/mips/sys/cerror.S   Mon Feb 27 04:25:12 2012 +0000
+++ b/lib/libc/arch/mips/sys/cerror.S   Mon Feb 27 12:26:21 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cerror.S,v 1.16 2011/01/17 23:34:44 matt Exp $ */
+/*     $NetBSD: cerror.S,v 1.17 2012/02/27 12:26:21 joerg Exp $        */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -38,13 +38,13 @@
 #if 0
        RCSID("from: @(#)cerror.s       8.1 (Berkeley) 6/16/93")
 #else
-       RCSID("$NetBSD: cerror.S,v 1.16 2011/01/17 23:34:44 matt Exp $")
+       RCSID("$NetBSD: cerror.S,v 1.17 2012/02/27 12:26:21 joerg Exp $")
 #endif
 #endif /* LIBC_SCCS and not lint */
 
 #ifdef PIC
-       .hidden __cerror
-#endif
+       .protected      __cerror
+i#endif
 
 #ifdef _REENTRANT
        .globl  _C_LABEL(__errno)
diff -r e300b1212c3d -r 68a685ae5a20 lib/libc/arch/powerpc/sys/cerror.S
--- a/lib/libc/arch/powerpc/sys/cerror.S        Mon Feb 27 04:25:12 2012 +0000
+++ b/lib/libc/arch/powerpc/sys/cerror.S        Mon Feb 27 12:26:21 2012 +0000
@@ -1,17 +1,17 @@
-/*     $NetBSD: cerror.S,v 1.8 2011/01/16 02:43:10 matt Exp $  */
+/*     $NetBSD: cerror.S,v 1.9 2012/02/27 12:26:21 joerg Exp $ */
 
 #include "SYS.h"
 #include "assym.h"
 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: cerror.S,v 1.8 2011/01/16 02:43:10 matt Exp $")
+__RCSID("$NetBSD: cerror.S,v 1.9 2012/02/27 12:26:21 joerg Exp $")
 #endif /* LIBC_SCCS && !lint */
 
 #ifndef _REENTRANT
        .globl  _C_LABEL(errno)
 #endif
 #ifdef PIC
-       .hidden _C_LABEL(__cerror)
+       .protected      CERROR
 #endif
 
 ENTRY(__cerror)
diff -r e300b1212c3d -r 68a685ae5a20 lib/libc/arch/powerpc64/sys/cerror.S
--- a/lib/libc/arch/powerpc64/sys/cerror.S      Mon Feb 27 04:25:12 2012 +0000
+++ b/lib/libc/arch/powerpc64/sys/cerror.S      Mon Feb 27 12:26:21 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cerror.S,v 1.2 2011/10/29 16:03:03 christos Exp $      */
+/*     $NetBSD: cerror.S,v 1.3 2012/02/27 12:26:21 joerg Exp $ */
 
 #include <machine/asm.h>
 #include "SYS.h"
@@ -7,7 +7,7 @@
        .globl  _C_LABEL(errno)
 #endif
 #ifdef PIC
-       .hidden _C_LABEL(__cerror)
+       .protected      CERROR
 #endif
 
 ENTRY(__cerror)
diff -r e300b1212c3d -r 68a685ae5a20 lib/libc/arch/vax/SYS.h
--- a/lib/libc/arch/vax/SYS.h   Mon Feb 27 04:25:12 2012 +0000
+++ b/lib/libc/arch/vax/SYS.h   Mon Feb 27 12:26:21 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: SYS.h,v 1.11 2011/01/25 02:38:15 matt Exp $ */
+/*     $NetBSD: SYS.h,v 1.12 2012/02/27 12:26:21 joerg Exp $ */
 /*
  * Copyright (c) 1983, 1993
  *     The Regents of the University of California.  All rights reserved.
@@ -85,5 +85,5 @@
 
 #define        ASMSTR          .asciz
 
-       .hidden CERROR
+       .protected      CERROR
        .globl  CERROR
diff -r e300b1212c3d -r 68a685ae5a20 lib/libc/arch/x86_64/sys/cerror.S
--- a/lib/libc/arch/x86_64/sys/cerror.S Mon Feb 27 04:25:12 2012 +0000
+++ b/lib/libc/arch/x86_64/sys/cerror.S Mon Feb 27 12:26:21 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cerror.S,v 1.4 2011/11/18 20:17:46 joerg Exp $ */
+/*     $NetBSD: cerror.S,v 1.5 2012/02/27 12:26:21 joerg Exp $ */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -36,13 +36,13 @@
 
 #include <machine/asm.h>
 #if defined(SYSLIBC_SCCS) && !defined(lint)
-       RCSID("$NetBSD: cerror.S,v 1.4 2011/11/18 20:17:46 joerg Exp $")
+       RCSID("$NetBSD: cerror.S,v 1.5 2012/02/27 12:26:21 joerg Exp $")
 #endif /* SYSLIBC_SCCS and not lint */
 
 #include "SYS.h"
 
        .globl  _C_LABEL(__errno)
-       .hidden CERROR
+       .protected      CERROR
 
 _ENTRY(CERROR)
        pushq   %r12
diff -r e300b1212c3d -r 68a685ae5a20 lib/libc/shlib_version
--- a/lib/libc/shlib_version    Mon Feb 27 04:25:12 2012 +0000
+++ b/lib/libc/shlib_version    Mon Feb 27 12:26:21 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: shlib_version,v 1.229 2012/02/24 16:06:39 dholland Exp $
+#      $NetBSD: shlib_version,v 1.230 2012/02/27 12:26:21 joerg Exp $
 #      Remember to update distrib/sets/lists/base/shl.* when changing
 #
 # things we wish to do on next major version bump:
@@ -29,5 +29,6 @@
 #   it's insufficient bitwidth to implement all ctype class.
 #   see isblank's comment in ctype.h.
 # - remove gets(); it is finally dead in c11.
+# - make __cerror (spelled CERROR) hidden again
 major=12
 minor=182



Home | Main Index | Thread Index | Old Index