------- Additional Comments From michael at weiser dot dinsnail dot net 2005-11-13 18:01 ------- Created an attachment (id=757) --> (http://sourceware.org/bugzilla/attachment.cgi?id=757&action=view) attempt to extend optional symbol support to shared libraries
Hi Nick, using the above test case I tracked down the place in elflink.c where the symbol os is reported as undefined when localed in a shared library. The attached patch hacks elflink.c to check for STO_OPTIONAL in h->other. This makes the test case work with both native IRIX and Mac OS X cross binutils: [EMAIL PROTECTED] ot2]$ make bu /home/michael/binutils-2.16.1/build/ld/ld-new -melf64bmip -rpath `pwd` -L`pwd` -o ot-noopt-bu /usr/lib64/mips4/crt1.o otm.o /usr/lib64/mips4/crtn.o -lot -lc /home/michael/binutils-2.16.1/build/ld/ld-new -melf64bmip -rpath `pwd` -L`pwd` -o otw-noopt-bu /usr/lib64/mips4/crt1.o otm.o /usr/lib64/mips4/crtn.o -lot -lc [ -x ot-opt-bu ] && ./ot-opt-bu *** Error code 73 (bu21) (ignored) [ -x ot-noopt-bu ] && ./ot-noopt-bu *** Error code 255 (bu21) (ignored) [ -x otw-opt-bu ] && ./otw-opt-bu *** Error code 73 (bu21) (ignored) [ -x otw-noopt-bu ] && ./otw-noopt-bu *** Error code 255 (bu21) (ignored) I'm not sure what other consequences just ignoring STO_OPTIONAL symbols in elflink.c has. And certainly the patch ignores all internal APIs regarding callbacks and format/platform abstraction. But it seems to be a step towards making it work [tm]. ;) Hope you have some more time to look into this. -- http://sourceware.org/bugzilla/show_bug.cgi?id=1150 ------- 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