[llvm] [llvm-readobj][ELF] Support SHT_REL/SHT_RELA relocations for --call-graph-info on ET_REL (PR #213156)
Prabhu Rajasekaran via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 9 15:01:58 PDT 2026
Prabhuk wrote:
Thanks for the reviews. Apologies that this patch snowballed into something very large. I've split this PR into a stack of smaller PRs, each with its own tests. I have addressed the active review comments in this PR in my new split PRs. The stack replaces this PR. I will respond to each review comment with what I had done to address them and which PR in the stack addresses them.
| PR | Change |
| -- | ------ |
| #230646 | [NFC] Rename `FunctionCallgraphInfo` to `FunctionCallGraphInfo` (merged) |
| #230647 | Drop the redundant `NumDirectCallees` and `NumIndirectTargetTypeIDs` |
| #230648 | Don't clear bit 0 of call graph field offsets on ARM |
| #230649 | Print call graph callees in section order |
| #230650 | [NFC] Match call graph relocations to address fields in one pass |
| #230651 | Print a `Relocation` object instead of `Name` |
| #230652 | Print implicit addends of call graph relocations |
| #230653 | Fall back to `Address` when no single relocation applies |
| #230654 | Print `Names` for call graph relocations |
- `Relocation` no longer has `Type`.
- `Names` is demangled with `--demangle`, and `Relocation` gets a `DemangledName` with it.
- Relocations are still used only in relocatable object files.
The output format from my new stacked PRs:
```json
"Function": {
"Names": ["caller"],
"Relocation": {"SymbolIndex": 7, "SymbolName": "caller"},
"Version": 0,
"IsIndirectTarget": true,
"TypeID": 2451761621477796417,
"DirectCallees": [
{"Names": ["foo"], "Relocation": {"SymbolIndex": 2, "Addend": 48}},
{"Names": ["bar"], "Relocation": {"SymbolIndex": 2, "Addend": 64}},
{"Names": ["baz"], "Relocation": {"SymbolIndex": 5, "SymbolName": "baz"}}
],
"IndirectTypeIDs": [9080559750644022485]
}
```
I'm marking the PRs in the stack ready for review from the bottom up: #230647 and #230648 are ready now. I'll mark them ready for review soon once I am confident with the changes.
https://github.com/llvm/llvm-project/pull/213156
More information about the llvm-commits
mailing list