mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 04:33:05 +00:00
[Objdump] Output information about common symbols in a way closer to GNU objdump.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226932 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ae597a058a
commit
88fa664c1b
BIN
test/tools/llvm-objdump/Inputs/common-symbol-elf
Normal file
BIN
test/tools/llvm-objdump/Inputs/common-symbol-elf
Normal file
Binary file not shown.
3
test/tools/llvm-objdump/common-symbol-elf.test
Normal file
3
test/tools/llvm-objdump/common-symbol-elf.test
Normal file
@ -0,0 +1,3 @@
|
||||
// RUN: llvm-objdump -t %p/Inputs/common-symbol-elf | FileCheck %s
|
||||
|
||||
CHECK: 00000400 g *COM* 00000008 common_symbol
|
@ -642,7 +642,15 @@ void llvm::PrintSymbolTable(const ObjectFile *o) {
|
||||
bool Global = Flags & SymbolRef::SF_Global;
|
||||
bool Weak = Flags & SymbolRef::SF_Weak;
|
||||
bool Absolute = Flags & SymbolRef::SF_Absolute;
|
||||
bool Common = Flags & SymbolRef::SF_Common;
|
||||
|
||||
if (Common) {
|
||||
uint32_t Alignment;
|
||||
if (error(Symbol.getAlignment(Alignment)))
|
||||
Alignment = 0;
|
||||
Address = Size;
|
||||
Size = Alignment;
|
||||
}
|
||||
if (Address == UnknownAddressOrSize)
|
||||
Address = 0;
|
||||
if (Size == UnknownAddressOrSize)
|
||||
@ -672,6 +680,8 @@ void llvm::PrintSymbolTable(const ObjectFile *o) {
|
||||
<< ' ';
|
||||
if (Absolute) {
|
||||
outs() << "*ABS*";
|
||||
} else if (Common) {
|
||||
outs() << "*COM*";
|
||||
} else if (Section == o->section_end()) {
|
||||
outs() << "*UND*";
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user