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.

_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to