[llvm] Add adjustVMA option (PR #72870)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 21 00:16:16 PST 2023


https://github.com/jh7370 requested changes to this pull request.

I haven't looked at the implementation yet, as I think there are a couple of high-level things that need addressing:

1) This change needs to update the llvm-objcopy docs located at llvm/docs/CommandGuide.
2) This change needs tests.
3) Should this option apply to platforms other than ELF? There's no need to implement those platforms, but it impacts things like what happens if the option is specified for a non-ELF input.
4) Please make sure your new/changed code is reformatted according to clang-format, but not other areas of code, to reduce noise in the patch.
5) A quick skim of the behaviour suggests that this only impacts section addresses. This may be correct, but could you confirm whether the option has any impact on program headers with GNU objcopy? In particular, can it result in a section address (sh_addr value) that is outside the program segment it should be in (compare it to the `p_vaddr` and `p_memsz` of the segments).
6) Does GNU objcopy do any sanity checking of the new address? E.g. does it stop you specifying a new address for a section if it would cause its address to overlap with another section?

https://github.com/llvm/llvm-project/pull/72870


More information about the llvm-commits mailing list