public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [Patch]: Fix some MIPS ld Failures caused by recent readelf patch.
@ 2011-12-09 21:59 David Daney
  2011-12-10  0:44 ` Alan Modra
  0 siblings, 1 reply; 2+ messages in thread
From: David Daney @ 2011-12-09 21:59 UTC (permalink / raw)
  To: binutils

[-- Attachment #1: Type: text/plain, Size: 879 bytes --]

I think I broke 3 ld test cases with this patch:

2011-12-06 David Daney <david.daney@cavium.com>

	* readelf.c (dynamic_section_mips_val): Factor out trailing '\n'
	from printed strings and move it to the end of the function.
	Use BFD_VMA_FMT for printf format specifier for dynamic tag value.
	Use print_vma() to print dynamic tag values.

http://sourceware.org/ml/binutils/2011-12/msg00062.html

The readelf patch is good, as it make the MIPS specific dynamic tags 
have the same form as the generic tags for values of zero.

The fix is almost obvious, adjust the regexes to match on "0x0" instead 
of "0" in the broken cases.

2011-12-09  David Daney  <david.daney@cavium.com>

	* ld-mips-elf/tls-multi-got-1.r: Add "0x" to match value for 
MIPS_BASE_ADDRESS.
	* ld-mips-elf/textrel-1.d: Same.
	* ld-mips-elf/multi-got-1.d: Same.

Tested on mips64-linxu-gnu.

OK to commit?


[-- Attachment #2: MIPS_BASE_ADDRESS.patch --]
[-- Type: text/plain, Size: 2277 bytes --]

Index: tls-multi-got-1.r
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-mips-elf/tls-multi-got-1.r,v
retrieving revision 1.9
diff -u -p -r1.9 tls-multi-got-1.r
--- tls-multi-got-1.r	6 Aug 2008 19:49:06 -0000	1.9
+++ tls-multi-got-1.r	9 Dec 2011 21:44:49 -0000
@@ -12,7 +12,7 @@ Dynamic section at offset .* contains 18
  0x00000013 \(RELENT\)                     8 \(bytes\)
  0x70000001 \(MIPS_RLD_VERSION\)           1
  0x70000005 \(MIPS_FLAGS\)                 NOTPOT
- 0x70000006 \(MIPS_BASE_ADDRESS\)          0
+ 0x70000006 \(MIPS_BASE_ADDRESS\)          0x0
  0x7000000a \(MIPS_LOCAL_GOTNO\)           2
  0x70000011 \(MIPS_SYMTABNO\)              20013
  0x70000012 \(MIPS_UNREFEXTNO\)            10
Index: textrel-1.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-mips-elf/textrel-1.d,v
retrieving revision 1.4
diff -u -p -r1.4 textrel-1.d
--- textrel-1.d	19 Oct 2006 13:42:17 -0000	1.4
+++ textrel-1.d	9 Dec 2011 21:44:49 -0000
@@ -17,7 +17,7 @@ Dynamic section at offset .* contains 17
  0x00000013 \(RELENT\)                     8 \(bytes\)
  0x70000001 \(MIPS_RLD_VERSION\)           1
  0x70000005 \(MIPS_FLAGS\)                 NOTPOT
- 0x70000006 \(MIPS_BASE_ADDRESS\)          0
+ 0x70000006 \(MIPS_BASE_ADDRESS\)          0x0
  0x7000000a \(MIPS_LOCAL_GOTNO\)           [0-9]*
  0x70000011 \(MIPS_SYMTABNO\)              [0-9]*
  0x70000012 \(MIPS_UNREFEXTNO\)            [0-9]*
Index: multi-got-1.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-mips-elf/multi-got-1.d,v
retrieving revision 1.11
diff -u -p -r1.11 multi-got-1.d
--- multi-got-1.d	14 Nov 2007 20:46:15 -0000	1.11
+++ multi-got-1.d	9 Dec 2011 21:44:50 -0000
@@ -18,7 +18,7 @@ Dynamic section at offset .* contains 17
  0x00000013 \(RELENT\)                     8 \(bytes\)
  0x70000001 \(MIPS_RLD_VERSION\)           1
  0x70000005 \(MIPS_FLAGS\)                 NOTPOT
- 0x70000006 \(MIPS_BASE_ADDRESS\)          0
+ 0x70000006 \(MIPS_BASE_ADDRESS\)          0x0
  0x7000000a \(MIPS_LOCAL_GOTNO\)           2
  0x70000011 \(MIPS_SYMTABNO\)              [0-9]+
  0x70000012 \(MIPS_UNREFEXTNO\)            [0-9]+

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Patch]: Fix some MIPS ld Failures caused by recent readelf patch.
  2011-12-09 21:59 [Patch]: Fix some MIPS ld Failures caused by recent readelf patch David Daney
@ 2011-12-10  0:44 ` Alan Modra
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Modra @ 2011-12-10  0:44 UTC (permalink / raw)
  To: David Daney; +Cc: binutils

On Fri, Dec 09, 2011 at 01:59:06PM -0800, David Daney wrote:
> 	* ld-mips-elf/tls-multi-got-1.r: Add "0x" to match value for
> MIPS_BASE_ADDRESS.
> 	* ld-mips-elf/textrel-1.d: Same.
> 	* ld-mips-elf/multi-got-1.d: Same.

OK.

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-12-10  0:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-09 21:59 [Patch]: Fix some MIPS ld Failures caused by recent readelf patch David Daney
2011-12-10  0:44 ` Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).