[llvm] [llvm-objcopy] --change-section-lma: skip segments with no assigned address (PR #218414)

via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 26 07:59:31 PDT 2026


GoranWall wrote:

> Why does the PT_RISCV_ATTRIBUTES segment have a memsize if it is not assigned an address? This sounds like a mistake in the segment generation in the first place... In my opinion, this sounds like a case of garbage-in, garbage-out (or in this case an error).

That is a good observation for which I do not have an explanation but it does open up for the root problem being elsewhere, and not necessarily llvm-objcopy specific. GNU objcopy must have some resilience that simply ignores it as it didn't complain. 

I will have to look more at this before proceeding. Thank you for taking time and feedback.

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


More information about the llvm-commits mailing list