[PATCH] D102150: [lld-macho] Improve an external weak def test
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun May 9 23:47:34 PDT 2021
MaskRay created this revision.
MaskRay added a reviewer: lld-macho.
Herald added a project: lld-macho.
MaskRay requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
The rebase table entry is untested.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D102150
Files:
lld/test/MachO/weak-binding.s
Index: lld/test/MachO/weak-binding.s
===================================================================
--- lld/test/MachO/weak-binding.s
+++ lld/test/MachO/weak-binding.s
@@ -4,7 +4,7 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/libfoo.s -o %t/libfoo.o
# RUN: %lld -dylib %t/libfoo.o -o %t/libfoo.dylib
# RUN: %lld %t/test.o -L%t -lfoo -o %t/test -lSystem
-# RUN: llvm-objdump -d --no-show-raw-insn --bind --lazy-bind --weak-bind --full-contents %t/test | \
+# RUN: llvm-objdump -d --no-show-raw-insn --bind --lazy-bind --rebase --weak-bind --full-contents %t/test | \
# RUN: FileCheck %s
# CHECK: Contents of section __DATA_CONST,__got:
@@ -29,6 +29,9 @@
# CHECK-NEXT: callq 0x{{[0-9a-f]*}}
# CHECK-NEXT: callq 0x{{[0-9a-f]*}}
+# CHECK-LABEL: Rebase table:
+# CHECK: __DATA __la_symbol_ptr 0x[[#%x,WEAK_EXT_FN:]] pointer
+
# CHECK-LABEL: Bind table:
# CHECK-DAG: __DATA_CONST __got 0x[[#WEAK_DY_GOT_ADDR]] pointer 0 libfoo _weak_dysym_for_gotpcrel
# CHECK-DAG: __DATA __la_symbol_ptr 0x[[#%x,WEAK_DY_FN:]] pointer 0 libfoo _weak_dysym_fn
@@ -50,7 +53,7 @@
# CHECK-DAG: __DATA __thread_ptrs 0x[[#WEAK_DY_TLV_ADDR]] pointer 0 _weak_dysym_tlv
# CHECK-DAG: __DATA __data 0x{{[0-9a-f]*}} pointer 2 _weak_external
# CHECK-DAG: __DATA __la_symbol_ptr 0x[[#WEAK_DY_FN]] pointer 0 _weak_dysym_fn
-# CHECK-DAG: __DATA __la_symbol_ptr 0x{{[0-9a-f]*}} pointer 0 _weak_external_fn
+# CHECK-DAG: __DATA __la_symbol_ptr 0x[[#WEAK_EXT_FN]] pointer 0 _weak_external_fn
## Check that we don't have any other bindings
# CHECK-NOT: pointer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102150.343977.patch
Type: text/x-patch
Size: 1703 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210510/f6edc4ff/attachment.bin>
More information about the llvm-commits
mailing list