From bb101959912073f460669d75097215cde7b20019 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 16 May 2005 22:10:19 -0400 Subject: ld: always warn about textrels in files textrels are bad for forcing copy-on-write (this affects everyone), and for security/runtime code generation, this affects security ppl. But in either case, it doesn't matter who needs textrels, it's the very fact that they're needed at all. --- ld/ldmain.c | 1 + ld/testsuite/lib/ld-lib.exp | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/ld/ldmain.c b/ld/ldmain.c index 1e48b1a..f634eaa 100644 --- a/ld/ldmain.c +++ b/ld/ldmain.c @@ -294,6 +294,7 @@ main (int argc, char **argv) link_info.dynamic_undefined_weak = -1; link_info.pei386_auto_import = -1; link_info.spare_dynamic_tags = 5; + link_info.warn_shared_textrel = TRUE; link_info.path_separator = ':'; #ifdef DEFAULT_FLAG_COMPRESS_DEBUG link_info.compress_debug = COMPRESS_DEBUG_GABI_ZLIB; diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp index cf7886b..6c6a0b7 100644 --- a/ld/testsuite/lib/ld-lib.exp +++ b/ld/testsuite/lib/ld-lib.exp @@ -250,6 +250,10 @@ proc default_ld_simple_link { ld target objects } { # symbol, since the default linker script might use ENTRY. regsub -all "(^|\n)(\[^\n\]*: warning: cannot find entry symbol\[^\n\]*\n?)" $exec_output "\\1" exec_output + # Gentoo tweak: + # We want to ignore TEXTREL warnings since we force enable them by default + regsub -all "^lt-ld-new: warning: creating a DT_TEXTREL in object\." $exec_output "\\1" exec_output + return [string match "" $exec_output] } -- cgit v1.1