Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
ac4b7bc
[llvm-readobj] Dump callgraph section info for ELF
Prabhuk Sep 6, 2025
31c4d2b
Format code
Prabhuk Sep 8, 2025
4d1a7c7
Implement JSON output for printCallGraph()
Prabhuk Sep 8, 2025
f0810b2
ELFDumper cleanups
Prabhuk Sep 8, 2025
5f20b7b
Add readelf callgraph info tests.
Prabhuk Sep 9, 2025
d991194
more tests
Prabhuk Sep 9, 2025
c2d8d22
Extend tests to json
Prabhuk Sep 9, 2025
2874918
Expand all tests to include JSON and LLVM formats.
Prabhuk Sep 9, 2025
9803c62
Improve tests. Match full lines.
Prabhuk Sep 9, 2025
7285210
Make call graph processing agnostic of target architecture pointer wi…
Prabhuk Sep 17, 2025
8236798
Remove unnecessary function returns after reportError calls which bot…
Prabhuk Sep 17, 2025
abe189e
Formatting fixes.
Prabhuk Sep 17, 2025
0b9c46d
Remove callsites from direct call data.
Prabhuk Sep 18, 2025
5b504fc
Format
Prabhuk Sep 18, 2025
5b6bb00
Simplify readelf output.
Prabhuk Sep 18, 2025
937ff61
format
Prabhuk Sep 18, 2025
1b86857
Clean up callgraph output
Prabhuk Sep 18, 2025
7280ff3
Format
Prabhuk Sep 18, 2025
bdb8683
Show symbol names.
Prabhuk Sep 18, 2025
09d3a87
Format
Prabhuk Sep 18, 2025
b851b8d
Make llvm output better.
Prabhuk Sep 18, 2025
fd50ff0
format source.
Prabhuk Sep 18, 2025
ee3a081
Minor improvements to LLVM output.
Prabhuk Sep 18, 2025
3c94a44
Fix tests to match the new output.
Prabhuk Sep 18, 2025
026b184
Add REQUIRES: x86-registered-target to tests.
Prabhuk Sep 19, 2025
d1655c2
Account for windows binary name extension.
Prabhuk Sep 19, 2025
ff9535e
Merge remote-tracking branch 'upstream/main' into readelf_callgraph_info
Prabhuk Oct 20, 2025
b7c56f9
Update callgraph section handling to match the new format.
Prabhuk Oct 20, 2025
e075175
Handle relocations in callgraph section.
Prabhuk Oct 20, 2025
876f7a6
New format for GNU printer.
Prabhuk Oct 21, 2025
33d06b4
Extract relocations handling to a common function.
Prabhuk Oct 21, 2025
5f6cf07
minor cleanups.
Prabhuk Oct 21, 2025
055139b
Merge remote-tracking branch 'upstream/main' into readelf_callgraph_info
Prabhuk Oct 21, 2025
d1b41b5
Fix readelf tests. callgraph section type.
Prabhuk Oct 21, 2025
6368f56
Fix call graph tests.
Prabhuk Oct 22, 2025
f1f9f6b
Merge remote-tracking branch 'upstream/main' into readelf_callgraph_info
Prabhuk Oct 22, 2025
ce75c88
Fix tests. Address review comments.
Prabhuk Oct 22, 2025
72b0d37
Merge remote-tracking branch 'upstream/main' into readelf_callgraph_info
Prabhuk Oct 22, 2025
54b2004
Address review comments.
Prabhuk Oct 22, 2025
dfd37f2
Cleanup ELFDumper.cpp
Prabhuk Oct 22, 2025
8ebe0a2
Use enum for handling Callgraph Flags
Prabhuk Oct 22, 2025
c429dd8
Update error message.
Prabhuk Oct 23, 2025
d04fbd0
Address review comments.
Prabhuk Oct 31, 2025
75bffeb
Function name printing to match stack size printing behavior.
Prabhuk Oct 31, 2025
77acb10
Refactor getCalGraphSection function as suggested in review.
Prabhuk Oct 31, 2025
246275d
Declutter ouput format. Remove GNU output.
Prabhuk Nov 4, 2025
402c90f
Remove unnecessary header includes.
Prabhuk Nov 4, 2025
87d3dd8
More header include cleanups.
Prabhuk Nov 4, 2025
20ea016
Rename test files to .S
Prabhuk Nov 4, 2025
c5823aa
Fix relocation printing handling.
Prabhuk Nov 5, 2025
8d3a27c
Remove addend, type and offset info from relocations.
Prabhuk Nov 5, 2025
aaa2cd4
Fix tests.
Prabhuk Nov 5, 2025
afc13ee
Fix tests.
Prabhuk Nov 5, 2025
6e22254
Rename files to .s
Prabhuk Nov 5, 2025
5b3bff0
Make relocatable test to be built from YAML.
Prabhuk Nov 5, 2025
c4ea41d
Relocatable file tests fixed.
Prabhuk Nov 5, 2025
53ffcaa
Nits. Alignment within test files.
Prabhuk Nov 5, 2025
edc5eaa
Merge remote-tracking branch 'upstream/main' into readelf_callgraph_info
Prabhuk Nov 5, 2025
14b5cf0
Merge branch 'main' into readelf_callgraph_info
Prabhuk Nov 13, 2025
b56a17c
Warn for unknown relocations instead of printing the offset as part o…
Prabhuk Nov 21, 2025
ae501fa
Address review comments.
Prabhuk Nov 21, 2025
f454957
Fix messages. Remove unnecessary errors and unused functions.
Prabhuk Nov 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 17 additions & 18 deletions llvm/test/tools/llvm-readobj/ELF/call-graph-info-relocatable-file.s
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
# LLVM-NEXT: IndirectTypeIDs: []
# LLVM-NEXT: }
# LLVM-NEXT: Function {
# LLVM-NEXT: Name: main
# LLVM-NEXT: Name: _Z6callerv
# LLVM-NEXT: Version: 0
# LLVM-NEXT: IsIndirectTarget: Yes
# LLVM-NEXT: TypeId: 0xA9494DEF81A01DC
Expand Down Expand Up @@ -133,7 +133,7 @@
# JSON-NEXT: },
# JSON-NEXT: {
# JSON-NEXT: "Function": {
# JSON-NEXT: "Name": "main",
# JSON-NEXT: "Name": "_Z6callerv",
# JSON-NEXT: "Version": 0,
# JSON-NEXT: "IsIndirectTarget": true,
# JSON-NEXT: "TypeId": 762397922298560988,
Expand Down Expand Up @@ -238,10 +238,10 @@ _Z3bazc: # @_Z3bazc
.quad 3498816979441845844
.text
# -- End function
.globl main # -- Begin function main
.globl _Z6callerv # -- Begin function _Z6callerv
.p2align 4
.type main,@function
main: # @main
.type _Z6callerv,@function
_Z6callerv: # @_Z6callerv
.Lfunc_begin3:
.cfi_startproc
# %bb.0: # %entry
Expand All @@ -250,35 +250,34 @@ main: # @main
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $48, %rsp
movl $0, -4(%rbp)
subq $32, %rsp
leaq _Z3foov(%rip), %rax
movq %rax, -8(%rbp)
callq *-8(%rbp)
leaq _Z3barv(%rip), %rax
movq %rax, -16(%rbp)
callq *-16(%rbp)
leaq _Z3barv(%rip), %rax
movq %rax, -24(%rbp)
callq *-24(%rbp)
leaq _Z3bazc(%rip), %rax
movq %rax, -40(%rbp)
movq -40(%rbp), %rax
movsbl -25(%rbp), %edi
movq %rax, -32(%rbp)
movq -32(%rbp), %rax
movsbl -17(%rbp), %edi
callq *%rax
callq _Z3foov
callq _Z3barv
movsbl -25(%rbp), %edi
movsbl -17(%rbp), %edi
callq _Z3bazc
xorl %eax, %eax
addq $48, %rsp
addq $32, %rsp
popq %rbp
.cfi_def_cfa %rsp, 8
retq
.Lfunc_end3:
.size main, .Lfunc_end3-main
.size _Z6callerv, .Lfunc_end3-_Z6callerv
.cfi_endproc
.section .llvm.callgraph,"o",@llvm_call_graph,.text
.byte 0
.byte 7
.quad main
.quad _Z6callerv
.quad 762397922298560988
.byte 3
.quad _Z3foov
Expand All @@ -289,7 +288,7 @@ main: # @main
.quad 3498816979441845844
.text
# -- End function
.ident "Fuchsia clang version 22.0.0git ([email protected]:Prabhuk/llvm-project.git aaa2cd4fc523537be583bc5a2b2f4d447575a6b4)"
.ident "Fuchsia clang version 22.0.0git ([email protected]:Prabhuk/llvm-project.git 5b3bff0cec35606b5b1b6564730fea8f8081b1ff)"
.section ".note.GNU-stack","",@progbits
.addrsig
.addrsig_sym _Z3foov
Expand Down
Loading