https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113000
Bug ID: 113000 Summary: Generate BTF always in early-finish regardless of CO-RE Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug Assignee: unassigned at gcc dot gnu.org Reporter: jemarch at gcc dot gnu.org Target Milestone: --- The BPF CO-RE support requires storing information relevant to the BTF debug info in the .BTF.ext section. In particular: * The CO-RE relocation strings contain references to BTF types, by type ID. * The CO-RE information includes strings that are stored in the BTF string section. Because of the above, we are generating BTF (call to ctf_debug_finish) in dwarf2out's early_finish if no -mco-re is specified, but the call is done in dwarf2out's finish instead if -mco-re is specified. This implies that there are differences in the output (also in CTF) because for example entries for inlined functions are no longer present at 'finish' time but they are at 'early_finish' time. We should change GCC so it always calls ctf_debug_finish in early_finish, regardless of whether CO-RE relocs are being generated or not.