Re: [PATCH] powerpc: Include .BTF section

From
Naveen N. Rao <hidden>
Date
2020-02-24 04:06:53
Reply to
Michael Ellerman, 2020-02-24
Michael Ellerman wrote:
"Naveen N. Rao" [off-list ref] writes:
quoted
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.
Thread (5 messages) 5 messages, 3 authors, last reply 2020-02-27
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help