unsubmitted-ldso-machine-mismatch
authorGNU Libc Maintainers <debian-glibc@lists.debian.org>
Sun, 13 Apr 2025 19:40:49 +0000 (21:40 +0200)
committerAurelien Jarno <aurel32@debian.org>
Sun, 13 Apr 2025 19:40:49 +0000 (21:40 +0200)
Gbp-Pq: Topic any
Gbp-Pq: Name unsubmitted-ldso-machine-mismatch.diff

elf/dl-load.c

index e4e7675ab48529bb15eda31c8ca06b6f60b18bc0..ca418e5e3afebd428c6df8481c4c9815719d6da0 100644 (file)
@@ -1658,6 +1658,14 @@ open_verify (const char *name, int fd,
              return -1;
            }
 #endif
+         else if (! __builtin_expect (elf_machine_matches_host (ehdr), 1))
+           {
+             /* Another non-fatal error, let's skip right past the
+                the libraries obviously built for other machines.  */
+             __close_nocancel (fd);
+             __set_errno (ENOENT);
+             return -1;
+           }
          else if (ehdr->e_ident[EI_DATA] != byteorder)
            {
              if (BYTE_ORDER == BIG_ENDIAN)