bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/12921] sh_offset for SHT_NOBITS sections


From: jakub at redhat dot com
Subject: [Bug ld/12921] sh_offset for SHT_NOBITS sections
Date: Thu, 23 Jun 2011 07:32:52 +0000

http://sourceware.org/bugzilla/show_bug.cgi?id=12921

--- Comment #3 from Jakub Jelinek <jakub at redhat dot com> 2011-06-23 07:32:34 
UTC ---
The intention of prelink --undo is that it reverts the binary/shared library to
the original, bitwise, content.  During prelinking the binary/shared library
usually grows, and on undo prelink feeds the saved ElfXX_Shdr/ElfXX_Phdr etc.
content to libelf to restore the file.  And, apparently sh_offset beyond end of
file mean at least for elfutils libelf that it pads with zeros up to that spot.

Of course one could probably tweak libelf (haven't tried the other
implementation how it behaves nor looked how hard would it be), but the
question is why is such an sh_offset desirable.  When the section has no
content in the file (SHT_NOBITS or zero sized section), why can't sh_offset
simply be what it used to (either equal to sh_offset of the next section, or of
last section + its in the file size)?

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- 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]