1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00
llvm-mirror/lib/MC
George Rimar 1e9101d9d7 [llvm-objcopy] - Fix a st_name of the first symbol table entry.
Spec says about the first symbol table entry that index 0 both designates the first entry in the table
and serves as the undefined symbol index. It should have zero value.
Hence the first symbol table entry has no name. And so has to have a st_name == 0.
(http://refspecs.linuxbase.org/elf/gabi4+/ch4.symtab.html)

Currently, we do not emit zero value for the first symbol table entry.
That happens because we add empty strings to the string builder, which
for each such case adds a zero byte:
(https://github.com/llvm-mirror/llvm/blob/master/lib/MC/StringTableBuilder.cpp#L185)
After the string optimization performed it might return non zero indexes for the
empty string requested.

The patch fixes this issue for the case above and other sections with no names.

Differential revision: https://reviews.llvm.org/D59496

llvm-svn: 356739
2019-03-22 10:28:56 +00:00
..
MCDisassembler Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCParser [WebAssembly] Target features section 2019-03-20 20:26:45 +00:00
CMakeLists.txt Revert BTF commit series. 2018-10-12 19:41:05 +00:00
ConstantPools.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ELFObjectWriter.cpp [MC] Teach ELFObjectWriter that parse-time variables do not appear in 2019-03-04 19:12:56 +00:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MachObjectWriter.cpp [MC][MachO] Emit an error for emitting relocations of the form -SYM + cst 2019-03-06 18:10:41 +00:00
MCAsmBackend.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCAsmInfo.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCAsmInfoCOFF.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCAsmInfoDarwin.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCAsmInfoELF.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCAsmInfoWasm.cpp [WebAssembly] Add symbol flag to the binary format llvm.used 2019-02-07 01:24:44 +00:00
MCAsmMacro.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCAsmStreamer.cpp [AsmPrinter] Remove hidden flag -print-schedule. 2019-02-04 12:51:26 +00:00
MCAssembler.cpp [RISCV] Insert R_RISCV_ALIGN relocation type and Nops for code alignment when linker relaxation enabled 2019-01-30 11:16:59 +00:00
MCCodeEmitter.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCCodePadder.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCCodeView.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCContext.cpp Add XCOFF triple object format type for AIX 2019-03-12 22:01:10 +00:00
MCDwarf.cpp [MC] Sort FDEs by the associated CIE before emitting them. 2019-03-14 23:08:19 +00:00
MCELFObjectTargetWriter.cpp MC/ELF: Allow targets to set ABI version 2019-02-14 22:42:09 +00:00
MCELFStreamer.cpp [MC] Teach the MachO object writer about N_FUNC_COLD 2019-01-25 18:30:22 +00:00
MCExpr.cpp [WebAssembly] Remove unneeded MCSymbolRefExpr variants 2019-02-22 22:29:34 +00:00
MCFragment.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCInst.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCInstPrinter.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCInstrAnalysis.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCInstrDesc.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCLabel.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCLinkerOptimizationHint.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCMachObjectTargetWriter.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCMachOStreamer.cpp [MC] Teach the MachO object writer about N_FUNC_COLD 2019-01-25 18:30:22 +00:00
MCNullStreamer.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCObjectFileInfo.cpp Add XCOFF triple object format type for AIX 2019-03-12 22:01:10 +00:00
MCObjectStreamer.cpp [AsmPrinter] Remove hidden flag -print-schedule. 2019-02-04 12:51:26 +00:00
MCObjectWriter.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCRegisterInfo.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCSchedule.cpp [MC][X86] Correctly model additional operand latency caused by transfer delays from the integer to the floating point unit. 2019-01-23 16:35:07 +00:00
MCSection.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCSectionCOFF.cpp [MC] Clean up unused inline function and non-anchor defaulted destructors; NFCI 2019-02-09 02:11:51 +00:00
MCSectionELF.cpp [MC] Clean up unused inline function and non-anchor defaulted destructors; NFCI 2019-02-09 02:11:51 +00:00
MCSectionMachO.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCSectionWasm.cpp [WebAssembly] Update MC for bulk memory 2019-02-19 22:56:19 +00:00
MCStreamer.cpp [DebugInfo] Introduce DW_OP_LLVM_convert 2019-03-19 13:16:28 +00:00
MCSubtargetInfo.cpp [Subtarget] Merge ProcSched and ProcDesc arrays in MCSubtargetInfo into a single array. 2019-03-05 18:54:38 +00:00
MCSymbol.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCSymbolELF.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCTargetOptions.cpp Remove ASan asm instrumentation. 2019-03-11 21:50:10 +00:00
MCValue.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCWasmObjectTargetWriter.cpp [WebAssembly] clang-tidy (NFC) 2019-02-04 19:13:39 +00:00
MCWasmStreamer.cpp [WebAssembly] Add symbol flag to the binary format llvm.used 2019-02-07 01:24:44 +00:00
MCWin64EH.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCWinCOFFStreamer.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCWinEH.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
StringTableBuilder.cpp [llvm-objcopy] - Fix a st_name of the first symbol table entry. 2019-03-22 10:28:56 +00:00
SubtargetFeature.cpp [Subtarget] Move SubtargetFeatureKV/SubtargetInfoKV from SubtargetFeature.h to MCSubtargetInfo.h. Move all code that operates on ProcFeatures and ProcDesc arrays to MCSubtargetInfo. 2019-03-05 18:54:30 +00:00
WasmObjectWriter.cpp [WebAssembly] Target features section 2019-03-20 20:26:45 +00:00
WinCOFFObjectWriter.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00