This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gold internal error related to sys_errlist


I've worked around the previous problem and I've run into a new problem. This one might be my own fault, because I'm trying to link a static library for which I don't have the source code. The old linker doesn't complain, though. The error I get is:

ld: internal error in override_version, at ../../binutils-20080630/gold/resolve.cc:60

and debugging reveals the symbol in question is sys_errlist, which is undefined in my static library:
$ readelf -sW [object from static library] | grep sys_errlist
14: 00000000 0 NOTYPE GLOBAL DEFAULT UND sys_errlist
and defined in libc:
$ readelf -sW /lib/libc.so.6 | grep sys_errlist
168: 001358e0 500 OBJECT GLOBAL DEFAULT 15 _sys_errlist@@GLIBC_2.1
556: 001358e0 492 OBJECT WEAK DEFAULT 15 sys_errlist@GLIBC_2.0
1467: 001358e0 500 OBJECT GLOBAL DEFAULT 15 sys_errlist@@GLIBC_2.1
1674: 001358e0 492 OBJECT GLOBAL DEFAULT 15 _sys_errlist@GLIBC_2.0


You can generate reproduce the error with the following program:
test.c:
---------
   extern int sys_errlist;
   int main() { int x = sys_errlist; return 0; }
---------
$ gcc test.c
or by running gold directly:
$ ld test.o -lc

I'm running this on the same RedHat 7.2 system as before.

Eric


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]