]> git.wh0rd.org - ICEs.git/blob - bfin-text-sect-attrs/ldso.i
more
[ICEs.git] / bfin-text-sect-attrs / ldso.i
1 typedef unsigned int uint32_t;
2 typedef uint32_t Elf32_Addr;
3 typedef struct {
4 unsigned char e_ident[(16)];
5 } Elf32_Ehdr;
6 typedef struct {
7 } Elf32_Dyn;
8 static void
9 __attribute__ ((used)) _dl_start(Elf32_Addr dl_boot_got_pointer,
10 struct elf32_fdpic_loadmap
11 *dl_boot_progmap,
12 struct elf32_fdpic_loadmap
13 *dl_boot_ldsomap,
14 Elf32_Dyn * dl_boot_ldso_dyn_pointer,
15 struct funcdesc_value *dl_main_funcdesc,
16 unsigned long args)
17 {
18 Elf32_Ehdr *header;
19 uint32_t *p32;
20 if (!header || header->e_ident[4] != 1 || header->e_ident[6] != 1
21 || *(p32 =
22 (uint32_t *) & header->e_ident) !=
23 ((uint32_t) (0x7f + 0x100 * ('E' + (0x100 * ('L' + 0x100 * 'F'))))))
24 {
25 do {
26 static const char
27 __attribute__ ((section(".text"))) __s[] =
28 ("Invalid ELF header\n");
29 {
30 int __t;
31 for (__t = 0; __t < 0x1000000; __t++)
32 __asm__ __volatile__("");
33 }
34 }
35 while (0);
36 }
37 }