summaryrefslogtreecommitdiff
path: root/ld/ldlex.h
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2020-05-27 04:53:54 -0700
committerH.J. Lu <hjl.tools@gmail.com>2020-05-27 04:54:10 -0700
commita6dbf402de65fe66f4ec99b56527dfd00d077cb6 (patch)
treea264f6b6544f748f3d7dea562ee44cb47a8d9dd1 /ld/ldlex.h
parent25e1eca8faf1c29d28e57b37d6b5e3810b7b870b (diff)
downloadbinutils-gdb-a6dbf402de65fe66f4ec99b56527dfd00d077cb6.tar.gz
ld: Add --warn-textrel and obsolete --warn-shared-textrel
--warn-shared-textrel and -z text apply to both shared object and PIE. Add --warn-textrel and obsolete --warn-shared-textrel. Consolidate --warn-textrel and -z text/notext/textoff implementation. bfd/ PR ld/22909 * elflink.c (bfd_elf_final_link): Use bfd_link_textrel_check. Check bfd_link_dll when issue a DT_TEXTREL warning. * elfxx-x86.c (maybe_set_textrel): Likewise. (_bfd_x86_elf_size_dynamic_sections): Likewise. include/ PR ld/22909 * bfdlink.h (textrel_check_method): New enum. (bfd_link_textrel_check): New. (bfd_link_info): Replace warn_shared_textrel and error_textrel with textrel_check. ld/ PR ld/22909 * NEWS: Mention --warn-textrel. * ld.texi: Update -z text/notext/textoff. Add --warn-textrel. Remove --warn-shared-textrel. * ldlex.h (option_values): Rename OPTION_WARN_SHARED_TEXTREL to OPTION_WARN_TEXTREL. * lexsup.c (ld_options): Add --warn-textrel. Obsolete --warn-shared-textrel. (parse_args): Updated. (elf_shlib_list_options): Check link_info.textrel_check. * emultempl/elf.em: Updated. * testsuite/ld-elf/pr19539.d: Replace -z notext with --warn-textrel. Expect a warning. * testsuite/ld-i386/warn1.d: Update expected warning.
Diffstat (limited to 'ld/ldlex.h')
-rw-r--r--ld/ldlex.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/ld/ldlex.h b/ld/ldlex.h
index 22b928d2d90..318ac7a789d 100644
--- a/ld/ldlex.h
+++ b/ld/ldlex.h
@@ -130,7 +130,7 @@ enum option_values
OPTION_UNRESOLVED_SYMBOLS,
OPTION_WARN_UNRESOLVED_SYMBOLS,
OPTION_ERROR_UNRESOLVED_SYMBOLS,
- OPTION_WARN_SHARED_TEXTREL,
+ OPTION_WARN_TEXTREL,
OPTION_WARN_ALTERNATE_EM,
OPTION_REDUCE_MEMORY_OVERHEADS,
#ifdef ENABLE_PLUGINS