Enable --build-id for All ELF Platforms
The patch enables the --build-id option for all ELF platforms in the ld testsuite by removing target-specific restrictions.
This patch removes target-specific restrictions in the ld testsuite, enabling the --build-id option for all ELF platforms. The --build-id option is defined within elf.em and should be available for all platforms matching is_elf_format.
- proposer
Removes target-specific restrictions in the ld testsuite, enabling the `--build-id` option for all ELF platforms.
“--build-id is defined within elf.em and thus should be available for all platforms matching "is_elf_format".”
- other
Asks how to trigger the test for all ELF emulations and states that they will adjust if some ELF targets don't support it.
“I don't know if there is a way to trigger this test for all ELF emulations ? `--enable-targets=all` doesn't seem to be enough. Otherwise, I'll adjust if some ELF targets don't support it.”
Technical Tradeoffs
- Enabling --build-id for all ELF platforms may expose issues on platforms where it was previously disabled.
- The patch assumes that all ELF targets support --build-id, which may not be the case.
In Details
This patch modifies the linker testsuite (ld/testsuite) to enable --build-id support for all ELF targets. The build-id is a unique identifier embedded in the linked binary, and the patch removes checks that limited its availability to specific architectures. The change relies on the fact that the --build-id functionality is defined in elf.em, which is common to all ELF targets.
For Context
This patch enables a feature called --build-id for all ELF (Executable and Linkable Format) platforms in the Binutils linker. A build-id is a unique identifier embedded in a compiled program, which can be useful for debugging and identifying the exact version of the code. The patch removes restrictions that previously limited this feature to certain platforms, making it available more broadly.