[PATCH] D120941: [lld-macho][nfc] Use %X in mapfile test
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 3 14:07:19 PST 2022
int3 created this revision.
int3 added reviewers: lld-macho, Roger.
Herald added projects: lld-macho, All.
int3 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
LLD (and ld64) emits uppercase hex addresses in the mapfile. The
map-file.s test passes right now because the addresses we emit happen
not to include any alphabets, but that can easily change.
I noticed this while dealing with
https://github.com/llvm/llvm-project/issues/54184.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D120941
Files:
lld/test/MachO/map-file.s
Index: lld/test/MachO/map-file.s
===================================================================
--- lld/test/MachO/map-file.s
+++ lld/test/MachO/map-file.s
@@ -30,16 +30,16 @@
# CHECK-NEXT: [ 2] {{.*}}{{/|\\}}map-file.s.tmp/foo.o
# CHECK-NEXT: # Sections:
-# CHECK-NEXT: # Address Size Segment Section
-# CHECK-NEXT: 0x[[#TEXT]] 0x{{[0-9a-f]+}} __TEXT __text
-# CHECK-NEXT: 0x[[#DATA]] 0x{{[0-9a-f]+}} __TEXT obj
-# CHECK-NEXT: 0x[[#BSS]] 0x{{[0-9a-f]+}} __DATA __common
+# CHECK-NEXT: # Address Size Segment Section
+# CHECK-NEXT: 0x[[#%X,TEXT]] 0x{{[0-9a-f]+}} __TEXT __text
+# CHECK-NEXT: 0x[[#%X,DATA]] 0x{{[0-9a-f]+}} __TEXT obj
+# CHECK-NEXT: 0x[[#%X,BSS]] 0x{{[0-9a-f]+}} __DATA __common
# CHECK-NEXT: # Symbols:
-# CHECK-NEXT: # Address File Name
-# CHECK-NEXT: 0x[[#MAIN]] [ 1] _main
-# CHECK-NEXT: 0x[[#FOO]] [ 2] _foo
-# CHECK-NEXT: 0x[[#NUMBER]] [ 1] _number
+# CHECK-NEXT: # Address File Name
+# CHECK-NEXT: 0x[[#%X,MAIN]] [ 1] _main
+# CHECK-NEXT: 0x[[#%X,FOO]] [ 2] _foo
+# CHECK-NEXT: 0x[[#%X,NUMBER]] [ 1] _number
# RUN: %lld -map %t/c-string-literal-map %t/c-string-literal.o -o %t/c-string-literal-out
# RUN: FileCheck --check-prefix=CSTRING %s < %t/c-string-literal-map
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120941.412837.patch
Type: text/x-patch
Size: 1335 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220303/4d325948/attachment.bin>
More information about the llvm-commits
mailing list