Re: [PATCH] x86/boot: Refuse to build with data relocations

From: H. Peter Anvin
Date: Fri May 13 2016 - 16:45:32 EST


On 05/12/16 15:54, Kees Cook wrote:
>>
>> It would be far better to warn on the *type* of relocations rather than in which section they feel.
>
> I'm open to specific changes. What's the best way to detect what you want here?
>

Use readelf -r and look for inappropriate relocation types (which are
basically the same ones that we should have to muck with for the main
kernel in relocs.c.)

-hpa