[Bug debug/101283] Several tests fail on Darwin with -gctf

iains at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jul 1 16:32:17 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101283

--- Comment #3 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Indu Bhagat from comment #2)
> I see that .section directive needs a different semantic for Darwin.  The
> DWARF debug_info section, for example, appears as:
> 
>         .section __DWARF,__debug_info,regular,debug
> Lsection__debug_info:
> Ldebug_info0:
> 
> This implies GCC needs to emit the .ctf section adhering to the required
> semantics. I see now that this recent commit adds the required CTF section
> name strings explicitly for Darwin (config/darwin.h).

that's all fixed with the patch above.. .. but ..

> Not only that, accompanying changes need to be made in gas/bfd to support
> the new __CTF category or the CTF section ?

Well .. how this new feature will be used on non-ELF platforms remains to be
seen.

If there is no platform consumer for the format, then I imagine that the
take-up will be slow.

Darwin does not use GAS/binutils by default, the assembler comes from LLVM, the
"binutils" come in part from LLVM and in part from Apple's "cctools" package. 
Unless there is support for CTF in LLDB the majority of Darwin users will not
be able to make use of it.

GDB can (probably) be built for Darwin (there were some issues last time I
tried), but if there are BFD changes needed? 

There are also test fails which are most likely from Darwin's optimisation of
DWARF debug to eliminate most relocations (by using file-offsets from which the
addresses can be computed by the DWARF importer).  TBH I have not looked at any
of this (and Darwin is not the only non-ELF platform)


More information about the Gcc-bugs mailing list