[PATCH] D38553: Handle undefined weak hidden symbols on all architectures

Rafael Ávila de Espíndola via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 4 11:14:02 PDT 2017


rafael created this revision.
Herald added subscribers: kristof.beyls, aemerson.

We were handling the non-hidden case in lib/Target/TargetMachine.cpp, but the hidden case was handled in architecture dependent code and only X86_64 and AArch64 were covered.

While it is true that some code sequences in some ABIs might be able to produce the correct value at runtime, that doesn't seem to be the common case.

I left the AArch64 code in place since it also forces a got access for non-pic code. It is not clear if that is needed, but it is probably better to change that in another commit.


https://reviews.llvm.org/D38553

Files:
  lib/Target/TargetMachine.cpp
  lib/Target/X86/X86Subtarget.cpp
  test/CodeGen/X86/global-access-pie-copyrelocs.ll
  test/CodeGen/X86/weak-undef.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38553.117702.patch
Type: text/x-patch
Size: 4011 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171004/bc74a5b9/attachment.bin>


More information about the llvm-commits mailing list