[PATCH] D18166: Add _GLOBAL_OFFSET_TABLE_ symbol to shared libraries

Ed Maste via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 14 18:01:11 PDT 2016

emaste added a comment.

This does fix libcxxabi build / testrun for me.

Note that linking with gnu ld leaves a local absolute symbol for _GLOBAL_OFFSET_TABLE_ in libc++abi.so:

  % nm build-nodebug/lib/libc++abi.so | grep 'GLOBAL_OFFSET'      
  00000000002592e0 a _GLOBAL_OFFSET_TABLE_

While with this patch lld produces none:

  % nm build-lld-selfhost2/lib/libc++abi.so | grep 'GLOBAL_OFFSET'

but I don't know that it matters.


More information about the llvm-commits mailing list