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
llc
lli [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-08 08:27:28 +00:00
llvm-ar
llvm-as
llvm-bcanalyzer
llvm-c-test
llvm-config
llvm-cov
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
llvm-jitlistener
llvm-link
llvm-lto
llvm-mc Remove llvm-mc's disable-cfi option. 2014-03-20 21:48:20 +00:00
llvm-mcmarkup
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
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
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
Makefile