This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] ld: enable new dtags by default for linux/gnu targets
- From: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- To: vapier at gentoo dot org
- Cc: binutils at sourceware dot org
- Date: Thu, 31 Jan 2013 01:47:06 +0100
- Subject: Re: [PATCH] ld: enable new dtags by default for linux/gnu targets
> From: Mike Frysinger <vapier@gentoo.org>
> Date: Fri, 18 Jan 2013 22:06:28 +0100
> The "new" dtags options have been around for 14+ years now, so for Linux
> and GNU targets, enable them by default.
>
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
>
> 2012-01-18 Mike Frysinger <vapier@gentoo.org>
>
> * emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Set
> link_info.new_dtags to TRUE for linux/gnu targets.
> * NEWS: Mention new dtags default.
You forgot to test affected targets and adjust regressions. Any
change that alters default behavior is (should be) a red flag
that this is necessary. Committed after checking that
cris-axis-elf and cris-axis-linux-gnu are again FAIL-free.
ld/testsuite:
* ld-cris/libdso-13.d: Adjust for --enable-new-dtags now
default for *-*-linux-*.
(Two obvious choices; I went for changing the expected output
and adding --enable-new-dtags explicitly instead of adding
--disable-new-dtags. N.B. the pre-existing "-m crislinux"
emulation forces the test to behave the same for cris-elf.)
Index: ld-cris/libdso-13.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-cris/libdso-13.d,v
retrieving revision 1.4
diff -p -u -r1.4 libdso-13.d
--- ld-cris/libdso-13.d 15 Aug 2005 15:39:45 -0000 1.4
+++ ld-cris/libdso-13.d 31 Jan 2013 00:30:45 -0000
@@ -12,7 +12,7 @@
# generally disabled.) Split out the expected readelf output
# into a separate test using that option.
-Dynamic section at offset 0x[0-9a-f][0-9a-f][0-9a-f] contains 10 entries:
+Dynamic section at offset 0x[0-9a-f][0-9a-f][0-9a-f] contains 11 entries:
Tag[ ]+Type[ ]+Name/Value
0x0+4 \(HASH\)[ ]+0x94
0x0+5 \(STRTAB\)[ ]+0x[12][0-9a-f][0-9a-f]
@@ -23,6 +23,7 @@ Dynamic section at offset 0x[0-9a-f][0-9
0x0+8 \(RELASZ\)[ ]+12 \(bytes\)
0x0+9 \(RELAENT\)[ ]+12 \(bytes\)
0x0+16 \(TEXTREL\)[ ]+0x0
+ 0x0+1e \(FLAGS\)[ ]+TEXTREL
0x0+ \(NULL\)[ ]+0x0
Relocation section '\.rela\.text' at offset 0x[12][0-9a-f][0-9a-f] contains 1 entries:
brgds, H-P