bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/21191] objcopy --only-keep-debug creates non-monotonically


From: amodra at gmail dot com
Subject: [Bug binutils/21191] objcopy --only-keep-debug creates non-monotonically increasing section offsets
Date: Tue, 21 Feb 2017 23:57:40 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=21191

Alan Modra <amodra at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |amodra at gmail dot com
         Resolution|---                         |WONTFIX

--- Comment #1 from Alan Modra <amodra at gmail dot com> ---
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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]