Failed to build rescue with gcc 4.9

Garrett Cooper yaneurabeya at gmail.com
Fri Apr 3 21:15:54 UTC 2015


On Apr 3, 2015, at 14:10, Warner Losh <imp at bsdimp.com> wrote:

>> 
>> On Apr 3, 2015, at 2:39 PM, Ed Maste <emaste at freebsd.org> wrote:
>> 
>> On 3 April 2015 at 13:02, Warner Losh <imp at bsdimp.com> wrote:
>>> That shows that something in the list is needed. Likely only crunchhide.
>>> 
>>> It doesn’t tell us why we need it, or when we started needing it, or what
>>> other conditions we might need it. This information is critical to document
>>> so we know when we can stop doing it in the future. I’m extremely reluctant
>>> to commit this until we know these details.
>> 
>> Yes, it's crunchide. It was broken prior to r277259:
>> 
>> |    crunchide: Correct 64-bit section header offset
>> |
>> |    For 64-bit binaries the Elf_Ehdr e_shoff is at offset 40, not 44.
>> |    Instead of using an incorrect hardcoded offset, let the compiler
>> |    figure it out for us with offsetof().
>> |
>> |    Differential Revision: https://reviews.freebsd.org/D1543
>> 
>> It's not completely clear to me why we did not encounter this before;
>> a comment before the erroneous write states:
>> 
>> /*
>> * update the offset of section header table in elf
>> * header if needed.
>> */
>> 
>> so I presume something about the object file created by gcc 4.9 causes
>> this code to be executed, while builds using the in-tree compiler did
>> not.
> 
> Ah Yes! I remember now! We should find the FreeBSD version at that date
> and either build it when we’re cross compiling, or rebuild it when we’re
> bootstrapping.
> 
> Thanks for finding this Ed.

These numbers need to be bumped by 1, but here they are (this also wasn’t backported to stable/8 or stable/9 AFAICT).
Cheers!

head:

$ svn cat -r r277259 ^/head/sys/sys/param.h  | grep '#define.*__FreeBSD_version' | awk '{ print $3 }’
1100054

stable/10:

$ svn cat -r 277557 ^/stable/10/sys/sys/param.h | grep '#define.*__FreeBSD_version' | awk '{ print $3 }'
1001506

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 496 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/freebsd-testing/attachments/20150403/7def087e/attachment.sig>


More information about the freebsd-testing mailing list