Revision abcd5da7 dyngen.c
b/dyngen.c | ||
---|---|---|
25 | 25 |
#include <unistd.h> |
26 | 26 |
#include <fcntl.h> |
27 | 27 |
|
28 |
#include "config.h" |
|
28 |
#include "config-host.h"
|
|
29 | 29 |
|
30 | 30 |
/* elf format definitions. We use these macros to test the CPU to |
31 | 31 |
allow cross compilation (this tool must be ran on the build |
... | ... | |
108 | 108 |
#define SHT_RELOC SHT_REL |
109 | 109 |
#endif |
110 | 110 |
|
111 |
#define NO_THUNK_TYPE_SIZE |
|
112 |
#include "thunk.h" |
|
111 |
#include "bswap.h" |
|
113 | 112 |
|
114 | 113 |
enum { |
115 | 114 |
OUT_GEN_OP, |
... | ... | |
648 | 647 |
{ |
649 | 648 |
ElfW(Sym) *sym; |
650 | 649 |
const char *sym_name, *p; |
651 |
target_ulong val;
|
|
650 |
unsigned long val;
|
|
652 | 651 |
int n; |
653 | 652 |
|
654 | 653 |
for(i = 0, sym = symtab; i < nb_syms; i++, sym++) { |
... | ... | |
663 | 662 |
if (!ptr) |
664 | 663 |
error("__op_labelN in invalid section"); |
665 | 664 |
offset = sym->st_value; |
666 |
val = *(target_ulong *)(ptr + offset);
|
|
665 |
val = *(unsigned long *)(ptr + offset);
|
|
667 | 666 |
#ifdef ELF_USES_RELOCA |
668 | 667 |
{ |
669 | 668 |
int reloc_shndx, nb_relocs1, j; |
... | ... | |
687 | 686 |
|
688 | 687 |
if (val >= start_offset && val < start_offset + copy_size) { |
689 | 688 |
n = strtol(p, NULL, 10); |
690 |
fprintf(outfile, " label_offsets[%d] = %d + (gen_code_ptr - gen_code_buf);\n", n, val - start_offset); |
|
689 |
fprintf(outfile, " label_offsets[%d] = %ld + (gen_code_ptr - gen_code_buf);\n", n, val - start_offset);
|
|
691 | 690 |
} |
692 | 691 |
} |
693 | 692 |
} |
Also available in: Unified diff