diff options
Diffstat (limited to 'sysdeps/sparc')
-rw-r--r-- | sysdeps/sparc/sparc32/dl-machine.h | 8 | ||||
-rw-r--r-- | sysdeps/sparc/sparc64/dl-machine.h | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/sysdeps/sparc/sparc32/dl-machine.h b/sysdeps/sparc/sparc32/dl-machine.h index cd91addda5..c1d423aa36 100644 --- a/sysdeps/sparc/sparc32/dl-machine.h +++ b/sysdeps/sparc/sparc32/dl-machine.h @@ -43,13 +43,13 @@ : "/etc/ld.so.preload") -/* Return nonzero iff E_MACHINE is compatible with the running host. */ +/* Return nonzero iff ELF header is compatible with the running host. */ static inline int -elf_machine_matches_host (Elf32_Half e_machine) +elf_machine_matches_host (const Elf32_Ehdr *ehdr) { - if (e_machine == EM_SPARC) + if (ehdr->e_machine == EM_SPARC) return 1; - else if (e_machine == EM_SPARC32PLUS) + else if (ehdr->e_machine == EM_SPARC32PLUS) { unsigned long *hwcap; weak_extern (_dl_hwcap); diff --git a/sysdeps/sparc/sparc64/dl-machine.h b/sysdeps/sparc/sparc64/dl-machine.h index 6aa9ca6659..079e1d7530 100644 --- a/sysdeps/sparc/sparc64/dl-machine.h +++ b/sysdeps/sparc/sparc64/dl-machine.h @@ -27,11 +27,11 @@ #define ELF64_R_TYPE_ID(info) ((info) & 0xff) #define ELF64_R_TYPE_DATA(info) ((info) >> 8) -/* Return nonzero iff E_MACHINE is compatible with the running host. */ +/* Return nonzero iff ELF header is compatible with the running host. */ static inline int -elf_machine_matches_host (Elf64_Half e_machine) +elf_machine_matches_host (const Elf64_Ehdr *ehdr) { - return e_machine == EM_SPARCV9; + return ehdr->e_machine == EM_SPARCV9; } /* Return the link-time address of _DYNAMIC. Conveniently, this is the |