[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/26907] objcopy gives memsiz to segment containing empty SH
From: |
jozef.l at mittosystems dot com |
Subject: |
[Bug binutils/26907] objcopy gives memsiz to segment containing empty SHT_NOBITS section |
Date: |
Tue, 01 Dec 2020 10:36:42 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=26907
--- Comment #10 from Jozef Lawrynowicz <jozef.l at mittosystems dot com> ---
(In reply to Alan Modra from comment #9)
> Yes, if you play games with lma and vma you can easily create layouts that
> _bfd_elf_map_sections_to_segments won't handle very well. A section that
> has a different lma to vma relationship to the previous section can't be put
> in the same load segment. That can easily lead to empty load segments, and
> indeed must if a section is empty but your script said it should be kept and
> its lma to vma relation doesn't match any non-empty section. (LMA is not
> specified in ELF section headers, only in load headers.)
>
> I'm not interested in trying to make every weird user script produce the
> minimum number of load headers, or even to work with objcopy.
Fair enough, I agree the linker script is weird. A sensible layout that at
least groups output sections by LMA region averts the objcopy issues and
reduces the number of segments required.
--
You are receiving this mail because:
You are on the CC list for the bug.