Is there a downside to using -Bsymbolic-functions?

前端 未结 4 728
被撕碎了的回忆
被撕碎了的回忆 2020-12-24 12:54

I recently discovered the linker option \"-Bsymbolic-functions\" in GNU ld:

-Bsymbolic
  When creating a shared library, bind references to global symbols to         


        
4条回答
  •  生来不讨喜
    2020-12-24 13:35

    building glibc with -Bsymbolic-functions is not recommended neither. Here is the result I got:

    Core was generated by `/home/lano1106/dev/packages/glibc/repos/core-i686/src/glibc-build/elf/ld-linux                                                               .'.
    Program terminated with signal 11, Segmentation fault.
    #0  0x400a3e90 in _int_free ()
       from /home/lano1106/dev/packages/glibc/repos/core-i686/src/glibc-build/libc.so.6
    (gdb) where
    #0  0x400a3e90 in _int_free ()
       from /home/lano1106/dev/packages/glibc/repos/core-i686/src/glibc-build/libc.so.6
    #1  0x4016b94b in __libc_dlsym ()
       from /home/lano1106/dev/packages/glibc/repos/core-i686/src/glibc-build/libc.so.6
    #2  0x4004c2c7 in __gconv_find_shlib ()
       from /home/lano1106/dev/packages/glibc/repos/core-i686/src/glibc-build/libc.so.6
    #3  0x40042320 in find_derivation ()
       from /home/lano1106/dev/packages/glibc/repos/core-i686/src/glibc-build/libc.so.6
    #4  0x40042889 in __gconv_find_transform ()
       from /home/lano1106/dev/packages/glibc/repos/core-i686/src/glibc-build/libc.so.6
    #5  0x400d6f00 in __wcsmbs_load_conv ()
       from /home/lano1106/dev/packages/glibc/repos/core-i686/src/glibc-build/libc.so.6
    #6  0x400c86f6 in mbrtowc ()
       from /home/lano1106/dev/packages/glibc/repos/core-i686/src/glibc-build/libc.so.6
    #7  0x08048914 in ?? ()
    #8  0x00000000 in ?? ()
    

提交回复
热议问题