aboutsummaryrefslogtreecommitdiff
path: root/dyngen.c
diff options
context:
space:
mode:
Diffstat (limited to 'dyngen.c')
-rw-r--r--dyngen.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/dyngen.c b/dyngen.c
index b10909e78d..ff441caec0 100644
--- a/dyngen.c
+++ b/dyngen.c
@@ -1215,6 +1215,19 @@ void gen_code(const char *name, host_ulong offset, host_ulong size,
error("unsupported i386 relocation (%d)", type);
}
#elif defined(CONFIG_FORMAT_COFF)
+ {
+ char *temp_name;
+ int j;
+ EXE_SYM *sym;
+ temp_name = get_sym_name(symtab + *(uint32_t *)(rel->r_reloc->r_symndx));
+ if (!strcmp(temp_name, ".data")) {
+ for (j = 0, sym = symtab; j < nb_syms; j++, sym++) {
+ if (strstart(sym->st_name, sym_name, NULL)) {
+ addend -= sym->st_value;
+ }
+ }
+ }
+ }
type = rel->r_type;
switch(type) {
case DIR32: