Files
clang-p2996/llvm/test/ExecutionEngine/JITLink/X86/MachO_weak_local.s
Ben Langmuir 4c94760f36 [ORC] Fix materialization of weak local symbols
We were adding all defined weak symbols to the materialization
responsibility, but local symbols will not be in the symbol table, so it
failed to materialize due to the "missing" symbol.

Local weak symbols come up in practice when using `ld -r` with a hidden
weak symbol.

rdar://85574696
2021-11-19 07:25:56 -08:00

17 lines
425 B
ArmAsm

# RUN: llvm-mc -triple=x86_64-apple-macosx10.9 -filetype=obj -o %t %s
# RUN: llvm-jitlink -noexec %t -show-graph | FileCheck %s
# CHECK: linkage: weak, scope: local, live - _foo_weak
# _foo_weak is weak and local. Make sure we can link it.
.section __TEXT,__text,regular,pure_instructions
.weak_definition _foo_weak
.p2align 4, 0x90
_foo_weak:
retq
.globl _main
.p2align 4, 0x90
_main:
jmp _foo_weak