[all-commits] [llvm/llvm-project] b49766: Reland D64327 [MC][ELF] Allow STT_SECTION referenc...

Fangrui Song via All-commits all-commits at lists.llvm.org
Sun Aug 2 18:06:41 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: b497665d98ad5026b1d3d67d5793a28fefe27bea
      https://github.com/llvm/llvm-project/commit/b497665d98ad5026b1d3d67d5793a28fefe27bea
  Author: Fangrui Song <i at maskray.me>
  Date:   2020-08-02 (Sun, 02 Aug 2020)

  Changed paths:
    M llvm/cmake/modules/AddLLVM.cmake
    M llvm/lib/MC/ELFObjectWriter.cpp
    M llvm/test/MC/ELF/basic-elf-32.s
    M llvm/test/MC/ELF/compression.s
    M llvm/test/MC/ELF/relocation-386.s
    M llvm/test/MC/Mips/elf-relsym.s
    M llvm/test/MC/Mips/xgot.s

  Log Message:
  -----------
  Reland D64327 [MC][ELF] Allow STT_SECTION referencing SHF_MERGE on REL targets

This drops a GNU gold workaround and reverts the revert commit rL366708.

  Before binutils 2.34, gold -O2 and above did not correctly handle R_386_GOTOFF to
  SHF_MERGE|SHF_STRINGS sections: https://sourceware.org/bugzilla/show_bug.cgi?id=16794

>From the original review:

  ... it reduced the size of a big ARM-32 debug image by 33%. It contained ~68M
  of relocations symbols out of total ~71M symbols (96% of symbols table was
  generated for relocations with symbol).

-Wl,-O2 (and -Wl,-O3) is so rare that we should just lower the
optimization level for LLVM_LINKER_IS_GOLD rather than pessimizing all users.




More information about the All-commits mailing list