http://sourceware.org/bugzilla/show_bug.cgi?id=13311

--- Comment #3 from Octoploid <cryptooctoploid at gmail dot com> 2011-10-18 
07:27:49 UTC ---
(In reply to comment #2)
> Can you try applying the first hunk (ie. the elf_link_output_extsym change)
> from the patch in http://sourceware.org/ml/binutils/2011-10/msg00123.html?

Yes, this hunk fixes the error.

Another thing that caught me eye are the undefined references to libc libraries
with bfd and --as-needed:

 # make
gcc -fuse-linker-plugin -Wl,--as-needed,--gc-sections  luac.o liblua.so.5.1.4
/tmp/ccwugZXD.ltrans0.ltrans.o: In function `combine.2469.2460':
ccwugZXD.ltrans0.o:(.text+0x461): undefined reference to `luaF_newproto'
ccwugZXD.ltrans0.o:(.text+0x4ba): undefined reference to `luaD_growstack'
ccwugZXD.ltrans0.o:(.text+0x4e6): undefined reference to `luaS_newlstr'
ccwugZXD.ltrans0.o:(.text+0x52d): undefined reference to `luaM_realloc_'
ccwugZXD.ltrans0.o:(.text+0x53b): undefined reference to `luaM_toobig'
ccwugZXD.ltrans0.o:(.text+0x579): undefined reference to `luaM_realloc_'
ccwugZXD.ltrans0.o:(.text+0x587): undefined reference to `luaM_toobig'
/tmp/ccwugZXD.ltrans0.ltrans.o: In function `pmain.2456.2241':
ccwugZXD.ltrans0.o:(.text+0x7e0): undefined reference to `luaU_print'
ccwugZXD.ltrans0.o:(.text+0x857): undefined reference to `luaU_dump'
liblua.so.5.1.4: undefined reference to `floor@GLIBC_2.2.5'
liblua.so.5.1.4: undefined reference to `ceil@GLIBC_2.2.5'
liblua.so.5.1.4: undefined reference to `sinh@GLIBC_2.2.5'
liblua.so.5.1.4: undefined reference to `atan@GLIBC_2.2.5'
liblua.so.5.1.4: undefined reference to `tan@GLIBC_2.2.5'
liblua.so.5.1.4: undefined reference to `dlopen@GLIBC_2.2.5'
liblua.so.5.1.4: undefined reference to `dlerror@GLIBC_2.2.5'
liblua.so.5.1.4: undefined reference to `sqrt@GLIBC_2.2.5'
liblua.so.5.1.4: undefined reference to `cosh@GLIBC_2.2.5'
liblua.so.5.1.4: undefined reference to `fmod@GLIBC_2.2.5'
liblua.so.5.1.4: undefined reference to `log10@GLIBC_2.2.5'
liblua.so.5.1.4: undefined reference to `sin@GLIBC_2.2.5'
liblua.so.5.1.4: undefined reference to `dlclose@GLIBC_2.2.5'
liblua.so.5.1.4: undefined reference to `cos@GLIBC_2.2.5'
liblua.so.5.1.4: undefined reference to `atan2@GLIBC_2.2.5'
liblua.so.5.1.4: undefined reference to `acos@GLIBC_2.2.5'
liblua.so.5.1.4: undefined reference to `tanh@GLIBC_2.2.5'
liblua.so.5.1.4: undefined reference to `exp@GLIBC_2.2.5'
liblua.so.5.1.4: undefined reference to `log@GLIBC_2.2.5'
liblua.so.5.1.4: undefined reference to `dlsym@GLIBC_2.2.5'
liblua.so.5.1.4: undefined reference to `asin@GLIBC_2.2.5'
liblua.so.5.1.4: undefined reference to `pow@GLIBC_2.2.5'
collect2: error: ld returned 1 exit status
make: *** [all] Error 1

gold:
 # make
gcc -fuse-linker-plugin -Wl,--as-needed,--gc-sections  luac.o liblua.so.5.1.4
/tmp/ccG7JVZB.ltrans0.ltrans.o:ccG7JVZB.ltrans0.o:function combine.2469.2460:
error: undefined reference to 'luaF_newproto'
/tmp/ccG7JVZB.ltrans0.ltrans.o:ccG7JVZB.ltrans0.o:function combine.2469.2460:
error: undefined reference to 'luaD_growstack'
/tmp/ccG7JVZB.ltrans0.ltrans.o:ccG7JVZB.ltrans0.o:function combine.2469.2460:
error: undefined reference to 'luaS_newlstr'
/tmp/ccG7JVZB.ltrans0.ltrans.o:ccG7JVZB.ltrans0.o:function combine.2469.2460:
error: undefined reference to 'luaM_realloc_'
/tmp/ccG7JVZB.ltrans0.ltrans.o:ccG7JVZB.ltrans0.o:function combine.2469.2460:
error: undefined reference to 'luaM_toobig'
/tmp/ccG7JVZB.ltrans0.ltrans.o:ccG7JVZB.ltrans0.o:function combine.2469.2460:
error: undefined reference to 'luaM_realloc_'
/tmp/ccG7JVZB.ltrans0.ltrans.o:ccG7JVZB.ltrans0.o:function combine.2469.2460:
error: undefined reference to 'luaM_toobig'
/tmp/ccG7JVZB.ltrans0.ltrans.o:ccG7JVZB.ltrans0.o:function pmain.2456.2241:
error: undefined reference to 'luaU_print'
/tmp/ccG7JVZB.ltrans0.ltrans.o:ccG7JVZB.ltrans0.o:function pmain.2456.2241:
error: undefined reference to 'luaU_dump'
collect2: error: ld returned 1 exit status
make: *** [all] Error 1

But maybe this is harmless in this case, because the link fails anyway.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to