Hello all, I was trying to define aliases for some functions in an ld script and ld aborts in the above function. The command line and output is:
$ ld -o dparse dparse_objs.lds -lc /usr/lib/libc.so:6: unresolvable symbol `puts' referenced in expression /usr/lib/libc.so:6: unresolvable symbol `puts' referenced in expression ld: warning: cannot find entry symbol _start; defaulting to 000000000804817c /home/sukru/dparse/src/../obj/_func_main_1.o: In function `_llf_func_main_1': _func_main_1.c:(.text+0x9d): undefined reference to `_xlfputs' ld: BFD (GNU Binutils for Ubuntu) 2.18.93.20081009 internal error, aborting at ../../bfd/elflink.c line 8573 in elf_link_output_extsym ld: Please report this bug. The version of ld is: $ ld -v GNU ld (GNU Binutils for Ubuntu) 2.18.93.20081009 My host: $ uname -a Linux sukru-laptop 2.6.27-17-generic #1 SMP Fri Mar 12 03:09:00 UTC 2010 i686 GNU/Linux I'm running Ubuntu 8.10. Here is the contents of the linker script: EXTERN(_llf_func_main_1); EXTERN(puts); _func_main_1 = _llf_func_main_1; _xlfputs = puts; cx_main = _llf_func_main_1; INPUT(_func_main_1.o); This only occurs if I link with the shared library libc.so. It doesn't happen when I link with the static library. In the script, _llf_func_main_1 is defined in the _func_main_1.o file. I have tried putting INPUT(-lc); before the EXTERN commands to no avail. I also tried to do the same thing using command line options -u and --defsym, but the same thing happens. -- Summary: ld aborts in elf_link_output_extsym when given EXTERN() symbol in script. Product: binutils Version: unspecified Status: NEW Severity: normal Priority: P2 Component: ld AssignedTo: unassigned at sources dot redhat dot com ReportedBy: cinarus at yahoo dot com CC: bug-binutils at gnu dot org GCC build triplet: i486-linux-gnu GCC host triplet: i486-linux-gnu GCC target triplet: i486-linux-gnu http://sourceware.org/bugzilla/show_bug.cgi?id=11583 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils