diff options
author | Ulrich Drepper <drepper@redhat.com> | 1999-08-10 05:14:30 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1999-08-10 05:14:30 +0000 |
commit | 1af43fd7eb3228cab7495fe101a8fe281e77f0a8 (patch) | |
tree | 2e3d67773b6d14711fb60750bead45b60ef1029c /sysdeps | |
parent | bb7b8af37b0c413892549db23e3896905ed6ef56 (diff) |
Define ARM specific versions of VALID_ELF_HEADER, VALID_ELF_OSABI,
VALID_ELF_ABIVERSION.
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/arm/dl-machine.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 754a6caa13..eea2f4ced0 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -26,6 +26,15 @@ #include <assert.h> +#define VALID_ELF_ABIVERSION(ver) (ver == 0) +#define VALID_ELF_OSABI(osabi) \ + ((osabi == ELFOSABI_SYSV) || (osabi == ELFOSABI_ARM)) +#define VALID_ELF_HEADER(hdr,exp,size) ( \ + memcmp(hdr,exp,size-2) == 0 && \ + VALID_ELF_OSABI(hdr[EI_OSABI]) && \ + VALID_ELF_ABIVERSION(hdr[EI_ABIVERSION]) \ +) + /* Return nonzero iff E_MACHINE is compatible with the running host. */ static inline int __attribute__ ((unused)) elf_machine_matches_host (Elf32_Half e_machine) |