This fixes PR41886: llvm-objdump -d -r -j .text doesn't show inline relocations of .text
Details
- Reviewers
grimar jhenderson rupprecht - Commits
- rZORGf4cdd6673594: [llvm-objdump] Dump inline relocations if the relocated section is specified…
rGf4cdd6673594: [llvm-objdump] Dump inline relocations if the relocated section is specified…
rGc289d218b9fa: [llvm-objdump] Dump inline relocations if the relocated section is specified…
rL361395: [llvm-objdump] Dump inline relocations if the relocated section is specified…
Diff Detail
- Repository
- rL LLVM
Event Timeline
This looks good (with my comment addressed :) But please wait unil anyone else also take a look.
tools/llvm-objdump/llvm-objdump.cpp | ||
---|---|---|
932 ↗ | (On Diff #200728) | This part contains unneseccary variable renamings and also a comment removal. |
test/tools/llvm-objdump/X86/section-filter-relocs.test | ||
---|---|---|
15–22 ↗ | (On Diff #200728) | With the behaviour change, I'm not sure you need all of this, because it's covered by the case on line 11. The purpose of this was mostly to show that -j limited which relocations were printed to the specified relocation sections. What do you think? |
tools/llvm-objdump/llvm-objdump.cpp | ||
932 ↗ | (On Diff #200728) | I'm actually okay with the RelSec -> Relocated name as it is easier to follow, and don't mind it changing. |
tools/llvm-objdump/llvm-objdump.cpp | ||
---|---|---|
932 ↗ | (On Diff #200728) | My first impression of RelSec is something similar to .rel.sec, so I thought it relocated Section which obviously is not the case.. So I still prefer Relocated. The comment is redundant. Regarding Sec, I'm inclined to use Sec in case someone asks me to rename Relocated to RelocatedSec. RelocatedSection would be too verbose. |
tools/llvm-objdump/llvm-objdump.cpp | ||
---|---|---|
932 ↗ | (On Diff #200728) | Ok, at least I would restore the comment. It was an innocent victim in this attack I think. |
tools/llvm-objdump/llvm-objdump.cpp | ||
---|---|---|
932 ↗ | (On Diff #200728) | OK, restores, I probably wouldn't attach that if I ran git blame first... BTW, I think llvm::stable_sort is probably better. Because gABI says: "If multiple consecutive relocation records are applied to the same relocation location (r_offset), they are composed instead of being applied independently, as described above." Though I can't find a case to make this break. |