[PATCH] D27158: Use relocations to fill statically known got entries

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 28 05:55:12 PST 2016


peter.smith added a comment.

I think the approach looks good.

One possible problem is that we have missed out on the possibilities that other architectures will need these relocations. For example in aarch64 it is possible to generate got slot generating relocations that would be resolved statically in some cases:

  extern int foo __attribute__((weak));
  
  int _start(void)
  {
      return foo;
  }

clang --target=aarch64-linux-gnu -c foo.c
ld.lld foo.o -o foo.axf
bin/ld.lld: error: unrecognized reloc 1025

I think it could be prudent to add the R*_GLOB_DAT to the other targets as well.

I'll merge in my downstream changes for static TLS in ARM and run it past some additional tests, will let you know if I find anything.


https://reviews.llvm.org/D27158





More information about the llvm-commits mailing list