diff options
author | Michael J. Spencer <bigcheesegs@gmail.com> | 2013-01-10 22:40:50 +0000 |
---|---|---|
committer | Michael J. Spencer <bigcheesegs@gmail.com> | 2013-01-10 22:40:50 +0000 |
commit | 27b2b1b4e543992f1988bbda74dabc6bf77c97d4 (patch) | |
tree | 2c5be8ae5925b6862d1a8d9fb4ec4101b6fa9e99 /tools | |
parent | 03de2a621c2f063294eb3f65ea1136f3acac4e98 (diff) | |
download | external_llvm-27b2b1b4e543992f1988bbda74dabc6bf77c97d4.zip external_llvm-27b2b1b4e543992f1988bbda74dabc6bf77c97d4.tar.gz external_llvm-27b2b1b4e543992f1988bbda74dabc6bf77c97d4.tar.bz2 |
[llvm-objdump] Emit addresses with the correct number of leading 0's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172130 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/llvm-objdump/llvm-objdump.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/llvm-objdump/llvm-objdump.cpp b/tools/llvm-objdump/llvm-objdump.cpp index 9958dad..be105d3 100644 --- a/tools/llvm-objdump/llvm-objdump.cpp +++ b/tools/llvm-objdump/llvm-objdump.cpp @@ -442,7 +442,7 @@ static void PrintSectionHeaders(const ObjectFile *o) { if (error(si->isBSS(BSS))) return; std::string Type = (std::string(Text ? "TEXT " : "") + (Data ? "DATA " : "") + (BSS ? "BSS" : "")); - outs() << format("%3d %-13s %09" PRIx64 " %017" PRIx64 " %s\n", + outs() << format("%3d %-13s %08" PRIx64 " %016" PRIx64 " %s\n", i, Name.str().c_str(), Size, Address, Type.c_str()); ++i; } @@ -572,7 +572,10 @@ static void PrintSymbolTable(const ObjectFile *o) { else if (Type == SymbolRef::ST_Function) FileFunc = 'F'; - outs() << format("%08" PRIx64, Address) << " " + const char *Fmt = o->getBytesInAddress() > 4 ? "%016" PRIx64 : + "%08" PRIx64; + + outs() << format(Fmt, Address) << " " << GlobLoc // Local -> 'l', Global -> 'g', Neither -> ' ' << (Weak ? 'w' : ' ') // Weak? << ' ' // Constructor. Not supported yet. |