https://sourceware.org/bugzilla/show_bug.cgi?id=20828
--- Comment #43 from Sourceware Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Maciej W. Rozycki <[email protected]>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a5b91b33252959d679a777dd6a455f11b91f90a1 commit a5b91b33252959d679a777dd6a455f11b91f90a1 Author: Maciej W. Rozycki <[email protected]> Date: Wed Feb 18 07:58:31 2026 +0000 MIPS/BFD: Avoid section ordering breaking DYNAMIC segment for IRIX 5 With MIPS targets using the IRIX 5 linker emulation the DYNAMIC segment, unusually, gets all of: `.dynamic', `.hash', `.dynsym', and `.dynstr' sections mapped to, as well as any other sections placed in between. No attention is paid as to which of these sections comes first though, which would make such a DYNAMIC segment unusable at load time unless it starts with the `.dynamic' section, if not for LD terminating the link with: The first section in the PT_DYNAMIC segment is not the .dynamic section error message. Our standard linker scripts ensure the correct section ordering, however a user-supplied script may not, and it seems suboptimal to prevent users from reordering sections to their liking. Modify MIPS IRIX 5 linker emulation handling then so that only `.hash', `.dynsym', and `.dynstr' sections that come after `.dynamic' in output, and any other sections placed in between, get mapped to the DYNAMIC segment. This preserves exact IRIX 5 semantics for all the conforming scripts, while letting people use a different order rather than getting a link error. The error result previously issued means there is no backwards compatibility to consider as no output used to be produced. This removes a number of test failures: -FAIL: PROVIDE_HIDDEN test (auxiliary shared object) -FAIL: PROVIDE_HIDDEN test 4 -FAIL: PROVIDE_HIDDEN test 6 -FAIL: PROVIDE_HIDDEN test 10 -FAIL: PROVIDE_HIDDEN test 12 -FAIL: readelf version information -FAIL: PR ld/20828 forcibly exported symbol version without section GC -FAIL: PR ld/21233 dynamic symbols with section GC (auxiliary shared library) across MIPS targets using the IRIX 5 linker emulation, such as `mips-sgi-irix5', `mips-elf', `mips-rtems', etc. -- You are receiving this mail because: You are on the CC list for the bug.
