ld: Add --enable-textrel-check=[no|yes|warning|error]
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 28 May 2020 11:21:04 +0000 (04:21 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 28 May 2020 11:21:16 +0000 (04:21 -0700)
commitb32632c49968cd03e952f9b63b32d9e9f1ddaf53
tree49233e497456cbd09e444e4f4aad77f009c681a7
parent151f5de4a6548cd83a79b4705f1e901776ddacc5
ld: Add --enable-textrel-check=[no|yes|warning|error]

Add a configure option, --enable-textrel-check=[no|yes|warning|error],
to decide what ELF linker should do by default with DT_TEXTREL in an
executable or shared library.

PR ld/20824
* NEWS: Mention --enable-textrel-check=[no|yes|warning|error].
* configure.ac: Add --enable-textrel-check=[no|yes|warning|error].
(DEFAULT_LD_TEXTREL_CHECK): New AC_DEFINE_UNQUOTED.
(DEFAULT_LD_TEXTREL_CHECK_WARNING): Likewise.
* ldmain.c (main): Initialize link_info.textrel_check to
DEFAULT_LD_TEXTREL_CHECK.
* lexsup.c (ld_options): Check DEFAULT_LD_TEXTREL_CHECK_WARNING.
* config.in: Regenerated.
* configure: Likewise.
ld/ChangeLog
ld/NEWS
ld/config.in
ld/configure
ld/configure.ac
ld/ldmain.c
ld/lexsup.c