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]

[PATCH]: PR 3805: Expect the relocatable sec64k test to fail for the m33r


Hi Guys,

  I am going to apply the attached patch to fix PR 3805 for the M32R.
  The relocatable form of the sec64k test fails because the m32r
  target generates both .rel and .rela reloc sections.

Cheers
  Nick

ld/testsuite/ChangeLog
2007-02-06  Nick Clifton  <nickc@redhat.com>

	PR ld/3805
	* ld-elf/sec64k.exp: Expect the relocatable version of this test
	to fail for the m32r because it creates both .rel and .rela
	sections.

Index: ld/testsuite/ld-elf/sec64k.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-elf/sec64k.exp,v
retrieving revision 1.12
diff -c -3 -p -r1.12 sec64k.exp
*** ld/testsuite/ld-elf/sec64k.exp	25 Oct 2006 06:49:21 -0000	1.12
--- ld/testsuite/ld-elf/sec64k.exp	2 Feb 2007 14:42:06 -0000
*************** if [catch { set ofd [open "tmpdir/$test1
*** 91,125 ****
  
  # The ld-r linked file will contain relocation-sections too, so make it
  # half the size in order to try and keep the test-time down.
! foreach sfile [lrange $sfiles 0 [expr [llength $sfiles] / 2]] {
!     puts $ofd "#source: $sfile"
  }
- puts $ofd "#ld: -r"
- puts $ofd "#readelf: -W -Ss"
- puts $ofd "There are 680.. section headers.*:"
- puts $ofd "#..."
- puts $ofd "  \\\[ 0\\\] .* 682\[0-9\]\[0-9\]\[ \]+0\[ \]+0"
- puts $ofd "#..."
- puts $ofd "  \\\[ \[0-9\]\\\] \.foo\.1\[ \]+PROGBITS\[ \]+.*"
- puts $ofd "#..."
- puts $ofd "  \\\[65279\\\] (.rel\[a\]?)?\\.foo\\.\[0-9\]+ .*"
- puts $ofd "  \\\[65536\\\] (.rel\[a\]?)?\\.foo\\.\[0-9\]+ .*"
- puts $ofd "#..."
- puts $ofd " 340..: 0+\[ \]+0\[ \]+SECTION\[ \]+LOCAL\[ \]+DEFAULT\[ \]+68... "
- puts $ofd "#..."
- puts $ofd " 340..: 0+(2|4|8)\[ \]+0\[ \]+NOTYPE\[ \]+LOCAL\[ \]+DEFAULT\[ \]+\[23\] bar_1$"
- puts $ofd "#..."
- puts $ofd ".* bar_34000$"
- puts $ofd "#..."
- # Global symbols are not in "alphanumeric" order, so we just check
- # that the first and the last are present in any order (assuming no
- # duplicates).
- puts $ofd ".* (\[0-9\] foo_1|68... foo_34000)$"
- puts $ofd "#..."
- puts $ofd ".* (\[0-9\] foo_1|68... foo_34000)$"
- puts $ofd "#pass"
- close $ofd
- run_dump_test "tmpdir/$test1"
  
  if [catch { set ofd [open "tmpdir/$test2.d" w] } x] {
      perror "$x"
--- 91,131 ----
  
  # The ld-r linked file will contain relocation-sections too, so make it
  # half the size in order to try and keep the test-time down.
! 
! # The m32r target generates both REL and RELA relocs (for historical
! # reasons) so the expected number of sections will be much more than
! # 68000, which throws this particular test right off.
! if {![istarget "m32r-*-*"]} then {
!     foreach sfile [lrange $sfiles 0 [expr [llength $sfiles] / 2]] {
! 	puts $ofd "#source: $sfile"
!     }
!     puts $ofd "#ld: -r"
!     puts $ofd "#readelf: -W -Ss"
!     puts $ofd "There are 680.. section headers.*:"
!     puts $ofd "#..."
!     puts $ofd "  \\\[ 0\\\] .* 682\[0-9\]\[0-9\]\[ \]+0\[ \]+0"
!     puts $ofd "#..."
!     puts $ofd "  \\\[ \[0-9\]\\\] \.foo\.1\[ \]+PROGBITS\[ \]+.*"
!     puts $ofd "#..."
!     puts $ofd "  \\\[65279\\\] (.rel\[a\]?)?\\.foo\\.\[0-9\]+ .*"
!     puts $ofd "  \\\[65536\\\] (.rel\[a\]?)?\\.foo\\.\[0-9\]+ .*"
!     puts $ofd "#..."
!     puts $ofd " 340..: 0+\[ \]+0\[ \]+SECTION\[ \]+LOCAL\[ \]+DEFAULT\[ \]+68... "
!     puts $ofd "#..."
!     puts $ofd " 340..: 0+(2|4|8)\[ \]+0\[ \]+NOTYPE\[ \]+LOCAL\[ \]+DEFAULT\[ \]+\[23\] bar_1$"
!     puts $ofd "#..."
!     puts $ofd ".* bar_34000$"
!     puts $ofd "#..."
!     # Global symbols are not in "alphanumeric" order, so we just check
!     # that the first and the last are present in any order (assuming no
!     # duplicates).
!     puts $ofd ".* (\[0-9\] foo_1|68... foo_34000)$"
!     puts $ofd "#..."
!     puts $ofd ".* (\[0-9\] foo_1|68... foo_34000)$"
!     puts $ofd "#pass"
!     close $ofd
!     run_dump_test "tmpdir/$test1"
  }
  
  if [catch { set ofd [open "tmpdir/$test2.d" w] } x] {
      perror "$x"

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