summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object/COFFObjectFile.cpp
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2019-08-19 14:30:12 +0000
committerFangrui Song <maskray@google.com>2019-08-19 14:30:12 +0000
commitac0e6c6502f0bf2456cab6671b4a40c999781438 (patch)
tree654e6c260a9fa9fa7ba03a742041efc1877b9631 /llvm/lib/Object/COFFObjectFile.cpp
parent0776da5236e032d8b2419f56ceff990a668c7d89 (diff)
downloadbcm5719-llvm-ac0e6c6502f0bf2456cab6671b4a40c999781438.tar.gz
bcm5719-llvm-ac0e6c6502f0bf2456cab6671b4a40c999781438.zip
[ELF] Move (copy relocation/canonical PLT) before error checking
In processRelocAux(), we handle errors before copy relocation/canonical PLT. This makes error checking a bit complex because we have to check for conditions that will be allowed by copy relocation/canonical PLT. Instead, move copy relocation/canonical PLT before error checking. This simplifies the previous clumsy error checking code `config->shared || (config->pie && expr == R_ABS && type != target->symbolicRel)` to the simple `config->isPic`. Some diagnostics can be reported in different ways. The code motion changes diagnostics for some contrived test cases: * copy-rel-pie-error.s -> copy-rel-pie2.s: It was rejected before but accepted now. ld.bfd also accepts the case. * copy-errors.s: "cannot preempt symbol" changes to "symbol 'bar' has no type" * got32{,x}-i386.s: the suggestion changes from "-fPIC or -Wl,-z,notext" to "-fPIE" * x86-64-dyn-rel-error5.s: one diagnostic changes for -pie case Reviewed By: peter.smith Differential Revision: https://reviews.llvm.org/D66007 llvm-svn: 369262
Diffstat (limited to 'llvm/lib/Object/COFFObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud