llvm-project/llvm/lib/MC/MCParser
Rafael Espindola 13a79bbfe5 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
..
AsmLexer.cpp Add a comment consumer mechanism to MCAsmLexer 2016-12-08 10:31:21 +00:00
AsmParser.cpp Change how we handle section symbols on ELF. 2017-02-02 21:26:06 +00:00
CMakeLists.txt Fix header path in CMake. NFC. 2015-06-19 20:49:02 +00:00
COFFAsmParser.cpp Reapply "[CodeGen] Fix invalid DWARF info on Win64" 2017-01-02 03:00:19 +00:00
DarwinAsmParser.cpp Fix Clang-tidy readability-redundant-string-cstr warnings 2016-11-02 16:43:50 +00:00
ELFAsmParser.cpp Move more code to helper functions. NFC. 2017-01-31 23:26:32 +00:00
LLVMBuild.txt
MCAsmLexer.cpp Add a comment consumer mechanism to MCAsmLexer 2016-12-08 10:31:21 +00:00
MCAsmParser.cpp Cleanup dump() functions. 2017-01-28 02:02:38 +00:00
MCAsmParserExtension.cpp
MCTargetAsmParser.cpp Move MCTargetAsmParser.h to llvm/MC/MCParser where it belongs. 2016-01-27 10:01:28 +00:00