[PATCH v2 3/5] bfd: avoid elf-sframe.c for SFrame-unaware targets
Rainer Orth
ro@CeBiTec.Uni-Bielefeld.DE
Sat Mar 7 08:00:54 GMT 2026
Hi Indu,
> Is the case of adding elf-sframe.lo to fbsd_vec due to the following
> (config.bfd) ?
>
> x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu)
> targ_defvec=x86_64_elf64_fbsd_vec
> targ_selvecs="i386_elf32_fbsd_vec iamcu_elf32_vec i386_coff_vec
> i386_pei_vec x86_64_pe_vec x86_64_pei_vec i386_elf32_vec
> x86_64_elf64_vec"
> want64=true
> ;;
>
> Also for sol2, do you think we should include elf-sframe.lo ? (I understand
> that your patch is making things cleaner than status quo.)
>
> In essence, my concern is "leaking" SHT_GNU_SFRAME section type to freebsd
> and solaris. To that end (unrelated to the current patch), is there a good
> way to detect OS (specifically GNU) in GAS ? I thought about doing
> something like 'endswith (TARGET_OS, "gnu")' ...
I don't think this is a good idea in general: non-GNU OSes *have*
adopted GNU extensions after all, both the BSDs and Solaris.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
More information about the Binutils
mailing list