[PATCH] ld/testsuite: enable build-id for ELF platforms
Alan Modra
amodra@gmail.com
Tue Jun 2 10:45:46 GMT 2026
On Tue, Jun 02, 2026 at 06:38:01PM +0930, Alan Modra wrote:
> On Fri, May 29, 2026 at 03:32:54PM +0200, Clément Chigot wrote:
> > --build-id is defined within elf.em and thus should be available for
> > all platforms matching "is_elf_format".
>
> No, there are ELF targets that don't use elf.em. See lib/ld-lib.exp
> uses_genelf. I think the test should be using
>
> if { ![is_elf_format] || [uses_genelf] } {
> return
> }
>
> and no other exclusions. I'll see if that is correct.
I'll apply the following. spu-elf fails the tests due to a readelf
complaint:
Displaying notes found in: .note.spu_name
readelf: Warning: Corrupt note: alignment 16, expecting 4 or 8
diff --git a/ld/testsuite/ld-elf/build-id.exp b/ld/testsuite/ld-elf/build-id.exp
index cabbcbd289a..6899cdbf2a2 100644
--- a/ld/testsuite/ld-elf/build-id.exp
+++ b/ld/testsuite/ld-elf/build-id.exp
@@ -19,23 +19,10 @@
# MA 02110-1301, USA.
#
-# Exclude non-ELF targets.
-
-if ![is_elf_format] {
- return
-}
-
-if { [istarget frv-*-*] || [istarget lm32-*-*] } {
+if { ![is_elf_format] || [uses_genelf] } {
return
}
-if { !([istarget *-*-linux*]
- || [istarget arm*-*-uclinuxfdpiceabi]
- || [istarget *-*-gnu*]) } then {
- return
-}
-
-
set stylelist {"" "--build-id" "--build-id=none" "--build-id=md5"
"--build-id=sha1" "--build-id=guid" "--build-id=0xdeadbeef"}
--
Alan Modra
More information about the Binutils
mailing list