[PATCH] ELF: Properly copy and strip Solaris binaries

H.J. Lu hjl.tools@gmail.com
Tue Dec 30 23:29:38 GMT 2025


On Wed, Dec 31, 2025 at 6:57 AM Alan Modra <amodra@gmail.com> wrote:
>
> On Sat, Dec 27, 2025 at 10:14:03AM +0800, H.J. Lu wrote:
> > * bfd.c (bfd_elf_target_os): New.
> > (bfd): Add elf_target_os.
> > * elf-bfd.h (elf_target_os): Removed.
>
> Why do we need another target_os?  There's one in the linker hash
> table and one in elf_backend_data.  You have access to the latter and
> EI_OSABI via the bfd.

Since elf_strtab_flags is hardcoded in elf_backend_data which can't be
changed, I need to mark Solaris binary in BFD for generic ELF targets
so that elf_strtab_flags can be changed for Solaris binary when generic
ELF targets are used.

> --
> Alan Modra



-- 
H.J.


More information about the Binutils mailing list