#include <string.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
-elf_machine_matches_host (Elf64_Word e_machine)
+elf_machine_matches_host (const Elf64_Ehdr *ehdr)
{
- return e_machine == EM_ALPHA;
+ return ehdr->e_machine == EM_ALPHA;
}
/* Return the link-time address of _DYNAMIC. The multiple-got-capable
: "a1"); \
}
-/* 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_ARM:
- return 1;
- default:
- return 0;
- }
+ return ehdr->e_machine == EM_ARM;
}
newvalue = value - (Elf32_Addr)reloc_addr + (addend << 2);
if (newvalue & 0xfc000003)
- newvalue = fix_bad_pc24(reloc_addr, value)
+ newvalue = fix_bad_pc24(reloc_addr, value)
- (Elf32_Addr)reloc_addr + (addend << 2);
newvalue = newvalue >> 2;
extern Elf32_Addr __hppa_make_fptr (const struct link_map *, Elf32_Addr,
struct hppa_fptr **, struct hppa_fptr *);
-/* 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)
{
- return e_machine == EM_PARISC;
+ return ehdr->e_machine == EM_PARISC;
}
.text
.globl _start
.type _start,@function
-_start:
+_start:
/* The kernel does not give us an initial stack frame. */
ldo 64(%sp),%sp
/* Save the relevant arguments (yes, those are the correct
ldw RT'_dl_loaded(%r1),%r26
ldw 0(%r26),%r26
/* envp = argv + argc + 1 */
- sh2add %r25,%r24,%r23
+ sh2add %r25,%r24,%r23
bl _dl_init,%r2
ldo 4(%r23),%r23 /* delay slot */
#include <sys/param.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
-elf_machine_matches_host (Elf32_Half e_machine)
+elf_machine_matches_host (const Elf32_Ehdr *ehdr)
{
- switch (e_machine)
- {
- case EM_68K:
- return 1;
- default:
- return 0;
- }
+ return ehdr->e_machine == EM_68K;
}
(ElfW(Addr)) (r); \
} while (0)
-/* 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 (ElfW(Half) e_machine)
+elf_machine_matches_host (const ElfW(Ehdr) *ehdr)
{
- switch (e_machine)
+ switch (ehdr->e_machine)
{
case EM_MIPS:
case EM_MIPS_RS3_LE:
(ElfW(Addr)) (r); \
} while (0)
-/* 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 (ElfW(Half) e_machine)
+elf_machine_matches_host (const ElfW(Ehdr) *ehdr)
{
- switch (e_machine)
+ switch (ehdr->e_machine)
{
case EM_MIPS:
case EM_MIPS_RS3_LE: