[lld] r293685 - Print alignment in decimal instead of hexadecimal.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 31 12:42:36 PST 2017
Author: ruiu
Date: Tue Jan 31 14:42:34 2017
New Revision: 293685
URL: http://llvm.org/viewvc/llvm-project?rev=293685&view=rev
Log:
Print alignment in decimal instead of hexadecimal.
Previously, we were printing out something like this for
sections/symbols with alignment 16
0000000000201000 0000000000000182 10 .data
which I think confusing. I think printing it in decimal is better.
Differential Revision: https://reviews.llvm.org/D29258
Modified:
lld/trunk/COFF/MapFile.cpp
lld/trunk/ELF/MapFile.cpp
lld/trunk/test/COFF/lldmap.test
lld/trunk/test/ELF/map-file.s
Modified: lld/trunk/COFF/MapFile.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/MapFile.cpp?rev=293685&r1=293684&r2=293685&view=diff
==============================================================================
--- lld/trunk/COFF/MapFile.cpp (original)
+++ lld/trunk/COFF/MapFile.cpp Tue Jan 31 14:42:34 2017
@@ -36,7 +36,7 @@ using namespace lld::coff;
static void writeOutSecLine(raw_fd_ostream &OS, uint64_t Address, uint64_t Size,
uint64_t Align, StringRef Name) {
- OS << format("%08llx %08llx %5llx ", Address, Size, Align)
+ OS << format("%08llx %08llx %5lld ", Address, Size, Align)
<< left_justify(Name, 7);
}
Modified: lld/trunk/ELF/MapFile.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/MapFile.cpp?rev=293685&r1=293684&r2=293685&view=diff
==============================================================================
--- lld/trunk/ELF/MapFile.cpp (original)
+++ lld/trunk/ELF/MapFile.cpp Tue Jan 31 14:42:34 2017
@@ -35,7 +35,7 @@ using namespace lld::elf;
static void writeOutSecLine(raw_fd_ostream &OS, int Width, uint64_t Address,
uint64_t Size, uint64_t Align, StringRef Name) {
- OS << format("%0*llx %0*llx %5llx ", Width, Address, Width, Size, Align)
+ OS << format("%0*llx %0*llx %5lld ", Width, Address, Width, Size, Align)
<< left_justify(Name, 7);
}
Modified: lld/trunk/test/COFF/lldmap.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/lldmap.test?rev=293685&r1=293684&r2=293685&view=diff
==============================================================================
--- lld/trunk/test/COFF/lldmap.test (original)
+++ lld/trunk/test/COFF/lldmap.test Tue Jan 31 14:42:34 2017
@@ -5,7 +5,7 @@
# RUN: FileCheck %s < %T/bar.map
# CHECK: Address Size Align Out In File Symbol
-# CHECK-NEXT: 00001000 00000006 1000 .text
-# CHECK-NEXT: 00001000 00000006 10 .text$mn
-# CHECK-NEXT: 00001000 00000006 10 {{.*}}lldmap.test.tmp.obj
+# CHECK-NEXT: 00001000 00000006 4096 .text
+# CHECK-NEXT: 00001000 00000006 16 .text$mn
+# CHECK-NEXT: 00001000 00000006 16 {{.*}}lldmap.test.tmp.obj
# CHECK-NEXT: 00001000 00000006 0 main
Modified: lld/trunk/test/ELF/map-file.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/map-file.s?rev=293685&r1=293684&r2=293685&view=diff
==============================================================================
--- lld/trunk/test/ELF/map-file.s (original)
+++ lld/trunk/test/ELF/map-file.s Tue Jan 31 14:42:34 2017
@@ -24,7 +24,7 @@ bar:
.long bar - .
.long zed - .
local:
-.comm common,4,4
+.comm common,4,16
// CHECK: Address Size Align Out In File Symbol
// CHECK-NEXT: 0000000000200158 0000000000000030 8 .eh_frame
@@ -45,8 +45,8 @@ local:
// CHECK-NEXT: 0000000000201014 0000000000000000 0 bah
// CHECK-NEXT: 0000000000201014 0000000000000001 4 {{.*}}{{/|\\}}map-file.s.tmp4.a(map-file.s.tmp4.o)
// CHECK-NEXT: 0000000000201014 0000000000000000 0 baz
-// CHECK-NEXT: 0000000000202000 0000000000000004 4 .bss
-// CHECK-NEXT: 0000000000202000 0000000000000004 4 COMMON
+// CHECK-NEXT: 0000000000202000 0000000000000004 16 .bss
+// CHECK-NEXT: 0000000000202000 0000000000000004 16 COMMON
// CHECK-NEXT: 0000000000000000 0000000000000008 1 .comment
// CHECK-NEXT: 0000000000000000 00000000000000f0 8 .symtab
// CHECK-NEXT: 0000000000000000 00000000000000f0 8 .symtab
More information about the llvm-commits
mailing list