aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/sh/dl-machine.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/sh/dl-machine.h')
-rw-r--r--sysdeps/sh/dl-machine.h12
1 files changed, 3 insertions, 9 deletions
diff --git a/sysdeps/sh/dl-machine.h b/sysdeps/sh/dl-machine.h
index 1530f946f8..dd21dfbb9c 100644
--- a/sysdeps/sh/dl-machine.h
+++ b/sysdeps/sh/dl-machine.h
@@ -28,17 +28,11 @@
#include <assert.h>
-/* 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 __attribute__ ((unused))
-elf_machine_matches_host (Elf32_Half e_machine)
+elf_machine_matches_host (const Elf32_Ehdr *ehdr)
{
- switch (e_machine)
- {
- case EM_SH:
- return 1;
- default:
- return 0;
- }
+ return ehdr->e_machine == EM_SH;
}