aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl/pe.em
diff options
context:
space:
mode:
Diffstat (limited to 'ld/emultempl/pe.em')
-rw-r--r--ld/emultempl/pe.em2
1 files changed, 1 insertions, 1 deletions
diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em
index 9ff5c9c..9f39aa6 100644
--- a/ld/emultempl/pe.em
+++ b/ld/emultempl/pe.em
@@ -665,7 +665,7 @@ gld_${EMULATION_NAME}_set_symbols (void)
{
if (link_info.relocatable)
init[IMAGEBASEOFF].value = 0;
- else if (init[DLLOFF].value || link_info.shared)
+ else if (init[DLLOFF].value || (link_info.shared && !link_info.pie))
#ifdef DLL_SUPPORT
init[IMAGEBASEOFF].value = (pe_enable_auto_image_base) ?
compute_dll_image_base (output_filename) : NT_DLL_IMAGE_BASE;