llvm-6502/tools
Rafael Espindola 81c66bcc13 Create .symtab_shndxr only when needed.
We need .symtab_shndxr if and only if a symbol references a section with an
index >= 0xff00.

The old code was trying to figure out if the section was needed ahead of time,
making it a fairly dependent on the code actually writing the table. It was
also somewhat conservative and would create the section in cases where it was
not needed.

If I remember correctly, the old structure was there so that the sections were
created in the same order gas creates them. That was valuable when MC's support
for ELF was new and we tested with elf-dump.py.

This patch refactors the symbol table creation to another class and makes it
obvious that .symtab_shndxr is really only created when we are about to output
a reference to a section index >= 0xff00.

While here, also improve the tests to use macros. One file is one section
short of needing .symtab_shndxr, the second one has just the right number.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204769 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-25 23:44:25 +00:00
..
bugpoint Fix a bug introduced during the transition to PathV2. 2014-03-14 15:13:35 +00:00
bugpoint-passes [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-08 08:27:28 +00:00
gold Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
llc Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
lli [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-08 08:27:28 +00:00
llvm-ar Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
llvm-as Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
llvm-bcanalyzer Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
llvm-c-test Use -std=gnu99 in tools/llvm-c-test/CMakeLists.txt 2014-01-08 11:48:19 +00:00
llvm-config Don't emit a blank line when running llvm-config --system-libs. 2014-03-03 15:06:14 +00:00
llvm-cov Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
llvm-diff [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-08 08:27:28 +00:00
llvm-dis [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-08 08:27:28 +00:00
llvm-dwarfdump DebugInfo: Support debug_loc under fission 2014-03-25 01:44:02 +00:00
llvm-extract Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
llvm-jitlistener Support: split object format out of environment 2014-03-06 20:47:11 +00:00
llvm-link Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
llvm-lto Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
llvm-mc Remove llvm-mc's disable-cfi option. 2014-03-20 21:48:20 +00:00
llvm-mcmarkup Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
llvm-nm Object: Provide a richer means of describing auxiliary symbols 2014-03-19 04:47:47 +00:00
llvm-objdump llvm-objdump output hex to match binutils' objdump 2014-03-20 22:55:15 +00:00
llvm-profdata llvm-profdata: Check for bad data in the show command 2014-03-23 20:55:53 +00:00
llvm-readobj Create .symtab_shndxr only when needed. 2014-03-25 23:44:25 +00:00
llvm-rtdyld [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-08 08:27:28 +00:00
llvm-shlib Add patch level to llvm version in CMake and Autoconf 2014-03-03 15:22:00 +00:00
llvm-size [C++11] Use ObjectFile::sections() in commandline llvm tools 2014-03-13 14:37:36 +00:00
llvm-stress [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-08 08:27:28 +00:00
llvm-symbolizer [C++11] Introduce ObjectFile::symbols() to use range-based loops. 2014-03-17 07:28:19 +00:00
lto Centralize the handling of install_name and rpath. 2014-02-28 13:48:03 +00:00
macho-dump Darwin: Add assembler directives to create version-min load commands. 2014-03-18 22:09:05 +00:00
msbuild VS integration installer: set SUCCESS=1 if we find VS 2013 2014-03-24 17:33:22 +00:00
obj2yaml Object: Output .file symbols properly 2014-03-20 06:29:02 +00:00
opt static link polly into tools 2014-03-14 04:04:14 +00:00
yaml2obj Object: Provide a richer means of describing auxiliary symbols 2014-03-19 04:47:47 +00:00
CMakeLists.txt static link polly into tools 2014-03-14 04:04:14 +00:00
LLVMBuild.txt PGO: llvm-profdata: tool for merging profiles 2014-02-17 23:22:49 +00:00
Makefile PGO: llvm-profdata: tool for merging profiles 2014-02-17 23:22:49 +00:00