[lld] r329233 - Do not show alignment 0 because that is equivalent to 1.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 4 14:25:37 PDT 2018
Author: ruiu
Date: Wed Apr 4 14:25:37 2018
New Revision: 329233
URL: http://llvm.org/viewvc/llvm-project?rev=329233&view=rev
Log:
Do not show alignment 0 because that is equivalent to 1.
Differential Revision: https://reviews.llvm.org/D44991
Modified:
lld/trunk/ELF/MapFile.cpp
lld/trunk/test/ELF/map-file.s
Modified: lld/trunk/ELF/MapFile.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/MapFile.cpp?rev=329233&r1=329232&r2=329233&view=diff
==============================================================================
--- lld/trunk/ELF/MapFile.cpp (original)
+++ lld/trunk/ELF/MapFile.cpp Wed Apr 4 14:25:37 2018
@@ -102,7 +102,7 @@ getSymbolStrings(ArrayRef<Symbol *> Syms
std::vector<std::string> Str(Syms.size());
parallelForEachN(0, Syms.size(), [&](size_t I) {
raw_string_ostream OS(Str[I]);
- writeHeader(OS, Syms[I]->getVA(), Syms[I]->getSize(), 0);
+ writeHeader(OS, Syms[I]->getVA(), Syms[I]->getSize(), 1);
OS << Indent16 << toString(*Syms[I]);
});
@@ -143,7 +143,7 @@ static void printEhFrame(raw_ostream &OS
// Print out section pieces.
for (EhSectionPiece &P : Pieces) {
- writeHeader(OS, OSec->Addr + P.OutputOff, P.Size, 0);
+ writeHeader(OS, OSec->Addr + P.OutputOff, P.Size, 1);
OS << Indent8 << toString(P.Sec->File) << ":(" << P.Sec->Name << "+0x"
<< Twine::utohexstr(P.InputOff) + ")\n";
}
Modified: lld/trunk/test/ELF/map-file.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/map-file.s?rev=329233&r1=329232&r2=329233&view=diff
==============================================================================
--- lld/trunk/test/ELF/map-file.s (original)
+++ lld/trunk/test/ELF/map-file.s Wed Apr 4 14:25:37 2018
@@ -54,38 +54,38 @@ labs = 0x1AB5
// CHECK-NEXT: 0000000000200300 0000000000000030 8 .rela.plt
// CHECK-NEXT: 0000000000200300 0000000000000030 8 <internal>:(.rela.plt)
// CHECK-NEXT: 0000000000200330 0000000000000060 8 .eh_frame
-// CHECK-NEXT: 0000000000200330 000000000000002c 0 {{.*}}{{/|\\}}map-file.s.tmp1.o:(.eh_frame+0x0)
-// CHECK-NEXT: 0000000000200360 0000000000000014 0 {{.*}}{{/|\\}}map-file.s.tmp1.o:(.eh_frame+0x2c)
-// CHECK-NEXT: 0000000000200378 0000000000000018 0 {{.*}}{{/|\\}}map-file.s.tmp2.o:(.eh_frame+0x18)
+// CHECK-NEXT: 0000000000200330 000000000000002c 1 {{.*}}{{/|\\}}map-file.s.tmp1.o:(.eh_frame+0x0)
+// CHECK-NEXT: 0000000000200360 0000000000000014 1 {{.*}}{{/|\\}}map-file.s.tmp1.o:(.eh_frame+0x2c)
+// CHECK-NEXT: 0000000000200378 0000000000000018 1 {{.*}}{{/|\\}}map-file.s.tmp2.o:(.eh_frame+0x18)
// CHECK-NEXT: 0000000000201000 000000000000002d 4 .text
// CHECK-NEXT: 0000000000201000 0000000000000028 4 {{.*}}{{/|\\}}map-file.s.tmp1.o:(.text)
-// CHECK-NEXT: 0000000000201000 0000000000000000 0 _start
-// CHECK-NEXT: 000000000020101f 0000000000000000 0 f(int)
-// CHECK-NEXT: 0000000000201028 0000000000000000 0 local
+// CHECK-NEXT: 0000000000201000 0000000000000000 1 _start
+// CHECK-NEXT: 000000000020101f 0000000000000000 1 f(int)
+// CHECK-NEXT: 0000000000201028 0000000000000000 1 local
// CHECK-NEXT: 0000000000201028 0000000000000002 4 {{.*}}{{/|\\}}map-file.s.tmp2.o:(.text)
-// CHECK-NEXT: 0000000000201028 0000000000000000 0 foo
-// CHECK-NEXT: 0000000000201029 0000000000000000 0 bar
+// CHECK-NEXT: 0000000000201028 0000000000000000 1 foo
+// CHECK-NEXT: 0000000000201029 0000000000000000 1 bar
// CHECK-NEXT: 000000000020102a 0000000000000000 1 {{.*}}{{/|\\}}map-file.s.tmp2.o:(.text.zed)
-// CHECK-NEXT: 000000000020102a 0000000000000000 0 zed
+// CHECK-NEXT: 000000000020102a 0000000000000000 1 zed
// CHECK-NEXT: 000000000020102c 0000000000000000 4 {{.*}}{{/|\\}}map-file.s.tmp3.o:(.text)
-// CHECK-NEXT: 000000000020102c 0000000000000000 0 bah
+// CHECK-NEXT: 000000000020102c 0000000000000000 1 bah
// CHECK-NEXT: 000000000020102c 0000000000000001 4 {{.*}}{{/|\\}}map-file.s.tmp4.a(map-file.s.tmp4.o):(.text)
-// CHECK-NEXT: 000000000020102c 0000000000000000 0 baz
+// CHECK-NEXT: 000000000020102c 0000000000000000 1 baz
// CHECK-NEXT: 0000000000201030 0000000000000030 16 .plt
// CHECK-NEXT: 0000000000201030 0000000000000030 16 <internal>:(.plt)
-// CHECK-NEXT: 0000000000201040 0000000000000000 0 sharedFunc1
-// CHECK-NEXT: 0000000000201050 0000000000000000 0 sharedFunc2
+// CHECK-NEXT: 0000000000201040 0000000000000000 1 sharedFunc1
+// CHECK-NEXT: 0000000000201050 0000000000000000 1 sharedFunc2
// CHECK-NEXT: 0000000000202000 0000000000000028 8 .got.plt
// CHECK-NEXT: 0000000000202000 0000000000000028 8 <internal>:(.got.plt)
// CHECK-NEXT: 0000000000203000 0000000000000100 8 .dynamic
// CHECK-NEXT: 0000000000203000 0000000000000100 8 <internal>:(.dynamic)
// CHECK-NEXT: 0000000000204000 0000000000000010 16 .bss
// CHECK-NEXT: 0000000000204000 0000000000000004 16 {{.*}}{{/|\\}}map-file.s.tmp1.o:(COMMON)
-// CHECK-NEXT: 0000000000204000 0000000000000004 0 common
+// CHECK-NEXT: 0000000000204000 0000000000000004 1 common
// CHECK-NEXT: 0000000000204004 0000000000000004 1 <internal>:(.bss)
-// CHECK-NEXT: 0000000000204004 0000000000000004 0 sharedFoo
+// CHECK-NEXT: 0000000000204004 0000000000000004 1 sharedFoo
// CHECK-NEXT: 0000000000204008 0000000000000008 1 <internal>:(.bss)
-// CHECK-NEXT: 0000000000204008 0000000000000008 0 sharedBar
+// CHECK-NEXT: 0000000000204008 0000000000000008 1 sharedBar
// CHECK-NEXT: 0000000000000000 0000000000000008 1 .comment
// CHECK-NEXT: 0000000000000000 0000000000000008 1 <internal>:(.comment)
// CHECK-NEXT: 0000000000000000 0000000000000198 8 .symtab
More information about the llvm-commits
mailing list