llvm-mirror/lib/MC
Rafael Espindola f20f8d830f Change how we handle section symbols on ELF.
On ELF every section can have a corresponding section symbol. When in
an assembly file we have

.quad .text

the '.text' refers to that symbol.

The way we used to handle them is to leave .text an undefined symbol
until the very end when the object writer would map them to the
actual section symbol.

The problem with that is that anything before the end would see an
undefined symbol. This could result in bad diagnostics
(test/MC/AArch64/label-arithmetic-diags-elf.s), or incorrect results
when using the asm streamer (est/MC/Mips/expansion-jal-sym-pic.s).

Fixing this will also allow using the section symbol earlier for
setting sh_link of SHF_METADATA sections.

This patch includes a few hacks to avoid changing our behaviour when
handling conflicts between section symbols and other symbols. I
reported pr31850 to track that.

llvm-svn: 293936
2017-02-02 21:26:06 +00:00
..
MCDisassembler Use StringRef instead of raw pointers in MCAsmInfo/MCInstrInfo APIs (NFC) 2016-10-01 06:46:33 +00:00
MCParser Change how we handle section symbols on ELF. 2017-02-02 21:26:06 +00:00
CMakeLists.txt Revert r283690, "MC: Remove unused entities." 2016-10-10 22:49:37 +00:00
ConstantPools.cpp Fix 24560: assembler does not share constant pool for same constants 2016-11-04 19:17:32 +00:00
ELFObjectWriter.cpp Change how we handle section symbols on ELF. 2017-02-02 21:26:06 +00:00
LLVMBuild.txt Nuke MCAnalysis. 2014-09-02 22:32:20 +00:00
MachObjectWriter.cpp Fix Clang-tidy readability-redundant-string-cstr warnings 2016-11-02 16:43:50 +00:00
MCAsmBackend.cpp [mips][ias] Support .dtprel[d]word and .tprel[d]word directives 2016-08-22 16:18:42 +00:00
MCAsmInfo.cpp [MC] Delete use of *structors_used. 2016-08-08 03:30:01 +00:00
MCAsmInfoCOFF.cpp [MC] Use LShr for constant evaluation of ">>" on non-arm64 darwin. 2015-11-11 00:51:36 +00:00
MCAsmInfoDarwin.cpp [MC] Delete use of *structors_used. 2016-08-08 03:30:01 +00:00
MCAsmInfoELF.cpp [WebAssembly] Don't create a needless .note.GNU-stack section 2016-01-15 23:59:13 +00:00
MCAsmStreamer.cpp Only print architecture dependent flags for that architecture. 2017-01-30 15:38:43 +00:00
MCAssembler.cpp MC: Introduce the ABS8 symbol modifier. 2017-01-31 18:28:44 +00:00
MCCodeEmitter.cpp
MCCodeView.cpp [CodeView] Fix off-by-one error in def range gap emission 2017-01-24 16:57:55 +00:00
MCContext.cpp Change how we handle section symbols on ELF. 2017-02-02 21:26:06 +00:00
MCDwarf.cpp Speculatively revert r289925, see PR31407 2016-12-16 14:02:28 +00:00
MCELFObjectTargetWriter.cpp Always sort by offset first. NFC. 2015-12-17 15:08:24 +00:00
MCELFStreamer.cpp Change how we handle section symbols on ELF. 2017-02-02 21:26:06 +00:00
MCExpr.cpp MC: Introduce the ABS8 symbol modifier. 2017-01-31 18:28:44 +00:00
MCFragment.cpp Cleanup dump() functions. 2017-01-28 02:02:38 +00:00
MCInst.cpp Cleanup dump() functions. 2017-01-28 02:02:38 +00:00
MCInstPrinter.cpp [llvm] Parameterizing the output stream for dumpbytes and outputting directly to stream. 2015-05-28 18:39:50 +00:00
MCInstrAnalysis.cpp
MCInstrDesc.cpp Replace uint16_t with the MCPhysReg typedef in many places. A lot of physical register arrays already use this typedef. 2015-12-05 07:13:35 +00:00
MCLabel.cpp Cleanup dump() functions. 2017-01-28 02:02:38 +00:00
MCLinkerOptimizationHint.cpp Apply clang-tidy's modernize-loop-convert to lib/MC. 2016-06-26 14:49:00 +00:00
MCMachObjectTargetWriter.cpp MC: Remove obsolete MachO UseAggressiveSymbolFolding. 2015-06-04 20:27:42 +00:00
MCMachOStreamer.cpp MCMacho: Allow __thread_ptr section after dwarf sections 2017-02-01 01:31:36 +00:00
MCNullStreamer.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
MCObjectFileInfo.cpp Change how we handle section symbols on ELF. 2017-02-02 21:26:06 +00:00
MCObjectStreamer.cpp [Assembler] Better error messages for .org directive 2016-12-14 10:43:58 +00:00
MCObjectWriter.cpp Fix pr24486. 2015-10-05 12:07:05 +00:00
MCRegisterInfo.cpp Extract LaneBitmask into a separate type 2016-12-15 14:36:06 +00:00
MCSchedule.cpp Add <type_traits> for is_pod, fixing r241947 2015-07-10 22:17:49 +00:00
MCSection.cpp Cleanup dump() functions. 2017-01-28 02:02:38 +00:00
MCSectionCOFF.cpp Only print architecture dependent flags for that architecture. 2017-01-30 15:38:43 +00:00
MCSectionELF.cpp Only print architecture dependent flags for that architecture. 2017-01-30 15:38:43 +00:00
MCSectionMachO.cpp Fix the GCC build. 2017-01-30 19:05:09 +00:00
MCStreamer.cpp Reapply "[CodeGen] Fix invalid DWARF info on Win64" 2017-01-02 03:00:19 +00:00
MCSubtargetInfo.cpp (NFC) Change SubtargetFeatures::ToggleFeature and 2016-01-05 10:25:56 +00:00
MCSymbol.cpp Cleanup dump() functions. 2017-01-28 02:02:38 +00:00
MCSymbolELF.cpp Change how we handle section symbols on ELF. 2017-02-02 21:26:06 +00:00
MCTargetOptions.cpp Summary: Currently there is no way to disable deprecated warning from asm like this 2016-12-05 23:55:13 +00:00
MCValue.cpp Cleanup dump() functions. 2017-01-28 02:02:38 +00:00
MCWin64EH.cpp [MC] Create unique .pdata sections for every .text section 2016-05-02 23:22:18 +00:00
MCWinEH.cpp Revert r283690, "MC: Remove unused entities." 2016-10-10 22:49:37 +00:00
StringTableBuilder.cpp [ADT] Move CachedHashString to its own header in ADT, and rename to CachedHashStringRef. 2016-10-17 22:24:36 +00:00
SubtargetFeature.cpp Cleanup dump() functions. 2017-01-28 02:02:38 +00:00
WinCOFFObjectWriter.cpp Fix comment typos. NFC. 2016-11-20 13:47:59 +00:00
WinCOFFStreamer.cpp Reapply "[CodeGen] Fix invalid DWARF info on Win64" 2017-01-02 03:00:19 +00:00