summaryrefslogtreecommitdiff
path: root/ld/emultempl
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2011-10-19 04:13:27 +0000
committerAlan Modra <amodra@bigpond.net.au>2011-10-19 04:13:27 +0000
commit18259e860af05de0fc4160d7ce896198756823c4 (patch)
tree80ff40c959f6b46927cc4700fca3e3794cc805c3 /ld/emultempl
parent287cfd9435d4e481bafa61bde68690eb5927bde9 (diff)
downloadbinutils-redhat-18259e860af05de0fc4160d7ce896198756823c4.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 7c8e55bb9a..78a708bb4f 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