[PATCH] powerpc/32: Include .branch_lt in data section

Michael Ellerman mpe at ellerman.id.au
Thu Nov 15 23:47:52 AEDT 2018


Alan Modra <amodra at gmail.com> writes:

> On Wed, Nov 14, 2018 at 01:32:18PM +1030, Joel Stanley wrote:
>> When building a 32 bit powerpc kernel with Binutils 2.31.1 this warning
>> is emitted:
>> 
>>  powerpc-linux-gnu-ld: warning: orphan section `.branch_lt' from
>>  `arch/powerpc/kernel/head_44x.o' being placed in section `.branch_lt'
>> 
>> As of binutils commit 2d7ad24e8726 ("Support PLT16 relocs against local
>> symbols")[1], 32 bit targets can produce .branch_lt sections in their
>> output.
>> 
>> Include these symbols in the .data section as the ppc64 kernel does.
>> 
>> [1] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=2d7ad24e8726ba4c45c9e67be08223a146a837ce
>> Signed-off-by: Joel Stanley <joel at jms.id.au>
> Reviewed-by: Alan Modra <amodra at gmail.com>
>
> Looks fine to me.
>
>> ---
>> I wasn't sure where this should go or if the ordering matters.
>
> The usual answer is: "Look at where the section goes in the standard
> linker scripts."   But that doesn't apply here.  The section will be
> empty for a kernel build so it doesn't matter where it goes.

If it's empty why don't we just discard it?

cheers


More information about the Linuxppc-dev mailing list