[PATCH 0/8] PR ld/24600: Add general linker support for mapless archives
Maciej W. Rozycki
macro@orcam.me.uk
Fri Sep 26 23:53:06 GMT 2025
Hi,
This is the first stage in adding support for `--start-lib'/`--end-lib'
linker command line options, expanding linker support for archives with no
symbol map present across all the targets and archive formats.
As this effort revealed numerous issues in archive handling both for
already supported scenarios with a symbol map involved and for the new
scenarios with no symbol map present, as well as a missing cleanup, I've
split this into a patch set. Here's an overview of the set:
1. Add new LD testcases for a bunch of archive scenarios, covering PR
binutils/33484 and PR binutils/33485 in particular.
2. Add new LD testcases covering the rejection of archives with no symbol
map present (except for XCOFF targets, which already accept such
archives).
3. Remove `struct orl' embedded union's member that has never been used.
4. Add same member to `struct carsym'.
5. Fix a crash on an attempt to free an uninitialized section hash.
6. Unset the format on releasing a BFD's objalloc memory.
7. Expand support for mapless archives across all the BFD linkers (beyond
just XCOFF).
8. Add `--link-mapless'/`--no-link-mapless' LD options to control the new
feature, on by default (and now switchable off for XCOFF too).
See individual change descriptions for details.
This has been verified across 242 targets, causing no regressions and
adding no failures in new tests except for `cris*-*-*' targets, discussed
in detail in 7/8.
OK to apply?
Maciej
More information about the Binutils
mailing list