[PATCH] D137369: [lld-macho] Emit map file entry for compact unwind info
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 3 15:38:10 PDT 2022
int3 created this revision.
int3 added a reviewer: lld-macho.
Herald added projects: lld-macho, All.
int3 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Just like ld64 does.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D137369
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
@@ -15,7 +15,9 @@
# CHECK-NEXT: Idx Name Size VMA Type
# CHECK-NEXT: 0 __text {{[0-9a-f]+}} [[#%x,TEXT:]] TEXT
# CHECK-NEXT: 1 __cstring {{[0-9a-f]+}} [[#%x,CSTR:]] DATA
-# CHECK-NEXT: 2 __common {{[0-9a-f]+}} [[#%x,BSS:]] BSS
+# CHECK-NEXT: 2 __unwind_info {{[0-9a-f]+}} [[#%x,UNWIND:]] DATA
+# CHECK-NEXT: 3 __eh_frame {{[0-9a-f]+}} [[#%x,EH_FRAME:]] DATA
+# CHECK-NEXT: 4 __common {{[0-9a-f]+}} [[#%x,BSS:]] BSS
# CHECK: SYMBOL TABLE:
# CHECK-DAG: [[#%x,MAIN:]] g F __TEXT,__text _main
@@ -34,10 +36,12 @@
# CHECK-NEXT: [ 3] {{.*}}{{/|\\}}map-file.s.tmp/c-string-literal.o
# CHECK-NEXT: # Sections:
-# CHECK-NEXT: # Address Size Segment Section
-# CHECK-NEXT: 0x[[#%X,TEXT]] 0x{{[0-9A-F]+}} __TEXT __text
-# CHECK-NEXT: 0x[[#%X,CSTR]] 0x{{[0-9A-F]+}} __TEXT __cstring
-# CHECK-NEXT: 0x[[#%X,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,CSTR]] 0x{{[0-9A-F]+}} __TEXT __cstring
+# CHECK-NEXT: 0x[[#%X,UNWIND]] 0x{{[0-9A-F]+}} __TEXT __unwind_info
+# CHECK-NEXT: 0x[[#%X,EH_FRAME]] 0x{{[0-9A-F]+}} __TEXT __eh_frame
+# CHECK-NEXT: 0x[[#%X,BSS]] 0x{{[0-9A-F]+}} __DATA __common
# CHECK-NEXT: # Symbols:
# CHECK-NEXT: # Address Size File Name
@@ -48,6 +52,7 @@
# CHECK-DAG: 0x[[#%X,HIITSME]] 0x0000000F [ 3] literal string: Hello, it's me
# CHECK-DAG: 0x[[#%X,HIITSME + 0xf]] 0x0000000E [ 3] literal string: Hello world!\n
# CHECK-DAG: 0x[[#%X,NUMBER]] 0x00000001 [ 1] _number
+# CHECK-DAG: 0x[[#%X,UNWIND]] 0x0000103C [ 0] compact unwind info
# MAPFILE: "name":"Total Write map file"
@@ -89,7 +94,10 @@
.globl _main, _bar
_main:
+.cfi_startproc
+.cfi_def_cfa_offset 16
ret
+.cfi_endproc
_bar:
nop
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137369.473060.patch
Type: text/x-patch
Size: 2195 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221103/bcc9b7fb/attachment.bin>
More information about the llvm-commits
mailing list