https://sourceware.org/bugzilla/show_bug.cgi?id=19938

--- Comment #34 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Alan Modra <[email protected]>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4bc3f403c566ce1319583779dc483f7e43e4fd3e

commit 4bc3f403c566ce1319583779dc483f7e43e4fd3e
Author: Alan Modra <[email protected]>
Date:   Fri Jan 2 08:22:02 2026 +1030

    Solaris .strtab and .shstrtab flags

    These sections have SHF_STRINGS in sh_flags on Solaris.  Commit
    84865015459b in part implemented this variation by an elf_backend_data
    field used to set the flags, but that only works of course if one of
    the solaris targets is used.  Which in some ways is fair enough.  If
    you want solaris support then it is reasonable to require the solaris
    targets to be compiled in.  However if they are not the default, other
    ELF targets may be used even when the solaris targets are compiled in,
    because many ELF targets allow any ELFOSABI object to match.  (Which
    is arguably a bug.)

    So instead of the current scheme this patch implements the solaris
    specific sh_flags in _bfd_elf_final_write_processing.  That way either
    a solaris target being used, or ELFOSABI_SOLARIS in the object will
    get the correct sh_flags.

            PR 19938
            * elf-bfd.h (struct elf_backend_data): Delete elf_strtab_flags.
            * elf.c (_bfd_elf_final_write_processing): Handle solaris
            peculiarities here.
            (_bfd_elf_compute_section_file_positions): Leave shstrtab sh_flags
            zero, and don't re-zero other fields.
            (swap_out_syms): Similarly for sym strtab.
            * elflink.c (_bfd_elf_final_link): Likewise.
            * elf32-i386.c (elf_backend_strtab_flags): Don't define.
            * elf32-sparc.c: Likewise.
            * elf64-sparc.c: Likewise.
            * elf64-x86-64.c: Likewise.
            * elfxx-target.h: Likewise.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to