https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95482
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC does not by itself generate the separate .dwo file but instead the driver,
after the assembler finished, runs objcopy via ASM_FINAL_SPEC:
/* config.h can define ASM_FINAL_SPEC to run a post processor after
the assembler has run. */
#ifndef ASM_FINAL_SPEC
#define ASM_FINAL_SPEC \
"%{gsplit-dwarf: \n\
objcopy --extract-dwo \
%{c:%{o*:%*}%{!o*:%w%b%O}}%{!c:%U%O} \
%b.dwo \n\
objcopy --strip-dwo \
%{c:%{o*:%*}%{!o*:%w%b%O}}%{!c:%U%O} \
}"
#endif
so I would guess there's only small massaging necessary to get the desired
functionality (the sections are already marked SHF_EXCLUDE). Patches welcome,
just figure out the correct magic to guard the SPEC above, like maybe
"%{!gsplit-dwarf=single: %{gsplit-dwarf: ...
The choice of -gsplit-dwarf=single is probably not too nice here though.