#define SHT_RELOC SHT_REL
#endif
+#define NO_THUNK_TYPE_SIZE
#include "thunk.h"
enum {
sym_name = strtab + sym->st_name;
if (strstart(sym_name, "__op_label", &p)) {
uint8_t *ptr;
- int addend;
unsigned long offset;
/* test if the variable refers to a label inside
if (!ptr)
error("__op_labelN in invalid section");
offset = sym->st_value;
- addend = 0;
+ val = *(target_ulong *)(ptr + offset);
#ifdef ELF_USES_RELOCA
{
int reloc_shndx, nb_relocs1, j;
rel = (ELF_RELOC *)sdata[reloc_shndx];
for(j = 0; j < nb_relocs1; j++) {
if (rel->r_offset == offset) {
- addend = rel->r_addend;
+ val = rel->r_addend;
break;
}
rel++;
}
}
#endif
- val = *(target_ulong *)(ptr + offset);
- val += addend;
if (val >= start_offset && val < start_offset + copy_size) {
n = strtol(p, NULL, 10);
if (out_type == OUT_INDEX_OP) {
fprintf(outfile, "DEF(end, 0, 0)\n");
+ fprintf(outfile, "DEF(nop, 0, 0)\n");
+ fprintf(outfile, "DEF(nop1, 1, 0)\n");
+ fprintf(outfile, "DEF(nop2, 2, 0)\n");
+ fprintf(outfile, "DEF(nop3, 3, 0)\n");
for(i = 0, sym = symtab; i < nb_syms; i++, sym++) {
const char *name, *p;
name = strtab + sym->st_name;
}
fprintf(outfile,
+" case INDEX_op_nop:\n"
+" break;\n"
+" case INDEX_op_nop1:\n"
+" opparam_ptr++;\n"
+" break;\n"
+" case INDEX_op_nop2:\n"
+" opparam_ptr += 2;\n"
+" break;\n"
+" case INDEX_op_nop3:\n"
+" opparam_ptr += 3;\n"
+" break;\n"
" default:\n"
" goto the_end;\n"
" }\n");