1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
llvm-mirror/lib/MC
Rafael Espindola 8ccd44da5c 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.

llvm-svn: 204769
2014-03-25 23:44:25 +00:00
..
MCDisassembler [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-08 07:14:16 +00:00
MCParser Remove some dead assignements found by scan-build 2014-03-21 21:54:46 +00:00
CMakeLists.txt Look through variables when computing relocations. 2014-03-20 02:12:01 +00:00
ELFObjectWriter.cpp Create .symtab_shndxr only when needed. 2014-03-25 23:44:25 +00:00
LLVMBuild.txt LLVMBuild: Introduce a common section which currently has a list of the 2011-12-12 22:45:54 +00:00
MachObjectWriter.cpp Darwin: Add assembler directives to create version-min load commands. 2014-03-18 22:09:05 +00:00
Makefile
MCAsmBackend.cpp Simplify a really complicated check for Arch == X86_64. 2014-03-11 21:22:57 +00:00
MCAsmInfo.cpp Move get[S|U]LEB128Size() to LEB128.h. 2014-02-22 14:00:39 +00:00
MCAsmInfoCOFF.cpp Re-commit: Demote EmitRawText call in AsmPrinter::EmitInlineAsm() and remove hasRawTextSupport() call 2014-02-13 14:44:26 +00:00
MCAsmInfoDarwin.cpp Re-commit: Demote EmitRawText call in AsmPrinter::EmitInlineAsm() and remove hasRawTextSupport() call 2014-02-13 14:44:26 +00:00
MCAsmInfoELF.cpp Refactor the setting of PrivateGlobalPrefix. 2013-12-02 23:39:26 +00:00
MCAsmStreamer.cpp remove a bunch of unused private methods 2014-03-23 17:09:26 +00:00
MCAssembler.cpp Darwin: Add assembler directives to create version-min load commands. 2014-03-18 22:09:05 +00:00
MCAtom.cpp [weak vtables] Remove a bunch of weak vtables 2013-11-19 00:57:56 +00:00
MCCodeEmitter.cpp MC: Move target specific fixup info descriptors to TargetAsmBackend instead of 2010-12-16 03:20:06 +00:00
MCCodeGenInfo.cpp Sink codegen optimization level into MCCodeGenInfo along side relocation model 2011-11-16 08:38:26 +00:00
MCContext.cpp MC: don't create a backtrace for diagnostics. 2014-03-14 22:41:58 +00:00
MCDisassembler.cpp Change MCDisassembler::setSymbolizer to take unique_ptr by value. 2014-03-07 09:38:02 +00:00
MCDwarf.cpp Don't use EmitAbsValue with symbol references. 2014-03-20 21:26:38 +00:00
MCELF.cpp [mc] Fix ELF st_other flag. 2013-12-05 00:34:11 +00:00
MCELFObjectTargetWriter.cpp Provide basic type safety for array_pod_sort comparators. 2013-09-22 14:09:50 +00:00
MCELFStreamer.cpp Mark alias symbols as microMIPS if necessary. Differential Revision: http://llvm-reviews.chandlerc.com/D3080 2014-03-20 09:44:49 +00:00
MCExpr.cpp Look through variables when computing relocations. 2014-03-20 02:12:01 +00:00
MCExternalSymbolizer.cpp Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
MCFixup.cpp Add llvm_unreachable after fully-covered switches to appease GCC 2014-03-20 07:30:40 +00:00
MCFunction.cpp Style cleanup following David's review for r188876. 2013-08-21 19:40:25 +00:00
MCInst.cpp Release build: guard dump functions with 2012-09-12 05:06:18 +00:00
MCInstPrinter.cpp [MC] When MCInstPrint::printAnnotation uses a comment stream, it has to ensure 2013-10-01 19:21:24 +00:00
MCInstrAnalysis.cpp MC: Disassembled CFG reconstruction. 2013-05-24 01:07:04 +00:00
MCLabel.cpp Release build: guard dump functions with 2012-09-12 05:06:18 +00:00
MCMachObjectTargetWriter.cpp MC/Mach-O: On second thought, use a custom hook for enabling aggressive 2010-12-17 05:50:29 +00:00
MCMachOStreamer.cpp Darwin: Add assembler directives to create version-min load commands. 2014-03-18 22:09:05 +00:00
MCModule.cpp MC CFG: Split MCBasicBlocks to mirror atom splitting. 2013-08-21 07:28:24 +00:00
MCModuleYAML.cpp Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
MCNullStreamer.cpp DebugInfo: Improve reuse of file table entries in asm debug info 2014-03-17 01:52:11 +00:00
MCObjectDisassembler.cpp [C++11] Introduce ObjectFile::symbols() to use range-based loops. 2014-03-17 07:28:19 +00:00
MCObjectFileInfo.cpp MC: Remove superfluous section attribute flag definitions 2014-03-07 07:36:05 +00:00
MCObjectStreamer.cpp Mark alias symbols as microMIPS if necessary. Differential Revision: http://llvm-reviews.chandlerc.com/D3080 2014-03-20 09:44:49 +00:00
MCObjectSymbolizer.cpp [C++11] Introduce ObjectFile::symbols() to use range-based loops. 2014-03-17 07:28:19 +00:00
MCObjectWriter.cpp Move [SU]LEB128 encoding to a utility header. 2012-08-08 23:56:06 +00:00
MCRegisterInfo.cpp Make SubRegIndex size mandatory, following r183020. 2013-05-31 23:45:26 +00:00
MCRelocationInfo.cpp Re-sort all of the includes with ./utils/sort_includes.py so that 2014-01-07 11:48:04 +00:00
MCSection.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
MCSectionCOFF.cpp MC COFF: Emit the 'b' section flag for .bss sections in GNU assembly 2013-12-17 22:12:40 +00:00
MCSectionELF.cpp Remove AllowQuotesInName and friends from MCAsmInfo. 2013-11-13 14:01:59 +00:00
MCSectionMachO.cpp MC: Appease the buildbots 2014-03-10 01:04:18 +00:00
MCStreamer.cpp Don't use EmitAbsValue with symbol references. 2014-03-20 21:26:38 +00:00
MCSubtargetInfo.cpp Reverting r199886 (Prevent repetitive warnings for unrecognized processors and features) 2014-01-25 16:56:18 +00:00
MCSymbol.cpp Revert "Add back r203962, r204028 and r204059." 2014-03-19 00:13:43 +00:00
MCSymbolizer.cpp Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
MCValue.cpp Release build: guard dump functions with 2012-09-12 05:06:18 +00:00
MCWin64EH.cpp Fix alignment of unwind data. 2013-09-15 18:01:09 +00:00
SubtargetFeature.cpp Reverting r199886 (Prevent repetitive warnings for unrecognized processors and features) 2014-01-25 16:56:18 +00:00
WinCOFFObjectWriter.cpp [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-08 07:02:02 +00:00
WinCOFFStreamer.cpp [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-08 07:02:02 +00:00