summaryrefslogtreecommitdiff
path: root/ld/emultempl
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2011-10-19 04:13:28 +0000
committerAlan Modra <amodra@gmail.com>2011-10-19 04:13:28 +0000
commitc192a1336807cc9515666b1ba5028b6e36d91a3a (patch)
treeb5cbdfa6dd2a03a8293174b24a42b3e1d2dbb5ed /ld/emultempl
parentf1a81b376af4c8f09ecb6b11334b87e5badfc340 (diff)
downloadbinutils-gdb-c192a1336807cc9515666b1ba5028b6e36d91a3a.tar.gz
PR ld/13254
include/ * bfdlink.h (struct bfd_link_info): Add error_textrel. bfd/ * elflink.c (bfd_elf_final_link): Emit error_textrel error. ld/ * emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Add -z text, -z notext, -z textoff options for all targets having shared lib support.
Diffstat (limited to 'ld/emultempl')
-rw-r--r--ld/emultempl/elf32.em6
1 files changed, 6 insertions, 0 deletions
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
index 7c8e55bb9aa..78a708bb4f0 100644
--- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em
@@ -2327,6 +2327,12 @@ fragment <<EOF
link_info.relro = TRUE;
else if (strcmp (optarg, "norelro") == 0)
link_info.relro = FALSE;
+ else if (strcmp (optarg, "text") == 0)
+ link_info.error_textrel = TRUE;
+ else if (strcmp (optarg, "notext") == 0)
+ link_info.error_textrel = FALSE;
+ else if (strcmp (optarg, "textoff") == 0)
+ link_info.error_textrel = FALSE;
EOF
fi