Fix for PR ld/20815 doesn't allow to build a working kernel

Nick Clifton nickc@redhat.com
Mon Nov 28 12:45:00 GMT 2016


Hi Matthias,

> https://bugs.debian.org/845690 reports that trunk 20161124 doesn't allow to
> build a working kernel on at least x86_64.  I verified that reverting the fix
> for PR ld/20815 allows to build a working kernel again.

I think that Alan is probably right - it is likely to be the code that sorts
the program headers into ascending order of p_vaddr that is causing the problem.
(It would be nice if the kernel could actually tell us what is wrong however).

Rather than revert the whole patch, since doing so does allow the linker to
silently create broken binaries, would it be possible for you to try out the 
attached patch instead ?  (Actually there are two attachments: pr20815.elf.c.patch
is the change that you need to revert the sorting of PT_LOAD segments, and which
should allow you to test to see if it is sufficient to produce working kernels.
pr20815.rest.patch is a fix to the linker testsuite to adjust the tests that would
fail with the elf.c patch applied, and a patch to the readelf program to stop it
from complaining about binaries with out of order PT_LOAD segments).

Cheers
  Nick

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr20815.elf.c.patch
Type: text/x-patch
Size: 3843 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20161128/21f30561/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr20815.rest.patch
Type: text/x-patch
Size: 2356 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20161128/21f30561/attachment-0001.bin>


More information about the Binutils mailing list