[PATCH] D114275: [test][lld-macho] Improve LC_FUNCTION_STARTS test coverage

Keith Smiley via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 30 09:59:20 PST 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rG0ab09a9009b6: [test][lld-macho] Improve LC_FUNCTION_STARTS test coverage (authored by keith).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D114275/new/

https://reviews.llvm.org/D114275

Files:
  lld/test/MachO/function-starts.s


Index: lld/test/MachO/function-starts.s
===================================================================
--- lld/test/MachO/function-starts.s
+++ lld/test/MachO/function-starts.s
@@ -41,6 +41,21 @@
 # RUN: llvm-objdump --macho --function-starts %t/basic >> %t/objdump
 # RUN: FileCheck %s --check-prefix=BASIC < %t/objdump
 
+# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/local.s -o %t/local.o
+# RUN: %lld -lSystem %t/local.o -o %t/local
+# RUN: llvm-objdump --syms %t/local > %t/objdump
+# RUN: llvm-objdump --macho --function-starts %t/local >> %t/objdump
+# RUN: FileCheck %s --check-prefix=LOCAL < %t/objdump
+
+# LOCAL-LABEL: SYMBOL TABLE:
+# LOCAL-NEXT:  [[#%x,F1:]] l F __TEXT,__text +[Foo bar]
+# LOCAL-NEXT:  [[#%x,F2:]] l F __TEXT,__text _foo
+# LOCAL:       [[#%x,F3:]] g F __TEXT,__text _main
+# LOCAL-LABEL: local:
+# LOCAL:       [[#F1]]
+# LOCAL:       [[#F2]]
+# LOCAL:       [[#F3]]
+
 #--- basic.s
 .section  __TEXT,__text,regular,pure_instructions
 .globl  _f1
@@ -62,3 +77,15 @@
   retq
 _main:
   retq
+
+#--- local.s
+.section __TEXT,__text
+"+[Foo bar]":
+  retq
+
+_foo:
+  retq
+
+.globl _main
+_main:
+  retq


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114275.404387.patch
Type: text/x-patch
Size: 1153 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220130/1c865db5/attachment.bin>


More information about the llvm-commits mailing list