[OE-core] [PATCH] kernel-arch: Force BFD kernel when using gcc for linking

Khem Raj raj.khem at gmail.com
Wed Aug 19 22:52:16 UTC 2015


On Wed, Aug 19, 2015 at 1:12 PM, Burton, Ross <ross.burton at intel.com> wrote:
> On 19 August 2015 at 20:59, Nathan Lynch <Nathan_Lynch at mentor.com> wrote:
>>
>> On 08/19/2015 12:44 PM, Khem Raj wrote:
>> > We redefine LD to point to ld.bfd when building kernel, which works in
>> > most cases since kbuild system calls out for bare LD most of the time,
>> > however some of newer kernels e.g. 4.1+ have some code added which can
>> > call gcc directly to do the linking job e.g. arm vdso code
>> >
>> > This causes build failures when we have configured the default cross
>> > toolchain to use gold linker as default. Errors like
>> >
>> > BFD: arch/arm/vdso/vdso.so: Not enough room for program headers, try
>> > linking with -N
>> > | arm-angstrom-linux-gnueabi-objcopy:arch/arm/vdso/vdso.so[.hash]: Bad
>> > value
>> >
>> > start happening.
>> >
>> > With this patch we force gcc to choose bfd linker as well
>>
>>
>> This is fixed upstream as of:
>>
>> commit d2b30cd4b7223a96e606dfc8120626f66d81e091
>> Author: Nathan Lynch <nathan_lynch at mentor.com>
>> Date:   Wed Jun 3 00:41:15 2015 +0100
>>
>>     ARM: 8384/1: VDSO: force use of BFD linker
>>
>> which should make it to 4.1-stable soon.

it fixes one case yes, there could be many more to come. We want to
make sure that we use bfd ld through out the kernel.

>
>
>  CC'ing Bruce.
>
> I'll stage the fix from Khem in my master-unde-test branch.  Bruce: if you
> end up merging this fix into the oe-core kernels, please remind me to revert
> Khem's patch. :)

There is no need to revert it. Since it convey's what we want to do in
more comprehensive way i.e. to use bfd linker for all kernel links in
all forms.
 It covers us for future issues of similar kind



More information about the Openembedded-core mailing list