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.
This commit is contained in:
joerg 2012-02-27 12:26:21 +00:00
parent 6e07f2d4dc
commit f46fb1259f
8 changed files with 21 additions and 20 deletions

View File

@ -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)

View File

@ -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

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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