[PATCH] D64327: [ELF] Loose condition for relocation with a symbol

Nikola Prica via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 8 05:57:55 PDT 2019


NikolaPrica created this revision.
NikolaPrica added reviewers: arsenm, maskray0.
Herald added subscribers: atanasyan, MaskRay, kristof.beyls, arichardson, javed.absar, aprantl, wdng, sdardis, emaste.
Herald added a reviewer: espindola.

Deleted code was introduced as a work around for a bug in the gold linker (http://sourceware.org/PR16794). Test case that was given as a reason for this part of code, the one on previous link, now works for the gold.
This condition is too strict and when a code is compiled with debug info it forces generation of numerous relocations with symbol for architectures that do not have relocation addend. This was discovered with older version of the compiler and with this patch 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).


https://reviews.llvm.org/D64327

Files:
  lib/MC/ELFObjectWriter.cpp
  test/MC/ELF/basic-elf-32.s
  test/MC/ELF/compression.s
  test/MC/ELF/relocation-386.s
  test/MC/Mips/elf-relsym.s
  test/MC/Mips/xgot.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64327.208371.patch
Type: text/x-patch
Size: 3488 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190708/56589075/attachment.bin>


More information about the llvm-commits mailing list