forked from intel/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[JITLink][MachO] Treat linker private symbols as hidden rather than p…
…rivate. Linker-private symbols should be resolvable across object file boundaries.
- Loading branch information
Showing
4 changed files
with
47 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
llvm/test/ExecutionEngine/JITLink/X86/Inputs/MachO_linker_private_def.s
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Supplies a linker private definition, "l_foo". | ||
|
||
.section __TEXT,__text,regular,pure_instructions | ||
.macosx_version_min 10, 14 | ||
.p2align 4, 0x90 | ||
l_foo: | ||
xorl %eax, %eax | ||
retq | ||
|
||
.subsections_via_symbols |
19 changes: 19 additions & 0 deletions
19
llvm/test/ExecutionEngine/JITLink/X86/MachO_linker_private_symbols.s
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# RUN: rm -rf %t && mkdir -p %t | ||
# RUN: llvm-mc -triple=x86_64-apple-macosx10.9 -filetype=obj \ | ||
# RUN: -o %t/MachO_linker_private_def.o %S/Inputs/MachO_linker_private_def.s | ||
# RUN: llvm-mc -triple=x86_64-apple-macosx10.9 -filetype=obj \ | ||
# RUN: -o %t/MachO_linker_private_symbols.o %s | ||
# RUN: llvm-jitlink -noexec %t/MachO_linker_private_def.o \ | ||
# RUN: %t/MachO_linker_private_symbols.o | ||
# | ||
# Check that we can resolve linker-private symbol definitions across object | ||
# boundaries. | ||
|
||
.section __TEXT,__text,regular,pure_instructions | ||
.macosx_version_min 10, 14 | ||
.globl _main | ||
.p2align 4, 0x90 | ||
_main: | ||
jmp l_foo | ||
|
||
.subsections_via_symbols |