* ld testsuite tweaks
@ 2006-06-05 12:59 Alan Modra
0 siblings, 0 replies; 5+ messages in thread
From: Alan Modra @ 2006-06-05 12:59 UTC (permalink / raw)
To: binutils
Allows tests to pass on more targets.
* ld-elf/sec64k.exp: Add "main" symbol. Use dc.a for addresses.
Cater for different address sizes. Match end of line when
comparing symbols.
* ld-elf/start.s: Use dc.a for addresses.
Index: ld/testsuite/ld-elf/sec64k.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-elf/sec64k.exp,v
retrieving revision 1.10
diff -u -p -r1.10 sec64k.exp
--- ld/testsuite/ld-elf/sec64k.exp 2 Jun 2006 00:31:59 -0000 1.10
+++ ld/testsuite/ld-elf/sec64k.exp 5 Jun 2006 07:49:10 -0000
@@ -50,12 +50,16 @@ for { set i 0 } { $i < $max_sec / $secs_
}
if { $i == 0 } {
+ puts $ofd " .global start"
+ puts $ofd "start:"
puts $ofd " .global _start"
- puts $ofd " .global __start"
puts $ofd "_start:"
+ puts $ofd " .global __start"
puts $ofd "__start:"
+ puts $ofd " .global main"
+ puts $ofd "main:"
puts $ofd " .global foo_0"
- puts $ofd "foo_0: .long 0"
+ puts $ofd "foo_0: .dc.a 0"
}
# Make sure the used section is not covered by common linker scripts.
@@ -65,9 +69,9 @@ for { set i 0 } { $i < $max_sec / $secs_
puts $ofd " .section .foo.\\secn,\"ax\""
puts $ofd " .global foo_\\secn"
puts $ofd "foo_\\secn:"
- puts $ofd " .long foo_\\secp"
+ puts $ofd " .dc.a foo_\\secp"
puts $ofd "bar_\\secn:"
- puts $ofd " .long bar_\\secn"
+ puts $ofd " .dc.a bar_\\secn"
puts $ofd " .endm"
puts $ofd " secn = [expr $i * $secs_per_file]"
puts $ofd " .rept $secs_per_file"
@@ -103,16 +107,16 @@ puts $ofd " \\\[65536\\\] (.rel\[a\]?)?
puts $ofd "#..."
puts $ofd " 340..: 0+\[ \]+0\[ \]+SECTION\[ \]+LOCAL\[ \]+DEFAULT\[ \]+68... "
puts $ofd "#..."
-puts $ofd " 340..: 0+4\[ \]+0\[ \]+NOTYPE\[ \]+LOCAL\[ \]+DEFAULT\[ \]+\[23\] bar_1"
+puts $ofd " 340..: 0+(2|4|8)\[ \]+0\[ \]+NOTYPE\[ \]+LOCAL\[ \]+DEFAULT\[ \]+\[23\] bar_1$"
puts $ofd "#..."
-puts $ofd ".* bar_34000"
+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 ".* (\[0-9\] foo_1|68... foo_34000)$"
puts $ofd "#..."
-puts $ofd ".* (\[0-9\] foo_1|68... foo_34000)"
+puts $ofd ".* (\[0-9\] foo_1|68... foo_34000)$"
puts $ofd "#pass"
close $ofd
run_dump_test "tmpdir/$test1"
@@ -134,16 +138,16 @@ puts $ofd " \\\[65536\\\] \\.foo\\.\[0-
puts $ofd "#..."
puts $ofd " 660..: \[0-9a-f\]+\[ \]+0\[ \]+SECTION\[ \]+LOCAL\[ \]+DEFAULT\[ \]+662.. "
puts $ofd "#..."
-puts $ofd " 660..: \[0-9a-f\]+\[ \]+0\[ \]+NOTYPE\[ \]+LOCAL\[ \]+DEFAULT\[ \]+\[0-9\] bar_1"
+puts $ofd " 660..: \[0-9a-f\]+\[ \]+0\[ \]+NOTYPE\[ \]+LOCAL\[ \]+DEFAULT\[ \]+\[0-9\] bar_1$"
puts $ofd "#..."
-puts $ofd ".* bar_66000"
+puts $ofd ".* bar_66000$"
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|66... foo_66000)"
+puts $ofd ".* (\[0-9\] foo_1|66... foo_66000)$"
puts $ofd "#..."
-puts $ofd ".* (\[0-9\] foo_1|66... foo_66000)"
+puts $ofd ".* (\[0-9\] foo_1|66... foo_66000)$"
puts $ofd "#pass"
close $ofd
run_dump_test "tmpdir/$test2"
Index: ld/testsuite/ld-elf/start.s
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-elf/start.s,v
retrieving revision 1.3
diff -u -p -r1.3 start.s
--- ld/testsuite/ld-elf/start.s 22 May 2006 08:45:18 -0000 1.3
+++ ld/testsuite/ld-elf/start.s 5 Jun 2006 07:49:10 -0000
@@ -1,10 +1,10 @@
.text
+ .global start /* Used by SH targets. */
+start:
.global _start
_start:
.global __start
__start:
- .global start /* Used by SH targets. */
-start:
.global main /* Used by HPPA targets. */
main:
- .long 0
+ .dc.a 0
--
Alan Modra
IBM OzLabs - Linux Technology Centre
^ permalink raw reply [flat|nested] 5+ messages in thread
* ld testsuite tweaks
@ 2013-01-14 13:24 Alan Modra
0 siblings, 0 replies; 5+ messages in thread
From: Alan Modra @ 2013-01-14 13:24 UTC (permalink / raw)
To: binutils
Applied.
* ld-elf/pr14926.d: Disable for d10v, msp, xstormy.
* ld-elf/sec-to-seg.exp: Choose correct variant output to suit
updated microblaze page size.
Index: ld/testsuite/ld-elf/pr14926.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-elf/pr14926.d,v
retrieving revision 1.2
diff -u -p -r1.2 pr14926.d
--- ld/testsuite/ld-elf/pr14926.d 7 Dec 2012 22:30:19 -0000 1.2
+++ ld/testsuite/ld-elf/pr14926.d 14 Jan 2013 12:46:19 -0000
@@ -1,5 +1,7 @@
#ld: -Ttext=0x60
#readelf: -S --wide
+#notarget: d10v-*-* msp*-*-* xstormy*-*-*
+# the above targets use memory regions that don't allow 0x60 for .text
#...
\[[ 0-9]+\] \.text[ \t]+PROGBITS[ \t]+0*60[ \t]+.*
Index: ld/testsuite/ld-elf/sec-to-seg.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-elf/sec-to-seg.exp,v
retrieving revision 1.4
diff -u -p -r1.4 sec-to-seg.exp
--- ld/testsuite/ld-elf/sec-to-seg.exp 31 Mar 2011 08:58:26 -0000 1.4
+++ ld/testsuite/ld-elf/sec-to-seg.exp 14 Jan 2013 12:46:19 -0000
@@ -83,7 +83,6 @@ if { [istarget avr-*-*]
|| [istarget ip2k-*-*]
|| [istarget m32r-*-*]
|| [istarget m88k-*-*]
- || [istarget microblaze-*-*]
|| [istarget moxie-*-*]
|| [istarget msp430-*-*]
|| [istarget mt-*-*]
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] 5+ messages in thread
* ld testsuite tweaks
@ 2005-08-15 14:10 Alan Modra
0 siblings, 0 replies; 5+ messages in thread
From: Alan Modra @ 2005-08-15 14:10 UTC (permalink / raw)
To: binutils
Allows these tests to pass on a few more targets.
* ld-elf/empty.s: Define "start".
* ld-elf/merge2.d: xfail arc-*-* and dlx-*-*.
* ld-scripts/empty-aligned.s: No .data section.
* ld-scripts/empty-aligned.t: Discard most sections.
* ld-scripts/empty-aligned.d: Adjust.
Index: ld/testsuite/ld-elf/empty.s
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-elf/empty.s,v
retrieving revision 1.1
diff -u -p -r1.1 empty.s
--- ld/testsuite/ld-elf/empty.s 13 Apr 2005 16:44:02 -0000 1.1
+++ ld/testsuite/ld-elf/empty.s 15 Aug 2005 13:34:41 -0000
@@ -1,6 +1,9 @@
.section .bss
bar:
.text
+ .type start,"function"
+ .global start
+start:
.type _start,"function"
.global _start
_start:
Index: ld/testsuite/ld-elf/merge2.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-elf/merge2.d,v
retrieving revision 1.1
diff -u -p -r1.1 merge2.d
--- ld/testsuite/ld-elf/merge2.d 10 Sep 2003 23:35:40 -0000 1.1
+++ ld/testsuite/ld-elf/merge2.d 15 Aug 2005 13:34:41 -0000
@@ -1,6 +1,7 @@
#source: merge2.s
#ld: -T merge.ld
#objdump: -s
+#xfail: "arc-*-*" "dlx-*-*"
.*: file format .*elf.*
Index: ld/testsuite/ld-scripts/empty-aligned.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-scripts/empty-aligned.d,v
retrieving revision 1.3
diff -u -p -r1.3 empty-aligned.d
--- ld/testsuite/ld-scripts/empty-aligned.d 10 Jun 2005 00:44:01 -0000 1.3
+++ ld/testsuite/ld-scripts/empty-aligned.d 15 Aug 2005 13:34:43 -0000
@@ -9,4 +9,4 @@ Program Headers:
Section to Segment mapping:
+Segment Sections\.\.\.
- +00.*\.text.*\.data.*
+ +00 +.text
Index: ld/testsuite/ld-scripts/empty-aligned.s
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-scripts/empty-aligned.s,v
retrieving revision 1.1
diff -u -p -r1.1 empty-aligned.s
--- ld/testsuite/ld-scripts/empty-aligned.s 17 May 2005 16:42:54 -0000 1.1
+++ ld/testsuite/ld-scripts/empty-aligned.s 15 Aug 2005 13:34:43 -0000
@@ -1,4 +1,2 @@
.text
.long 123
- .data
- .long 123
Index: ld/testsuite/ld-scripts/empty-aligned.t
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-scripts/empty-aligned.t,v
retrieving revision 1.2
diff -u -p -r1.2 empty-aligned.t
--- ld/testsuite/ld-scripts/empty-aligned.t 10 Jun 2005 00:44:01 -0000 1.2
+++ ld/testsuite/ld-scripts/empty-aligned.t 15 Aug 2005 13:34:43 -0000
@@ -25,6 +25,5 @@ SECTIONS
{
*(.text4)
}
- .data : { *(.data) }
- .bss : { *(.bss) }
+ /DISCARD/ : { *(*) }
}
--
Alan Modra
IBM OzLabs - Linux Technology Centre
^ permalink raw reply [flat|nested] 5+ messages in thread
* ld testsuite tweaks
@ 2004-11-10 3:39 Alan Modra
0 siblings, 0 replies; 5+ messages in thread
From: Alan Modra @ 2004-11-10 3:39 UTC (permalink / raw)
To: binutils
Applied.
ld/testsuite/ChangeLog
* ld-d10v/reloc-003.d: Update for changed error message.
* ld-d10v/reloc-004.d: Likewise.
* ld-d10v/reloc-007.d: Likewise.
* ld-d10v/reloc-008.d: Likewise.
* ld-d10v/reloc-011.d: Likewise.
* ld-d10v/reloc-012.d: Likewise.
* ld-d10v/reloc-015.d: Likewise.
* ld-d10v/reloc-016.d: Likewise.
Index: ld/testsuite/ld-d10v/reloc-003.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-d10v/reloc-003.d,v
retrieving revision 1.1
diff -u -p -r1.1 reloc-003.d
--- ld/testsuite/ld-d10v/reloc-003.d 17 Jun 2002 14:05:52 -0000 1.1
+++ ld/testsuite/ld-d10v/reloc-003.d 10 Nov 2004 02:40:49 -0000
@@ -1,5 +1,5 @@
#source: reloc-001.s
#ld: -T $srcdir/$subdir/reloc-003.ld
-#error: relocation truncated to fit: R_D10V_10_PCREL_L foo$
+#error: relocation truncated to fit: R_D10V_10_PCREL_L
# Test 10 bit pc rel reloc bad boundary.
\ No newline at end of file
Index: ld/testsuite/ld-d10v/reloc-004.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-d10v/reloc-004.d,v
retrieving revision 1.1
diff -u -p -r1.1 reloc-004.d
--- ld/testsuite/ld-d10v/reloc-004.d 17 Jun 2002 14:05:52 -0000 1.1
+++ ld/testsuite/ld-d10v/reloc-004.d 10 Nov 2004 02:40:49 -0000
@@ -1,5 +1,5 @@
#source: reloc-001.s
#ld: -T $srcdir/$subdir/reloc-004.ld
-#error: relocation truncated to fit: R_D10V_10_PCREL_L foo$
+#error: relocation truncated to fit: R_D10V_10_PCREL_L
# Test 10 bit pc rel reloc normal bad.
\ No newline at end of file
Index: ld/testsuite/ld-d10v/reloc-007.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-d10v/reloc-007.d,v
retrieving revision 1.1
diff -u -p -r1.1 reloc-007.d
--- ld/testsuite/ld-d10v/reloc-007.d 17 Jun 2002 14:05:52 -0000 1.1
+++ ld/testsuite/ld-d10v/reloc-007.d 10 Nov 2004 02:40:49 -0000
@@ -1,7 +1,7 @@
#source: reloc-005.s
#ld: -T $srcdir/$subdir/reloc-007.ld
#objdump: -D
-#error: relocation truncated to fit: R_D10V_18_PCREL foo$
+#error: relocation truncated to fit: R_D10V_18_PCREL
# Test 18 bit pc rel reloc bad boundary
Index: ld/testsuite/ld-d10v/reloc-008.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-d10v/reloc-008.d,v
retrieving revision 1.1
diff -u -p -r1.1 reloc-008.d
--- ld/testsuite/ld-d10v/reloc-008.d 17 Jun 2002 14:05:52 -0000 1.1
+++ ld/testsuite/ld-d10v/reloc-008.d 10 Nov 2004 02:40:49 -0000
@@ -1,7 +1,7 @@
#source: reloc-005.s
#ld: -T $srcdir/$subdir/reloc-008.ld
#objdump: -D
-#error: relocation truncated to fit: R_D10V_18_PCREL foo$
+#error: relocation truncated to fit: R_D10V_18_PCREL
# Test 18 bit pc rel reloc normal bad
Index: ld/testsuite/ld-d10v/reloc-011.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-d10v/reloc-011.d,v
retrieving revision 1.1
diff -u -p -r1.1 reloc-011.d
--- ld/testsuite/ld-d10v/reloc-011.d 17 Jun 2002 14:05:52 -0000 1.1
+++ ld/testsuite/ld-d10v/reloc-011.d 10 Nov 2004 02:40:49 -0000
@@ -1,6 +1,6 @@
#source: reloc-009.s
#ld: -T $srcdir/$subdir/reloc-011.ld
-#error: relocation truncated to fit: R_D10V_10_PCREL_R foo$
+#error: relocation truncated to fit: R_D10V_10_PCREL_R
# Test 10 bit pc rel reloc negative bad boundary.
Index: ld/testsuite/ld-d10v/reloc-012.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-d10v/reloc-012.d,v
retrieving revision 1.1
diff -u -p -r1.1 reloc-012.d
--- ld/testsuite/ld-d10v/reloc-012.d 17 Jun 2002 14:05:52 -0000 1.1
+++ ld/testsuite/ld-d10v/reloc-012.d 10 Nov 2004 02:40:49 -0000
@@ -1,6 +1,6 @@
#source: reloc-009.s
#ld: -T $srcdir/$subdir/reloc-012.ld
-#error: relocation truncated to fit: R_D10V_10_PCREL_R foo$
+#error: relocation truncated to fit: R_D10V_10_PCREL_R
# Test 10 bit pc rel reloc negative normal bad.
Index: ld/testsuite/ld-d10v/reloc-015.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-d10v/reloc-015.d,v
retrieving revision 1.1
diff -u -p -r1.1 reloc-015.d
--- ld/testsuite/ld-d10v/reloc-015.d 17 Jun 2002 14:05:53 -0000 1.1
+++ ld/testsuite/ld-d10v/reloc-015.d 10 Nov 2004 02:40:49 -0000
@@ -1,7 +1,7 @@
#source: reloc-005.s
#ld: -T $srcdir/$subdir/reloc-015.ld
#objdump: -D
-#error: relocation truncated to fit: R_D10V_18_PCREL foo$
+#error: relocation truncated to fit: R_D10V_18_PCREL
# Test 18 bit pc rel negative reloc bad boundary
Index: ld/testsuite/ld-d10v/reloc-016.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-d10v/reloc-016.d,v
retrieving revision 1.1
diff -u -p -r1.1 reloc-016.d
--- ld/testsuite/ld-d10v/reloc-016.d 17 Jun 2002 14:05:53 -0000 1.1
+++ ld/testsuite/ld-d10v/reloc-016.d 10 Nov 2004 02:40:49 -0000
@@ -1,7 +1,7 @@
#source: reloc-005.s
#ld: -T $srcdir/$subdir/reloc-016.ld
#objdump: -D
-#error: relocation truncated to fit: R_D10V_18_PCREL foo$
+#error: relocation truncated to fit: R_D10V_18_PCREL
# Test 18 bit pc rel negative reloc normal bad
--
Alan Modra
IBM OzLabs - Linux Technology Centre
^ permalink raw reply [flat|nested] 5+ messages in thread
* ld testsuite tweaks
@ 2002-01-30 20:43 Alan Modra
0 siblings, 0 replies; 5+ messages in thread
From: Alan Modra @ 2002-01-30 20:43 UTC (permalink / raw)
To: binutils
Fixes fallout from
2002-01-25 Alan Modra <amodra@bigpond.net.au>
* ldmisc.c (demangle): Put back dots when string not demangled.
ld/testsuite/ChangeLog
* ld-scripts/crossref.exp: Allow foo to have a leading dot.
* ld-scripts/cross1.t: Add .opd.
* ld-undefined/undefined.exp: Allow leading dot on sym names.
* lib/ld-lib.exp (default_ld_nm): Strip leading dots from syms.
--
Alan Modra
IBM OzLabs - Linux Technology Centre
Index: ld/testsuite/ld-scripts/cross1.t
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-scripts/cross1.t,v
retrieving revision 1.2
diff -u -p -r1.2 cross1.t
--- cross1.t 2001/08/27 10:49:55 1.2
+++ cross1.t 2002/01/31 03:54:39
@@ -2,6 +2,7 @@ NOCROSSREFS ( .text .data )
SECTIONS
{
.toc : { *(.toc) }
+ .opd : { *(.opd) }
.text : { tmpdir/cross1.o }
.data : { tmpdir/cross2.o }
}
Index: ld/testsuite/ld-scripts/crossref.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-scripts/crossref.exp,v
retrieving revision 1.5
diff -u -p -r1.5 crossref.exp
--- crossref.exp 2001/03/13 06:14:28 1.5
+++ crossref.exp 2002/01/31 03:54:39
@@ -54,7 +54,7 @@ if [string match "" $exec_output] then {
fail $test1
} else {
verbose -log "$exec_output"
- if [regexp "prohibited cross reference from .* to `foo' in" $exec_output] {
+ if [regexp "prohibited cross reference from .* to `.*foo' in" $exec_output] {
pass $test1
} else {
fail $test1
Index: ld/testsuite/ld-undefined/undefined.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-undefined/undefined.exp,v
retrieving revision 1.10
diff -u -p -r1.10 undefined.exp
--- undefined.exp 2001/06/12 16:02:13 1.10
+++ undefined.exp 2002/01/31 03:54:39
@@ -61,7 +61,7 @@ proc checkund { string testname } {
}
}
-set mu "undefined reference to `this_function_is_not_defined'"
+set mu "undefined reference to `*this_function_is_not_defined'"
checkund $mu $testund
# ARM PE defaults to using stabs debugging, which we can't handle for
@@ -94,7 +94,7 @@ setup_xfail "sh-*-*"
# Just doesn't work for PA ELF. No clue why.
setup_xfail "hppa*-*-*elf*"
-set ml "undefined.c:9: undefined reference to `this_function_is_not_defined'"
+set ml "undefined.c:9: undefined reference to `*this_function_is_not_defined'"
# With targets that use elf/dwarf2, such as the arm-elf and thumb-elf
# toolchains, the code in bfd/elf.c:_bfd_elf_find_nearest_line() is called
# in order to locate the file name/line number where the undefined
Index: ld/testsuite/lib/ld-lib.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/lib/ld-lib.exp,v
retrieving revision 1.12
diff -u -p -r1.12 ld-lib.exp
--- ld-lib.exp 2001/10/14 16:03:53 1.12
+++ ld-lib.exp 2002/01/31 03:54:41
@@ -307,7 +307,7 @@ proc default_ld_nm { nm nmflags object }
set file [open tmpdir/nm.out r]
while { [gets $file line] != -1 } {
verbose "$line" 2
- if [regexp "^(\[0-9a-fA-F\]+) \[a-zA-Z0-9\] (.+)$" $line whole value name] {
+ if [regexp "^(\[0-9a-fA-F\]+) \[a-zA-Z0-9\] \\.*(.+)$" $line whole value name] {
set name [string trimleft $name "_"]
verbose "Setting nm_output($name) to 0x$value" 2
set nm_output($name) 0x$value
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-01-14 13:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-05 12:59 ld testsuite tweaks Alan Modra
-- strict thread matches above, loose matches on Subject: below --
2013-01-14 13:24 Alan Modra
2005-08-15 14:10 Alan Modra
2004-11-10 3:39 Alan Modra
2002-01-30 20:43 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).