[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/21191] objcopy --only-keep-debug creates non-monotonically
rguenth at gcc dot gnu.org
[Bug binutils/21191] objcopy --only-keep-debug creates non-monotonically increasing section offsets
Wed, 22 Feb 2017 08:22:10 +0000
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Alan Modra from comment #1)
> File offset for a SHT_NOBITS section is irrelevant.
> Note that this "bug" can also occur with ld. You don't want to waste space
> in the output file with padding for NOBITS sections, but glibc ld.so checks
> that p_vaddr and p_offset agree modulo pagesize, even for segments with
> p_filesz zero. Thus p_offset needs to be adjusted to pacify glibc.
> p_offset is derived from sh_offset so we adjust sh_offset too.
> We could zero all the NOBITS sh_offset values for this specific case of
> --only-keep-debug, but I don't see the point given that ld will create out
> of order sh_offset.
> What tool was complaining about sh_offset? Fix it please.
It is DWZ complaining, I've sent a fix to Jakub zeroing sh_offset (and ignoring
NOBITS sections for its sanity checks). He didn't like it too much but we'll
You are receiving this mail because:
You are on the CC list for the bug.