Skip to content

RFC objtool: Support implicit addend relocations

Matt Helsley lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3objtool: Rename rela to reloctools/objtool/arch.h tools/objtool/arch/x86/decode.c tools/objtool/check.c +5 more+218 -2182 replies
2/3objtool: Find relocation base section using sh_infotools/objtool/elf.c+7 -14 replies
3/3objtool: Add support for relocations without addendstools/objtool/elf.c tools/objtool/elf.h+95 -192 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC][PATCH 0/3] objtool: Support implicit addend relocations

Future tools that use objtool to process ELF object files may require reading or even modifying relocations with implicit addends. This series cleans up the naming of the relocation struct in objtool, variable names, and function names to be consistent with a more generic use rather than being specific to those applying explicit addends.

From there we switch to the specification compliant method of finding the section the relocations apply to and fall back to the old naming-heuristic basis if that's not available.

Finally, add support for implicit addends. Note that we don't completely convert the orc tools to work with both kinds of relocations. I'm hoping to get feedback on whether it makes more sense to convert it or leave it as-is.

Matt Helsley (3):
objtool: Rename rela to reloc
objtool: Find relocation base section using sh_info
objtool: Add support for relocations without addends

 tools/objtool/arch.h            |   2 +-
 tools/objtool/arch/x86/decode.c |   2 +-
 tools/objtool/check.c           | 196 +++++++++++++-------------
 tools/objtool/check.h           |   2 +-
 tools/objtool/elf.c             | 237 +++++++++++++++++++++-----------
 tools/objtool/elf.h             |  27 ++--
 tools/objtool/orc_gen.c         |  46 +++----
 tools/objtool/special.c         |  28 ++--
 8 files changed, 311 insertions(+), 229 deletions(-)

base-commit: 7c0577f4e609f7278ebd6d21e2de82b42f110944
prerequisite-patch-id: 387905b1da8b1293e7736b28fcc1585583e3e7cf
prerequisite-patch-id: 2fd7ac6c4dfd717ab117fc771623c01040188b4e
prerequisite-patch-id: bfeefd995e3f80d6fa0edfa2205d98be31fbee4e
prerequisite-patch-id: abcb5732607ad17f4c99c06b8bb83c9db1b15c42
prerequisite-patch-id: 5179e659d828bed48051d365f669a8ba3a36c206

Signature · 1 line
2.20.1