[PATCH v5 00/12] PR ld/24600: Add general linker support for mapless archives
Maciej W. Rozycki
macro@orcam.me.uk
Wed Jan 28 10:55:00 GMT 2026
Hi,
This is v5 of a patch series to add linker support for mapless archives
and `--start-lib'/`--end-lib' command line options, rebased on top of
commit d75f191dc631 ("PR 33821 use after free commit e6357caf7579") and
the 2.46 version bump, and also addressing further feedback received for
v3 since v4 has been posted.
Here's an overview of the updated set yet outstanding:
1. Unset the format on releasing a BFD's objalloc memory.
2. Sanitize back end flavour for external symbols retrieval with aout
BFDs.
3. Correct archive format determination for non-default link emulations.
4. Make the file position consistently unsigned in symbol maps.
5. Add a BFD pointer member to `struct carsym' (symbol map).
6. Expand support for mapless archives across all the BFD linkers (beyond
just XCOFF).
7. Add `--link-mapless'/`--no-link-mapless' LD options to control the new
feature, on by default (and now switchable off for XCOFF too, but not
effective for Alpha/VMS whose archive format does not support omitting
an index).
8. Guard NULL pointer use with assertions in LD where adding a new input
file.
9. Factor out input file insertion in LD.
10. Add a BFD pointer member to structures referring to archive members.
11. Add fake archive support to BFD as a list of member BFDs supplied.
12. Add `--start-lib'/`--end-lib' LD options and a corresponding linker
script feature building upon the fake archive BFD feature.
See individual change descriptions for details.
This has been verified across 250 targets, causing no regressions and
adding no failures in new tests.
OK to apply?
Previous iterations:
- v4 at: <https://inbox.sourceware.org/binutils/alpine.DEB.2.21.2601061929190.45251@angie.orcam.me.uk/>.
- v3 at: <https://inbox.sourceware.org/binutils/alpine.DEB.2.21.2511191836470.57987@angie.orcam.me.uk/>.
- v2 at: <https://inbox.sourceware.org/binutils/alpine.DEB.2.21.2511050716450.25436@angie.orcam.me.uk/>.
- v1 at: <https://inbox.sourceware.org/binutils/alpine.DEB.2.21.2509251408330.15999@angie.orcam.me.uk/>.
Maciej
More information about the Binutils
mailing list