+2007-11-06 Kai Tietz <kai.tietz@onevision.com>
+
+ * emultempl/pe.em: (init): Add __ImageBase symbol.
+ (MSIMAGEBASEOFF): New.
+ (set_pe_name): Keep __image_base and __ImageBase value synch.
+ (_set_symbols): Likewise.
+ * emultempl/pep.em: Likewise.
+
2007-10-26 Alan Modra <amodra@bigpond.net.au>
PR 5215
D(ImageBase,"__image_base__", NT_EXE_IMAGE_BASE),
#define DLLOFF 1
{&dll, sizeof(dll), 0, "__dll__", 0},
+#define MSIMAGEBASEOFF 2
+ D(ImageBase, U ("__ImageBase"), NT_EXE_IMAGE_BASE),
D(SectionAlignment,"__section_alignment__", PE_DEF_SECTION_ALIGNMENT),
D(FileAlignment,"__file_alignment__", PE_DEF_FILE_ALIGNMENT),
D(MajorOperatingSystemVersion,"__major_os_version__", 4),
{
init[i].value = val;
init[i].inited = 1;
+ if (strcmp (name,"__image_base__") == 0)
+ set_pe_name (U ("__ImageBase"), val);
return;
}
}
#endif
else
init[IMAGEBASEOFF].value = NT_EXE_IMAGE_BASE;
+ init[MSIMAGEBASEOFF].value = init[IMAGEBASEOFF].value;
}
/* Don't do any symbol assignments if this is a relocatable link. */
#define DLLOFF 1
{&dll, sizeof(dll), 0, "__dll__", 0},
#define MSIMAGEBASEOFF 2
- D(ImageBase,"__ImageBase", NT_EXE_IMAGE_BASE),
+ D(ImageBase,"___ImageBase", NT_EXE_IMAGE_BASE),
D(SectionAlignment,"__section_alignment__", PE_DEF_SECTION_ALIGNMENT),
D(FileAlignment,"__file_alignment__", PE_DEF_FILE_ALIGNMENT),
D(MajorOperatingSystemVersion,"__major_os_version__", 4),
init[i].value = val;
init[i].inited = 1;
if (strcmp (name,"__image_base__") == 0)
- set_pep_name ("__ImageBase", val);
+ set_pep_name ("___ImageBase", val);
return;
}
}