--- qemu/dyngen.c.mps 2005-02-22 13:41:53 +0100 +++ qemu/dyngen.c 2005-02-22 15:57:53 +0100 @@ -1661,6 +1661,10 @@ type = ELF32_R_TYPE(rel->r_info); switch(type) { case R_386_32: + case R_386_GOTPC: + case R_386_GOT32: + case R_386_PLT32: + case R_386_GOTOFF: fprintf(outfile, " *(uint32_t *)(gen_code_ptr + %d) = %s + %d;\n", rel->r_offset - start_offset, name, addend); break; --- qemu/Makefile.target.mps 2005-02-22 11:06:38 +0100 +++ qemu/Makefile.target 2005-02-22 16:25:13 +0100 @@ -399,11 +399,24 @@ gen-op.h: op.o $(DYNGEN) $(DYNGEN) -g -o $@ $< +# -fno-pic: out of registers op.o: op.c - $(CC) $(OP_CFLAGS) $(DEFINES) -c -o $@ $< +ifeq ($(TARGET_BASE_ARCH), i386) +ifdef CONFIG_SOFTMMU + $(CC) $(OP_CFLAGS) $(DEFINES) -fno-stack-protector -fno-pic -c -o $@ $< +else + $(CC) $(OP_CFLAGS) $(DEFINES) -fno-stack-protector -c -o $@ $< +endif +else + $(CC) $(OP_CFLAGS) $(DEFINES) -fno-stack-protector-all -c -o $@ $< +endif helper.o: helper.c +ifdef CONFIG_SOFTMMU + $(CC) $(HELPER_CFLAGS) $(DEFINES) -fno-pic -c -o $@ $< +else $(CC) $(HELPER_CFLAGS) $(DEFINES) -c -o $@ $< +endif ifeq ($(TARGET_BASE_ARCH), i386) op.o: op.c opreg_template.h ops_template.h ops_template_mem.h ops_mem.h ops_sse.h