LLD .BTF section patch
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest1 patch 14 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/1 | btf_encoder: Generate a new .BTF section even if one existsbtf_encoder.c | +54 | 13 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH dwarves 0/1] LLD .BTF section patch
This patch is an attempted fix for the issue discussed in [1]. I believe it's actually caused by pahole generating a corrupted ELF file.
LLD generates a zero-sized .BTF section, while BFD doesn't. When pahole goes to add the .BTF data to an LLD-generated file, the section exists, but is too small. The ELF calls don't appear to adjust following sections' addresses in this case.
To avoid this, the patch does some magic with objcopy to generate a separate .BTF section and perform some renaming.
NOTE: This patch resembles a hack. If it's possible to adjust a section's size with ELF calls we should do it that way.
[1]: https://lore.kernel.org/dwarves/[email protected]/
Bill Wendling (1):
btf_encoder: Generate a new .BTF section even if one exists
btf_encoder.c | 88 +++++++++++++++++++++++++++++++-------------------- 1 file changed, 54 insertions(+), 34 deletions(-)
Signature · 1 line
2.38.1.584.g0f3c55d4c2-goog