This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: src/binutils ChangeLog objcopy.c doc/binutils. ...


Thiemo Seufer <ths@networkno.de> writes:
> rsandifo@sourceware.org wrote:
>> 	binutils/testsuite/
>> 	* binutils-all/localize-hidden-1.s,
>> 	* binutils-all/localize-hidden-1.d,
>
> The first one fails on mips-linux:
>
> regexp_diff match failure
> regexp "^.*: 0+2200 +0 +NOTYPE +LOCAL +HIDDEN +ABS +Ghidden$"
> line   "     8: 00000000     0 SECTION LOCAL  DEFAULT    4 "
> [...]

Sorry about that.  The problem of course was the extra MIPS section
symbols, which disrupted the expected symbol ordering.  I suppose the
obvious fix is to use objcopy --syms instead and take advantage of the
symbol table canonicalisation.

This patch does that.  Tested on ia64-linux-gnu, mips-linux-gnu
and m68k-elf.  Installed as (hopefully) obvious.

Richard


binutils/testsuite/
	* binutils-all/localize-hidden-1.d: Use objdump --syms instead
	of readelf.

Index: binutils/testsuite/binutils-all/localize-hidden-1.d
===================================================================
RCS file: /cvs/src/src/binutils/testsuite/binutils-all/localize-hidden-1.d,v
retrieving revision 1.2
diff -c -r1.2 localize-hidden-1.d
*** binutils/testsuite/binutils-all/localize-hidden-1.d	23 Jun 2006 16:23:09 -0000	1.2
--- binutils/testsuite/binutils-all/localize-hidden-1.d	24 Jun 2006 08:18:34 -0000
***************
*** 1,17 ****
  #PROG: objcopy
! #readelf: --symbols
  #objcopy: --localize-hidden
  #name: --localize-hidden test 1
  #...
! .*: 0+1200 +0 +NOTYPE +LOCAL +HIDDEN +ABS +Lhidden
! .*: 0+1300 +0 +NOTYPE +LOCAL +INTERNAL +ABS +Linternal
! .*: 0+1400 +0 +NOTYPE +LOCAL +PROTECTED +ABS +Lprotected
! .*: 0+1100 +0 +NOTYPE +LOCAL +DEFAULT +ABS +Ldefault
! .*: 0+2200 +0 +NOTYPE +LOCAL +HIDDEN +ABS +Ghidden
! .*: 0+2300 +0 +NOTYPE +LOCAL +INTERNAL +ABS +Ginternal
! .*: 0+3200 +0 +NOTYPE +LOCAL +HIDDEN +ABS +Whidden
! .*: 0+3300 +0 +NOTYPE +LOCAL +INTERNAL +ABS +Winternal
! .*: 0+2100 +0 +NOTYPE +GLOBAL +DEFAULT +ABS +Gdefault
! .*: 0+2400 +0 +NOTYPE +GLOBAL +PROTECTED +ABS +Gprotected
! .*: 0+3100 +0 +NOTYPE +WEAK +DEFAULT +ABS +Wdefault
! .*: 0+3400 +0 +NOTYPE +WEAK +PROTECTED +ABS +Wprotected
--- 1,19 ----
  #PROG: objcopy
! #objdump: --syms
  #objcopy: --localize-hidden
  #name: --localize-hidden test 1
  #...
! 0+1200 l .*\*ABS\*	0+ \.hidden Lhidden
! 0+1300 l .*\*ABS\*	0+ \.internal Linternal
! 0+1400 l .*\*ABS\*	0+ \.protected Lprotected
! 0+1100 l .*\*ABS\*	0+ Ldefault
! #...
! 0+2200 l .*\*ABS\*	0+ \.hidden Ghidden
! 0+2300 l .*\*ABS\*	0+ \.internal Ginternal
! 0+3200 l .*\*ABS\*	0+ \.hidden Whidden
! 0+3300 l .*\*ABS\*	0+ \.internal Winternal
! 0+2100 g .*\*ABS\*	0+ Gdefault
! 0+2400 g .*\*ABS\*	0+ \.protected Gprotected
! 0+3100  w.*\*ABS\*	0+ Wdefault
! 0+3400  w.*\*ABS\*	0+ \.protected Wprotected
! #pass


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]