This is the mail archive of the
mailing list for the binutils project.
Re: Fix for PR ld/20815 doesn't allow to build a working kernel
On 28.11.2016 13:45, Nick Clifton wrote:
> 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).
yes, according to Sven's comment in the bug report, that works.