Omit unused section symbols from the symbol table.
authorRafael Espindola <rafael.espindola@gmail.com>
Thu, 4 Jun 2015 15:33:30 +0000 (15:33 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Thu, 4 Jun 2015 15:33:30 +0000 (15:33 +0000)
commit9f299abc056749f22fa2f18ce217b1ba5036f0fc
tree858b32968c44967d871b0b345b0754d61af7a6e7
parent800411deea5273e2d2bf0769fd08fb9bb913a80b
Omit unused section symbols from the symbol table.

Section symbols exist as an optimization: instead of having multiple relocations
point to different symbols, many of them can point to a single section symbol.

When that optimization is unused, a section symbol is also unused and adds no
extra information to the object file.

This saves a bit of space on the object files and makes the output of
llvm-objdump -t easier to read and consequently some tests get quite a bit
simpler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239045 91177308-0d34-0410-b5e6-96231b3b80d8
16 files changed:
lib/MC/ELFObjectWriter.cpp
test/MC/ARM/arm-elf-symver.s
test/MC/ELF/alias.s
test/MC/ELF/basic-elf-32.s
test/MC/ELF/basic-elf-64.s
test/MC/ELF/comdat-dup-group-name.s
test/MC/ELF/comdat.s
test/MC/ELF/empty.s
test/MC/ELF/many-sections-2.s
test/MC/ELF/many-sections.s
test/MC/ELF/noexec.s
test/MC/ELF/reloc-same-name-section.s
test/MC/ELF/section-sym.s
test/MC/ELF/symver.s
test/MC/ELF/undef.s
test/MC/ELF/weakref.s