aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl/elf32.em
diff options
context:
space:
mode:
Diffstat (limited to 'ld/emultempl/elf32.em')
-rw-r--r--ld/emultempl/elf32.em8
1 files changed, 8 insertions, 0 deletions
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
index 7fe9089..5fe576e 100644
--- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em
@@ -49,6 +49,7 @@ fragment <<EOF
#include "ldmain.h"
#include "ldmisc.h"
#include "ldexp.h"
+#include "ldlex.h"
#include "ldlang.h"
#include "ldfile.h"
#include "ldemul.h"
@@ -2289,6 +2290,13 @@ fragment <<EOF
EOF
fi
+if test x"$GENERATE_PIE_SCRIPT" = xyes; then
+fragment <<EOF
+ case OPTION_PIE:
+ link_info.flags_1 |= (bfd_vma) DF_1_PIE;
+ break;
+EOF
+fi
fragment <<EOF
case 'z':
if (strcmp (optarg, "defs") == 0)