-
Notifications
You must be signed in to change notification settings - Fork 15.4k
[llvm-objdump] Support --symbolize-operand on AArch64 #145009
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
aengelke
merged 8 commits into
main
from
users/aengelke/spr/llvm-objdump-support-symbolize-operand-on-aarch64
Jun 25, 2025
Merged
Changes from 2 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
8785865
[𝘀𝗽𝗿] changes to main this commit is based on
matthias-springer 7f3bf71
[𝘀𝗽𝗿] initial version
aengelke db5463b
address comments + add reloctable test
aengelke 1abf014
move tests to avoid failure if AArch64 is not configured
aengelke ff6dde1
fix typo in filename
aengelke 010cd60
specify triple in test command line
aengelke ca20e1f
address comments
aengelke 0688739
[𝘀𝗽𝗿] landed version
aengelke 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
42 changes: 42 additions & 0 deletions
42
llvm/test/tools/llvm-objdump/AArch64/elf-disassemble-symbololize-operands.yaml
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,42 @@ | ||
| # RUN: yaml2obj %s -o %t | ||
jh7370 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| # RUN: llvm-objdump %t -d --symbolize-operands --no-show-raw-insn --no-leading-addr | \ | ||
| # RUN: FileCheck %s --match-full-lines | ||
| # RUN: llvm-objdump %t -d --symbolize-operands --no-show-raw-insn --no-leading-addr --adjust-vma=0x2000 | \ | ||
| # RUN: FileCheck %s --match-full-lines | ||
|
|
||
| ## Expect to find the branch labels and global variable name. | ||
| # CHECK: <_start>: | ||
| # CHECK-NEXT: ldr x0, <symbol> | ||
| # CHECK-NEXT: <L0>: | ||
| # CHECK-NEXT: adrp x1, 0x{{[68]}}000 <symbol+0xff4> | ||
jh7370 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| # CHECK-NEXT: adr x2, <symbol> | ||
| # CHECK-NEXT: cmp x1, x2 | ||
| # CHECK-NEXT: b.eq <L1> | ||
| # CHECK-NEXT: b <L0> | ||
| # CHECK-NEXT: <L1>: | ||
| # CHECK-NEXT: cbz x2, <L0> | ||
| # CHECK-NEXT: ret | ||
|
|
||
| --- !ELF | ||
| FileHeader: | ||
| Class: ELFCLASS64 | ||
| Data: ELFDATA2LSB | ||
| Type: ET_EXEC | ||
| Machine: EM_AARCH64 | ||
| Sections: | ||
| - Name: .text | ||
| Type: SHT_PROGBITS | ||
| Address: 0x4000 | ||
| Flags: [SHF_ALLOC, SHF_EXECINSTR] | ||
| Content: '60800058010000d0228000103f0002eb40000054fcffff1762ffffb4c0035fd6' | ||
jh7370 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - Name: .data | ||
| Type: SHT_PROGBITS | ||
| Flags: [SHF_ALLOC, SHF_WRITE] | ||
| Address: 0x5000 | ||
| Symbols: | ||
| - Name: _start | ||
| Section: .text | ||
| Value: 0x4000 | ||
| - Name: symbol | ||
| Section: .data | ||
| Value: 0x500c | ||
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
Oops, something went wrong.
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.