freebsd-skq/contrib/llvm/tools
dim 8fe1b0abe6 Pull in r345002 from upstream lld trunk:
Don't mess up RelIplt symbols during relocatable processing

  Summary:
  During upgrading of the FreeBSD source tree with lld 7.0.0, I noticed
  that it started complaining about crt1.o having an "index past the
  end of the symbol table".

  Such a symbol table looks approximately like this, viewed with
  readelf -s (note the Ndx field being messed up):

  Symbol table '.symtab' contains 4 entries:
     Num:    Value  Size Type    Bind   Vis      Ndx Name
       0: 00000000     0 NOTYPE  LOCAL  DEFAULT  UND
       1: 00000000     0 SECTION LOCAL  DEFAULT    1
       2: 00000000     0 NOTYPE  WEAK   HIDDEN  RSV[0xffff] __rel_iplt_end
       3: 00000000     0 NOTYPE  WEAK   HIDDEN  RSV[0xffff] __rel_iplt_start

  At first, it seemed that recent ifunc relocation work had caused this:
  <https://reviews.freebsd.org/rS339351>, but it turned out that it was
  due to incorrect processing of the object files by lld, when using -r
  (a.k.a. --relocatable).

  Bisecting showed that rL324421 ("Convert a use of Config->Static") was
  the commit where this new behavior began.  Simply reverting it solved
  the issue, and the __rel_iplt symbols had an index of UND again.

  Looking at Rafael's commit message, I think he simply missed the
  possibility of --relocatable being in effect, so I have added an
  additional check for it.

  I also added a simple regression test case.

  Reviewers: grimar, ruiu, emaste, espindola

  Reviewed By: ruiu

  Subscribers: arichardson, krytarowski, llvm-commits

  Differential Revision: https://reviews.llvm.org/D53515

This fixes a problem in lld where it places incorrect indexes for ifunc
related symbols in crt1.o and friends, making it impossible to link most
normal programs with it.
2018-10-23 20:56:59 +00:00
..
bugpoint Merge llvm trunk r338150, and resolve conflicts. 2018-07-30 16:33:32 +00:00
clang Merge llvm, clang, lld, lldb, compiler-rt and libc++ 7.0.0 release 2018-09-17 19:04:15 +00:00
llc Merge llvm trunk r338150, and resolve conflicts. 2018-07-30 16:33:32 +00:00
lld Pull in r345002 from upstream lld trunk: 2018-10-23 20:56:59 +00:00
lldb Merge llvm, clang, lld, lldb, compiler-rt and libc++ release_70 branch 2018-08-11 16:40:03 +00:00
lli Merge llvm trunk r338150, and resolve conflicts. 2018-07-30 16:33:32 +00:00
llvm-ar Merge llvm release_70 branch r338892, and resolve conflicts. 2018-08-04 13:25:25 +00:00
llvm-as Merge llvm trunk r338150, and resolve conflicts. 2018-07-30 16:33:32 +00:00
llvm-bcanalyzer Merge llvm trunk r338150, and resolve conflicts. 2018-07-30 16:33:32 +00:00
llvm-cov Merge llvm trunk r338150, and resolve conflicts. 2018-07-30 16:33:32 +00:00
llvm-cxxdump Merge llvm trunk r338150, and resolve conflicts. 2018-07-30 16:33:32 +00:00
llvm-cxxfilt Merge llvm trunk r338150, and resolve conflicts. 2018-07-30 16:33:32 +00:00
llvm-diff Merge llvm trunk r338150, and resolve conflicts. 2018-07-30 16:33:32 +00:00
llvm-dis Merge llvm trunk r338150, and resolve conflicts. 2018-07-30 16:33:32 +00:00
llvm-dwarfdump Merge llvm trunk r338150, and resolve conflicts. 2018-07-30 16:33:32 +00:00
llvm-extract Merge llvm trunk r338150, and resolve conflicts. 2018-07-30 16:33:32 +00:00
llvm-link Merge llvm trunk r338150, and resolve conflicts. 2018-07-30 16:33:32 +00:00
llvm-lto Merge llvm trunk r338150, and resolve conflicts. 2018-07-30 16:33:32 +00:00
llvm-lto2 Merge llvm trunk r338150, and resolve conflicts. 2018-07-30 16:33:32 +00:00
llvm-mc Merge llvm trunk r338150, and resolve conflicts. 2018-07-30 16:33:32 +00:00
llvm-mca Merge llvm trunk r338150 (just before the 7.0.0 branch point), and 2018-08-02 17:42:12 +00:00
llvm-modextract Merge llvm trunk r338150, and resolve conflicts. 2018-07-30 16:33:32 +00:00
llvm-nm Merge llvm trunk r338150, and resolve conflicts. 2018-07-30 16:33:32 +00:00
llvm-objcopy Merge llvm trunk r338150 (just before the 7.0.0 branch point), and 2018-08-02 17:42:12 +00:00
llvm-objdump Merge llvm trunk r338150, and resolve conflicts. 2018-07-30 16:33:32 +00:00
llvm-pdbutil Merge llvm trunk r338150 (just before the 7.0.0 branch point), and 2018-08-02 17:42:12 +00:00
llvm-profdata Merge llvm trunk r338150, and resolve conflicts. 2018-07-30 16:33:32 +00:00
llvm-readobj Merge llvm trunk r338150, and resolve conflicts. 2018-07-30 16:33:32 +00:00
llvm-rtdyld Merge llvm trunk r338150, and resolve conflicts. 2018-07-30 16:33:32 +00:00
llvm-stress Merge llvm trunk r321017 to contrib/llvm. 2017-12-20 14:16:56 +00:00
llvm-symbolizer Merge llvm trunk r338150, and resolve conflicts. 2018-07-30 16:33:32 +00:00
llvm-xray Merge llvm trunk r338150, and resolve conflicts. 2018-07-30 16:33:32 +00:00
opt Merge llvm trunk r338150, and resolve conflicts. 2018-07-30 16:33:32 +00:00