[PATCH] powerpc: Include .BTF section

Michael Ellerman mpe at ellerman.id.au
Mon Feb 24 22:03:51 AEDT 2020


"Naveen N. Rao" <naveen.n.rao at linux.vnet.ibm.com> writes:
> Michael Ellerman wrote:
>> "Naveen N. Rao" <naveen.n.rao at linux.vnet.ibm.com> writes:
>>> Selecting CONFIG_DEBUG_INFO_BTF results in the below warning from ld:
>>>   ld: warning: orphan section `.BTF' from `.btf.vmlinux.bin.o' being placed in section `.BTF'
>>>
>>> Include .BTF section in vmlinux explicitly to fix the same.
>> 
>> I don't see any other architectures doing this in their linker script.
>> Why are we special?
>
> I think this is due to commit 83a092cf95f28 ("powerpc: Link warning for 
> orphan sections"):
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=83a092cf95f28

Oh haha, right :}

> PS: I also see a linker warning for '.gnu.hash' if I enable 
> CONFIG_RELOCATABLE, but I couldn't decipher what that was for, and if it 
> should be retained.

Yeah, Joel tried to remove it but it caused breakage:

  https://lore.kernel.org/linuxppc-dev/87d0pwqweg.fsf@concordia.ellerman.id.au/


I never got around to looking at it.

cheers


More information about the Linuxppc-dev mailing list