Michael Ellerman wrote:
"Naveen N. Rao" <naveen.n....@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
If your question was why I didn't include the .BTF section in .data,
it's because libbpf seems to expect the .BTF section to be separate.
- Naveen
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.