mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-27 14:24:40 +00:00
Correctly handle references to section symbols.
When processing assembly like .long .text we were creating a new undefined symbol .text. GAS on the other hand would handle that as a reference to the .text section. This patch implements that by creating the section symbols earlier so that they are visible during asm parsing. The patch also updates llvm-readobj to print the symbol number in the relocation dump so that the test can differentiate between two sections with the same name. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219829 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -676,7 +676,8 @@ void ELFDumper<ELFT>::printRelocation(const Elf_Shdr *Sec,
|
||||
DictScope Group(W, "Relocation");
|
||||
W.printHex("Offset", Rel.r_offset);
|
||||
W.printNumber("Type", RelocName, (int)Rel.getType(Obj->isMips64EL()));
|
||||
W.printString("Symbol", SymbolName.size() > 0 ? SymbolName : "-");
|
||||
W.printNumber("Symbol", SymbolName.size() > 0 ? SymbolName : "-",
|
||||
Rel.getSymbol(Obj->isMips64EL()));
|
||||
W.printHex("Addend", Rel.r_addend);
|
||||
} else {
|
||||
raw_ostream& OS = W.startLine();
|
||||
|
Reference in New Issue
Block a user