-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[LLD][ELF][AArch64] Mark .plt and .iplt with PURECODE flag #134798
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
f8e78ec
[LLD][ELF][AArch64] Mark .plt and .iplt with PURECODE flag
Il-Capitano 4fe2ab7
Move EM_AARCH64 check to be alphabetically ordered
Il-Capitano 9cc56c4
Add test to make sure .plt and .iplt will end up in XO segment
Il-Capitano d373afc
Try to fix windows CI failure
Il-Capitano add7b16
Actually fix test
Il-Capitano aea7cfa
Convert tests to use llvm-readelf
Il-Capitano File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,35 @@ | ||
// REQUIRES: aarch64 | ||
|
||
// RUN: llvm-mc -filetype=obj -triple=aarch64-linux-gnu %s -o %t.o | ||
// RUN: llvm-mc -filetype=obj -triple=aarch64-linux-gnu %S/Inputs/plt-aarch64.s -o %t2.o | ||
// RUN: ld.lld -shared %t2.o -soname=t2.so -o %t2.so | ||
// RUN: ld.lld %t.o %t2.so -o %t | ||
// RUN: llvm-readelf -S -l %t | FileCheck %s | ||
|
||
// CHECK-LABEL: Section Headers: | ||
// CHECK: .text PROGBITS 00000000002102a0 0002a0 000010 00 AXy 0 0 4 | ||
// CHECK: .plt PROGBITS 00000000002102b0 0002b0 000030 00 AXy 0 0 16 | ||
// CHECK: .iplt PROGBITS 00000000002102e0 0002e0 000010 00 AXy 0 0 16 | ||
|
||
// CHECK-LABEL: Program Headers: | ||
// CHECK: PHDR | ||
// CHECK-NEXT: LOAD | ||
// CHECK-NEXT: LOAD 0x0002a0 0x00000000002102a0 0x00000000002102a0 0x000050 0x000050 E 0x10000 | ||
|
||
// CHECK-LABEL: Section to Segment mapping: | ||
/// Index should match the index of the LOAD segment above. | ||
// CHECK: 02 .text .plt .iplt | ||
|
||
.global bar | ||
|
||
.section .text,"axy",@progbits,unique,0 | ||
.global _start | ||
_start: | ||
bl foo | ||
bl bar | ||
ret | ||
|
||
.globl foo | ||
.type foo STT_GNU_IFUNC | ||
foo: | ||
ret |
This file contains hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.