llvm.org GIT mirror llvm / 88fa664
[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 Colin LeMahieu 5 years ago
3 changed file(s) with 14 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
0 // RUN: llvm-objdump -t %p/Inputs/common-symbol-elf | FileCheck %s
1
2 CHECK: 00000400 g *COM* 00000008 common_symbol
641641 bool Global = Flags & SymbolRef::SF_Global;
642642 bool Weak = Flags & SymbolRef::SF_Weak;
643643 bool Absolute = Flags & SymbolRef::SF_Absolute;
644
644 bool Common = Flags & SymbolRef::SF_Common;
645
646 if (Common) {
647 uint32_t Alignment;
648 if (error(Symbol.getAlignment(Alignment)))
649 Alignment = 0;
650 Address = Size;
651 Size = Alignment;
652 }
645653 if (Address == UnknownAddressOrSize)
646654 Address = 0;
647655 if (Size == UnknownAddressOrSize)
671679 << ' ';
672680 if (Absolute) {
673681 outs() << "*ABS*";
682 } else if (Common) {
683 outs() << "*COM*";
674684 } else if (Section == o->section_end()) {
675685 outs() << "*UND*";
676686 } else {