[PATCH] D37837: Keep some relocations with undefined weak symbols
Rafael Ávila de Espíndola via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 13 17:22:06 PDT 2017
rafael created this revision.
Herald added a subscriber: emaste.
This is pr34301.
As the bug points out, we want to keep some relocations with undefined weak symbols. This means that we cannot always claim that these symbols are not preemptible as we do now.
Unfortunately, we cannot also just always claim that they are preemptible. Doing so would, for example, cause us to try to create a plt entry when we don't even have a dynamic symbol table.
What almost works is to say that weak undefined symbols are preemptible if and only if we have a dynamic symbol table. Almost because we don't want to fail the build trying to create a copy relocation to a weak undefined.
https://reviews.llvm.org/D37837
Files:
ELF/Config.h
ELF/Driver.cpp
ELF/Relocations.cpp
ELF/Symbols.cpp
ELF/Writer.cpp
test/ELF/no-inhibit-exec.s
test/ELF/pie-weak.s
test/ELF/relocation-relative-weak.s
test/ELF/weak-undef-export.s
test/ELF/weak-undef-val.s
test/ELF/weak-undef.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37837.115141.patch
Type: text/x-patch
Size: 6273 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170914/b0aaefd7/attachment.bin>
More information about the llvm-commits
mailing list