This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: ld -z options
On Thu, Jul 14, 2011 at 4:18 AM, Alan Modra <amodra@gmail.com> wrote:
> On Thu, Jul 14, 2011 at 04:06:03AM -0400, Hans-Peter Nilsson wrote:
>> Talking to myself...
>>
>> On Thu, 14 Jul 2011, Hans-Peter Nilsson wrote:
>> > This caused several test-cases to go from PASS to UNRESOLVED for
>> > cris-axis-linux-gnu
>>
>> It seems this would happen for e.g. ia64-*-linux-gnu too.
>
> Yes.
>
>> > All preceded by a linker warning ".../ld-new: warning: -z relro
>> > ignored." in ld.log. ?The UNRESOLVED status then cause the
>> > check-ld to return error. ?According to the dejagnu docs, the
>> > UNRESOLVED is an indication of an error in the testsuite (likely
>> > the unexpected warning).
>>
>> That's a bug in ld-elf/binutils.exp or the new warning message;
>> binutils.exp tests [string match "*not supported*" $link_output]
>> ? ? ? ? ? ? ?|| [string match "*unrecognized option*" $link_output]
>> which doesn't match "warning: -z relro ignored.".
>>
>> Which one should be adjusted?
>
> Probably the new one. ?Patch preapproved if you'd like to do it.
I checked in this:
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index ee6987f..bc01d77 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2011-07-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * ld-elf/binutils.exp (binutils_test): Also check ignored
+ "-z relro".
+
2011-07-14 Alan Modra <amodra@gmail.com>
* ld-scripts/section-flags.exp: Pass --local-store 0:0 for
diff --git a/ld/testsuite/ld-elf/binutils.exp b/ld/testsuite/ld-elf/binutils.exp
index 380bd26..382d50f 100644
--- a/ld/testsuite/ld-elf/binutils.exp
+++ b/ld/testsuite/ld-elf/binutils.exp
@@ -53,7 +53,8 @@ proc binutils_test { prog_name ld_options test } {
if { ![ld_simple_link $ld tmpdir/$test "$ld_options tmpdir/$test.o"] } {
if { [string match "*not supported*" $link_output]
- || [string match "*unrecognized option*" $link_output] } {
+ || [string match "*unrecognized option*" $link_output]
+ || [string match "*-z relro ignored*" $link_output] } {
unsupported "$ld_options is not supported by this target"
} else {
unresolved "$test_name"
--
H.J.