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.