[lld] r335954 - [ELF] - Add test case to test 32 bits output.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 29 01:54:34 PDT 2018
Author: grimar
Date: Fri Jun 29 01:54:34 2018
New Revision: 335954
URL: http://llvm.org/viewvc/llvm-project?rev=335954&view=rev
Log:
[ELF] - Add test case to test 32 bits output.
We had no tests that checked how we print -Map output for
32 bit targets. Though there are at least 2 places where we have the difference.
(between 64 and 32 bits):
https://github.com/llvm-mirror/lld/blob/master/ELF/MapFile.cpp#L52
https://github.com/llvm-mirror/lld/blob/master/ELF/MapFile.cpp#L162
Patch adds just a trivial test to check we do right things in general.
Added:
lld/trunk/test/ELF/map-file-i686.s
Added: lld/trunk/test/ELF/map-file-i686.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/map-file-i686.s?rev=335954&view=auto
==============================================================================
--- lld/trunk/test/ELF/map-file-i686.s (added)
+++ lld/trunk/test/ELF/map-file-i686.s Fri Jun 29 01:54:34 2018
@@ -0,0 +1,21 @@
+// REQUIRES: x86
+
+// RUN: llvm-mc -filetype=obj -triple=i386-pc-linux %s -o %t1.o
+// RUN: ld.lld %t1.o -M | FileCheck -strict-whitespace %s
+
+.global _start
+_start:
+ nop
+
+// CHECK: VMA LMA Size Align Out In Symbol
+// CHECK-NEXT: 11000 11000 1 4 .text
+// CHECK-NEXT: 11000 11000 1 4 {{.*}}{{/|\\}}map-file-i686.s.tmp1.o:(.text)
+// CHECK-NEXT: 11000 11000 0 1 _start
+// CHECK-NEXT: 0 0 8 1 .comment
+// CHECK-NEXT: 0 0 8 1 <internal>:(.comment)
+// CHECK-NEXT: 0 0 20 4 .symtab
+// CHECK-NEXT: 0 0 20 4 <internal>:(.symtab)
+// CHECK-NEXT: 0 0 2a 1 .shstrtab
+// CHECK-NEXT: 0 0 2a 1 <internal>:(.shstrtab)
+// CHECK-NEXT: 0 0 8 1 .strtab
+// CHECK-NEXT: 0 0 8 1 <internal>:(.strtab)
More information about the llvm-commits
mailing list