Summary: | --build-id doesn't work | ||
---|---|---|---|
Product: | binutils | Reporter: | Jakub Jelinek <jakub> |
Component: | ld | Assignee: | unassigned |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | amodra, hjl.tools, nickc |
Priority: | P2 | ||
Version: | 2.22 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: |
Description
Jakub Jelinek
2011-01-28 13:45:39 UTC
Actually, it seems upstream binutils probably never handled it right and it seems Fedora had some local patch for it that got dropped as redundant when it actually has never been redundant. In elf_checksum_contents it checksums contents of sections guarded with if (i_shdr.contents) Except, at least in my testing, i_shdr.contents is always NULL so it only checksums section headers, program headers and ELF header. See <https://bugzilla.redhat.com/show_bug.cgi?id=472152> for the original bug report and <https://bugzilla.redhat.com/show_bug.cgi?id=501582> for a follow-up bug. Hi Jakub,
> Actually, it seems upstream binutils probably never handled it right and it
> seems Fedora had some local patch for it that got dropped as redundant when it
> actually has never been redundant.
Sorry about that - it was my fault. I looked at the code and thought
that the problem had been fixed by some other changes but I failed to
make sure that this assumption was correct. :-(
Cheers
Nick
CVSROOT: /cvs/src Module name: src Changes by: nickc@sourceware.org 2011-12-14 11:50:14 Modified files: bfd : ChangeLog elfcode.h compress.c Log message: PR ld/12451 * elfcode.h (elf_checksum_contents): Read in the section's contents if they are not already available. * compress.c (bfd_get_full_section_contents): Use zmalloc to allocate the buffers so that excess bytes are guaranteed to be zero. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/ChangeLog.diff?cvsroot=src&r1=1.5542&r2=1.5543 http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/elfcode.h.diff?cvsroot=src&r1=1.109&r2=1.110 http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/compress.c.diff?cvsroot=src&r1=1.9&r2=1.10 Hi Guys, Sorry about dropping the ball on this one. I have now checked in the patch to zero the compressed sections when they are loaded and to force the loading of unloaded sections when computing checksums. This should fix build-ids so that they are now consistent. Cheers Nick For anyone rummaging through bugzilla, please note the followup: http://sourceware.org/ml/binutils-cvs/2011-12/msg00074.html *** Bug 260998 has been marked as a duplicate of this bug. *** Seen from the domain http://volichat.com Page where seen: http://volichat.com/adult-chat-rooms Marked for reference. Resolved as fixed @bugzilla. |