Hello,

Wanted to follow up on the CTF/BTF debug info + LTO workings.

To summarize, the current status/workflow on trunk is:

- The CTF container is written out in the ctfout.c or btfout.c via the ctf_debug_finalize () API. - At this time, the ctf_debug_finalize () itself is called once in dwarf2out_early_finish ().
- Until this time, the requirements of CTF and BTF are simple.
- The generated .ctf/.BTF sections needs no demarcation of "early"/"late" debug. All of it can be generated "early". - The generated .ctf/.BTF information does not need to be different for the final assembly and the fat LTO IR.
   - The BPF CO-RE is not yet implemented on trunk.

Writing out the CTF/BTF at dwarf2out_early_finish seems to work - there will always be a .ctf/.BTF section whether it's fat or slim LTO objects (because the emission is still in dwarf2out_early_finish on the trunk). And we have functionality to copy over the .ctf/.BTF debug sections in handle_lto_debug_sections (). However, reading through some of the past emails on the CTF/BTF patch series, it seems that you have been pointing to the CTF/BTF debug info generation being broken when used with LTO. If true, I am most certainly missing some key point here.

So, before we move to the next steps of supporting additional requirements of BPF CO-RE etc., I would like to make sure that my current understanding is OK and that the current state of CTF/BTF on trunk is functional -with LTO-. I have tested some bits (with and without fat objects on x86_64) and have not run into issues.

Can you please confirm what you see amiss in the current workings of CTF/BTF with LTO on trunk ?

Thanks
Indu

Reply via email to