c/7464: weak symbols alias definitions are broken in 3.1.1
casteyde.christian@free.fr
casteyde.christian@free.fr
Thu Aug 1 02:56:00 GMT 2002
>Number: 7464
>Category: c
>Synopsis: weak symbols alias definitions are broken in 3.1.1
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Thu Aug 01 02:56:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: casteyde.christian@free.fr
>Release: gcc 3.1.1
>Organization:
>Environment:
Linux 2.4.18 Glibc 2.2.5
>Description:
Weak alias seems to be rejected where they
were formerly accepted by gcc 3.1.
This prevents compiling glibc 2.2.5
(this PR is a duplicate of 7431, but
the given file was not preprocessed and
I wanted to give a preprocessed one.
Feel free to bind these PRs together),
and hence should certainly be fixed
before gcc 3.2 for 3.x adoption to my mind.
Joined preprocessed source :
>How-To-Repeat:
gcc -c errlist.i
../sysdeps/unix/sysv/linux/errlist.c:41: weak declaration of `_old_sys_nerr' must precede definition
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="errlist.i"
Content-Disposition: inline; filename="errlist.i"
# 1 "../sysdeps/unix/sysv/linux/errlist.c"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "../include/libc-symbols.h" 1
# 54 "../include/libc-symbols.h"
# 1 "/mnt/src/libojbs/config.h" 1
# 55 "../include/libc-symbols.h" 2
# 2 "<command line>" 2
# 1 "../sysdeps/unix/sysv/linux/errlist.c"
# 19 "../sysdeps/unix/sysv/linux/errlist.c"
# 1 "../sysdeps/unix/sysv/linux/sizes.h" 1
# 20 "../sysdeps/unix/sysv/linux/errlist.c" 2
# 1 "../sysdeps/unix/sysv/linux/errlist.h" 1
# 21 "../sysdeps/unix/sysv/linux/errlist.c" 2
# 1 "../include/shlib-compat.h" 1
# 26 "../include/shlib-compat.h"
# 1 "/mnt/src/libojbs/abi-versions.h" 1
# 27 "../include/shlib-compat.h" 2
# 22 "../sysdeps/unix/sysv/linux/errlist.c" 2
asm (".data\n\t.globl __old_sys_errlist\n__old_sys_errlist:");
# 1 "../sysdeps/gnu/errlist.c" 1
# 1 "../include/errno.h" 1
# 29 "../include/errno.h"
# 1 "../include/features.h" 1
# 283 "../include/features.h"
# 1 "../include/sys/cdefs.h" 1
# 1 "../misc/sys/cdefs.h" 1
# 2 "../include/sys/cdefs.h" 2
# 284 "../include/features.h" 2
# 30 "../include/errno.h" 2
# 1 "../sysdeps/unix/sysv/linux/bits/errno.h" 1
# 25 "../sysdeps/unix/sysv/linux/bits/errno.h"
# 1 "/usr/include/linux/errno.h" 1 3
# 1 "/usr/include/asm/errno.h" 1 3
# 5 "/usr/include/linux/errno.h" 2 3
# 26 "../sysdeps/unix/sysv/linux/bits/errno.h" 2
# 36 "../sysdeps/unix/sysv/linux/bits/errno.h"
extern int errno;
extern int *__errno_location (void) __attribute__ ((__const__));
# 37 "../include/errno.h" 2
# 55 "../include/errno.h"
extern char *program_invocation_name, *program_invocation_short_name;
# 69 "../include/errno.h"
typedef int error_t;
# 4 "../sysdeps/gnu/errlist.c" 2
# 1 "../include/libintl.h" 1
# 1 "../intl/libintl.h" 1
# 30 "../intl/libintl.h"
extern char *gettext (__const char *__msgid) ;
extern char *dgettext (__const char *__domainname, __const char *__msgid)
;
extern char *__dgettext (__const char *__domainname, __const char *__msgid)
__attribute__ ((__format_arg__ (2)));
extern char *dcgettext (__const char *__domainname,
__const char *__msgid, int __category) ;
extern char *__dcgettext (__const char *__domainname,
__const char *__msgid, int __category)
__attribute__ ((__format_arg__ (2)));
extern char *ngettext (__const char *__msgid1, __const char *__msgid2,
unsigned long int __n)
__attribute__ ((__format_arg__ (1))) __attribute__ ((__format_arg__ (2)));
extern char *dngettext (__const char *__domainname, __const char *__msgid1,
__const char *__msgid2, unsigned long int __n)
__attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3)));
extern char *dcngettext (__const char *__domainname, __const char *__msgid1,
__const char *__msgid2, unsigned long int __n,
int __category)
__attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3)));
extern char *textdomain (__const char *__domainname) ;
extern char *bindtextdomain (__const char *__domainname,
__const char *__dirname) ;
extern char *bind_textdomain_codeset (__const char *__domainname,
__const char *__codeset) ;
# 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.1.1/include/stddef.h" 1 3
# 95 "../intl/libintl.h" 2
# 1 "../include/locale.h" 1
# 1 "../locale/locale.h" 1
# 29 "../locale/locale.h"
# 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.1.1/include/stddef.h" 1 3
# 30 "../locale/locale.h" 2
# 1 "../include/bits/locale.h" 1
# 1 "../locale/bits/locale.h" 1
# 27 "../locale/bits/locale.h"
enum
{
__LC_CTYPE = 0,
__LC_NUMERIC = 1,
__LC_TIME = 2,
__LC_COLLATE = 3,
__LC_MONETARY = 4,
__LC_MESSAGES = 5,
__LC_ALL = 6,
__LC_PAPER = 7,
__LC_NAME = 8,
__LC_ADDRESS = 9,
__LC_TELEPHONE = 10,
__LC_MEASUREMENT = 11,
__LC_IDENTIFICATION = 12
};
# 2 "../include/bits/locale.h" 2
# 31 "../locale/locale.h" 2
# 52 "../locale/locale.h"
struct lconv
{
char *decimal_point;
char *thousands_sep;
char *grouping;
char *int_curr_symbol;
char *currency_symbol;
char *mon_decimal_point;
char *mon_thousands_sep;
char *mon_grouping;
char *positive_sign;
char *negative_sign;
char int_frac_digits;
char frac_digits;
char p_cs_precedes;
char p_sep_by_space;
char n_cs_precedes;
char n_sep_by_space;
char p_sign_posn;
char n_sign_posn;
char int_p_cs_precedes;
char int_p_sep_by_space;
char int_n_cs_precedes;
char int_n_sep_by_space;
char int_p_sign_posn;
char int_n_sign_posn;
# 119 "../locale/locale.h"
};
extern char *setlocale (int __category, __const char *__locale) ;
extern struct lconv *localeconv (void) ;
# 141 "../locale/locale.h"
# 1 "../include/xlocale.h" 1
# 1 "../locale/xlocale.h" 1
# 28 "../locale/xlocale.h"
typedef struct __locale_struct
{
struct locale_data *__locales[13];
const unsigned short int *__ctype_b;
const int *__ctype_tolower;
const int *__ctype_toupper;
} *__locale_t;
# 2 "../include/xlocale.h" 2
# 142 "../locale/locale.h" 2
extern __locale_t __newlocale (int __category_mask, __const char *__locale,
__locale_t __base) ;
extern __locale_t __duplocale (__locale_t __dataset) ;
extern void __freelocale (__locale_t __dataset) ;
# 3 "../include/locale.h" 2
extern struct __locale_struct _nl_C_locobj;
extern struct lconv *__localeconv (void);
# 98 "../intl/libintl.h" 2
# 115 "../intl/libintl.h"
# 3 "../include/libintl.h" 2
extern char *__gettext (__const char *__msgid);
extern char *__dgettext (__const char *__domainname,
__const char *__msgid);
extern char *__dcgettext (__const char *__domainname,
__const char *__msgid, int __category);
extern char *__textdomain (__const char *__domainname);
extern char *__bindtextdomain (__const char *__domainname,
__const char *__dirname);
extern char *__bind_textdomain_codeset (__const char *__domainname,
__const char *__codeset);
extern const char _libc_intl_domainname[];
# 5 "../sysdeps/gnu/errlist.c" 2
# 18 "../sysdeps/gnu/errlist.c"
const char *const __new_sys_errlist[] =
{
[0] = "Success",
[1] = "Operation not permitted",
[2] = "No such file or directory",
[3] = "No such process",
# 48 "../sysdeps/gnu/errlist.c"
[4] = "Interrupted system call",
[5] = "Input/output error",
# 62 "../sysdeps/gnu/errlist.c"
[6] = "No such device or address",
[7] = "Argument list too long",
[8] = "Exec format error",
[9] = "Bad file descriptor",
[10] = "No child processes",
[35] = "Resource deadlock avoided",
[12] = "Cannot allocate memory",
[13] = "Permission denied",
[14] = "Bad address",
[15] = "Block device required",
[16] = "Device or resource busy",
[17] = "File exists",
[18] = "Invalid cross-device link",
[19] = "No such device",
[20] = "Not a directory",
[21] = "Is a directory",
[22] = "Invalid argument",
# 176 "../sysdeps/gnu/errlist.c"
[24] = "Too many open files",
[23] = "Too many open files in system",
[25] = "Inappropriate ioctl for device",
# 198 "../sysdeps/gnu/errlist.c"
[26] = "Text file busy",
[27] = "File too large",
[28] = "No space left on device",
[29] = "Illegal seek",
[30] = "Read-only file system",
[31] = "Too many links",
# 235 "../sysdeps/gnu/errlist.c"
[32] = "Broken pipe",
[33] = "Numerical argument out of domain",
[34] = "Numerical result out of range",
# 280 "../sysdeps/gnu/errlist.c"
[11] = "Resource temporarily unavailable",
# 301 "../sysdeps/gnu/errlist.c"
[115] = "Operation now in progress",
[114] = "Operation already in progress",
[88] = "Socket operation on non-socket",
[90] = "Message too long",
[91] = "Protocol wrong type for socket",
[92] = "Protocol not available",
[93] = "Protocol not supported",
[94] = "Socket type not supported",
# 351 "../sysdeps/gnu/errlist.c"
[95] = "Operation not supported",
[96] = "Protocol family not supported",
[97] = "Address family not supported by protocol",
[98] = "Address already in use",
[99] = "Cannot assign requested address",
[100] = "Network is down",
[101] = "Network is unreachable",
[102] = "Network dropped connection on reset",
[103] = "Software caused connection abort",
[104] = "Connection reset by peer",
[105] = "No buffer space available",
[106] = "Transport endpoint is already connected",
[107] = "Transport endpoint is not connected",
[89] = "Destination address required",
[108] = "Cannot send after transport endpoint shutdown",
[109] = "Too many references: cannot splice",
[110] = "Connection timed out",
[111] = "Connection refused",
[40] = "Too many levels of symbolic links",
[36] = "File name too long",
[112] = "Host is down",
[113] = "No route to host",
[39] = "Directory not empty",
# 494 "../sysdeps/gnu/errlist.c"
[87] = "Too many users",
[122] = "Disk quota exceeded",
[116] = "Stale NFS file handle",
[66] = "Object is remote",
# 548 "../sysdeps/gnu/errlist.c"
[37] = "No locks available",
# 576 "../sysdeps/gnu/errlist.c"
[38] = "Function not implemented",
# 598 "../sysdeps/gnu/errlist.c"
[84] = "Invalid or incomplete multibyte or wide character",
# 641 "../sysdeps/gnu/errlist.c"
[74] = "Bad message",
[43] = "Identifier removed",
[72] = "Multihop attempted",
[61] = "No data available",
[67] = "Link has been severed",
[42] = "No message of desired type",
[63] = "Out of streams resources",
[60] = "Device not a stream",
[75] = "Value too large for defined data type",
[71] = "Protocol error",
[62] = "Timer expired",
[85] = "Interrupted system call should be restarted",
[44] = "Channel number out of range",
[45] = "Level 2 not synchronized",
[46] = "Level 3 halted",
[47] = "Level 3 reset",
[48] = "Link number out of range",
[49] = "Protocol driver not attached",
[50] = "No CSI structure available",
[51] = "Level 2 halted",
[52] = "Invalid exchange",
[53] = "Invalid request descriptor",
[54] = "Exchange full",
[55] = "No anode",
[56] = "Invalid request code",
[57] = "Invalid slot",
[59] = "Bad font file format",
[64] = "Machine is not on the network",
[65] = "Package not installed",
[68] = "Advertise error",
[69] = "Srmount error",
[70] = "Communication error on send",
[73] = "RFS specific error",
[76] = "Name not unique on network",
[77] = "File descriptor in bad state",
[78] = "Remote address changed",
[79] = "Can not access a needed shared library",
[80] = "Accessing a corrupted shared library",
[81] = ".lib section in a.out corrupted",
[82] = "Attempting to link in too many shared libraries",
[83] = "Cannot exec a shared library directly",
[86] = "Streams pipe error",
[117] = "Structure needs cleaning",
[118] = "Not a XENIX named type file",
[119] = "No XENIX semaphores available",
[120] = "Is a named type file",
[121] = "Remote I/O error",
[123] = "No medium found",
[124] = "Wrong medium type",
};
const int __new_sys_nerr = sizeof __new_sys_errlist / sizeof __new_sys_errlist [0];
# 31 "../sysdeps/unix/sysv/linux/errlist.c" 2
asm (".type __old_sys_errlist,@object\n\t.size __old_sys_errlist,"
"123" "*" "4");
extern const char *const *__old_sys_errlist;
const int __old_sys_nerr = 123;
extern __typeof (__old_sys_nerr) _old_sys_nerr __attribute__ ((alias ("__old_sys_nerr")));;
extern __typeof (__old_sys_nerr) _old_sys_nerr __attribute__ ((weak, alias ("__old_sys_nerr")));
__asm__ (".symver " "__old_sys_nerr" "," "_sys_nerr" "@" "GLIBC_2.0");
__asm__ (".symver " "_old_sys_nerr" "," "sys_nerr" "@" "GLIBC_2.0");
extern __typeof (__old_sys_errlist) _old_sys_errlist __attribute__ ((weak, alias ("__old_sys_errlist")));;
__asm__ (".symver " "__old_sys_errlist" "," "_sys_errlist" "@" "GLIBC_2.0");
__asm__ (".symver " "_old_sys_errlist" "," "sys_errlist" "@" "GLIBC_2.0");
extern __typeof (__new_sys_nerr) _new_sys_nerr __attribute__ ((alias ("__new_sys_nerr")));
__asm__ (".symver " "__new_sys_nerr" "," "_sys_nerr" "@@" "GLIBC_2.1");
__asm__ (".symver " "_new_sys_nerr" "," "sys_nerr" "@@" "GLIBC_2.1");
extern __typeof (__new_sys_errlist) _new_sys_errlist __attribute__ ((alias ("__new_sys_errlist")));
__asm__ (".symver " "__new_sys_errlist" "," "_sys_errlist" "@@" "GLIBC_2.1");
__asm__ (".symver " "_new_sys_errlist" "," "sys_errlist" "@@" "GLIBC_2.1");
More information about the Gcc-bugs
mailing list