* ld-elf/warn1.d: Specify -Ttext.
* ld-scripts/align.exp (align2a, align2b: Don't run on aout targets. * ld-scripts/align2.t: Discard all but .text and .data. * ld-scripts/align2a.d: Accept non-readonly for coff. * ld-scripts/align2b.d: Likewise. * lib/ld-lib.exp (is_aout_format): New function.
This commit is contained in:
parent
eefe576e60
commit
2562953678
|
@ -1,3 +1,12 @@
|
||||||
|
2005-02-21 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
|
* ld-elf/warn1.d: Specify -Ttext.
|
||||||
|
* ld-scripts/align.exp (align2a, align2b: Don't run on aout targets.
|
||||||
|
* ld-scripts/align2.t: Discard all but .text and .data.
|
||||||
|
* ld-scripts/align2a.d: Accept non-readonly for coff.
|
||||||
|
* ld-scripts/align2b.d: Likewise.
|
||||||
|
* lib/ld-lib.exp (is_aout_format): New function.
|
||||||
|
|
||||||
2005-02-18 Alan Modra <amodra@bigpond.net.au>
|
2005-02-18 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
* ld-scripts/align2a.d: Don't assume anything about section
|
* ld-scripts/align2a.d: Don't assume anything about section
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#source: start.s
|
#source: start.s
|
||||||
#source: symbol1ref.s
|
#source: symbol1ref.s
|
||||||
#source: symbol1w.s
|
#source: symbol1w.s
|
||||||
#ld:
|
#ld: -Ttext 0x1000
|
||||||
#warning: ^[^\\n]*\): warning: witty one-liner$
|
#warning: ^[^\\n]*\): warning: witty one-liner$
|
||||||
#readelf: -s
|
#readelf: -s
|
||||||
#notarget: "sparc64-*-solaris2*" "sparcv9-*-solaris2*"
|
#notarget: "sparc64-*-solaris2*" "sparcv9-*-solaris2*"
|
||||||
|
|
|
@ -35,6 +35,8 @@ if ![ld_simple_link $ld tmpdir/align "-T $srcdir/$subdir/align.t tmpdir/align.o"
|
||||||
pass $testname
|
pass $testname
|
||||||
}
|
}
|
||||||
|
|
||||||
run_dump_test align2a
|
if ![is_aout_format] {
|
||||||
run_dump_test align2b
|
run_dump_test align2a
|
||||||
|
run_dump_test align2b
|
||||||
|
}
|
||||||
run_dump_test align2c
|
run_dump_test align2c
|
||||||
|
|
|
@ -3,4 +3,5 @@ SECTIONS
|
||||||
.text : {*(.text)}
|
.text : {*(.text)}
|
||||||
. = ALIGN(data_align);
|
. = ALIGN(data_align);
|
||||||
.data : {*(.data)}
|
.data : {*(.data)}
|
||||||
|
/DISCARD/ : {*(*)}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
Sections:
|
Sections:
|
||||||
Idx +Name +Size +VMA +LMA +File +off +Algn
|
Idx +Name +Size +VMA +LMA +File +off +Algn
|
||||||
+0 +\.text +[^ ]* +0+ +0+ .*
|
+0 +\.text +[^ ]* +0+ +0+ .*
|
||||||
+CONTENTS, +ALLOC, +LOAD, +READONLY, +CODE
|
+CONTENTS, +ALLOC, +LOAD,.* CODE
|
||||||
+1 +\.data +[^ ]* +0+10 +0+10 .*
|
+1 +\.data +[^ ]* +0+10 +0+10 .*
|
||||||
+CONTENTS, +ALLOC, +LOAD, +DATA
|
+CONTENTS, +ALLOC, +LOAD, +DATA
|
||||||
#pass
|
#pass
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
Sections:
|
Sections:
|
||||||
Idx +Name +Size +VMA +LMA +File off +Algn
|
Idx +Name +Size +VMA +LMA +File off +Algn
|
||||||
+0 +\.text +[^ ]* +0+ +0+ .*
|
+0 +\.text +[^ ]* +0+ +0+ .*
|
||||||
+CONTENTS, +ALLOC, +LOAD, +READONLY, +CODE
|
+CONTENTS, +ALLOC, +LOAD,.* CODE
|
||||||
+1 +\.data +[^ ]* +0+20 +0+20 .*
|
+1 +\.data +[^ ]* +0+20 +0+20 .*
|
||||||
+CONTENTS, +ALLOC, +LOAD, +DATA
|
+CONTENTS, +ALLOC, +LOAD, +DATA
|
||||||
#pass
|
#pass
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Support routines for LD testsuite.
|
# Support routines for LD testsuite.
|
||||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
|
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
|
||||||
# Free Software Foundation, Inc.
|
# 2004, 2005 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; you can redistribute it and/or modify
|
# This file is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@ -416,6 +416,36 @@ proc is_elf64 { binary_file } {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# is_aout_format
|
||||||
|
# true if the object format is known to be aout
|
||||||
|
proc is_aout_format {} {
|
||||||
|
if { [istarget *-*-*\[ab\]out*] \
|
||||||
|
|| [istarget *-*-linux*oldld*] \
|
||||||
|
|| [istarget *-*-msdos*] \
|
||||||
|
|| [istarget arm-*-netbsd] \
|
||||||
|
|| [istarget i?86-*-netbsd] \
|
||||||
|
|| [istarget i?86-*-mach*] \
|
||||||
|
|| [istarget i?86-*-vsta] \
|
||||||
|
|| [istarget pdp11-*-*] \
|
||||||
|
|| [istarget m68*-ericsson-ose] \
|
||||||
|
|| [istarget m68k-hp-bsd*] \
|
||||||
|
|| [istarget m68*-*-hpux*] \
|
||||||
|
|| [istarget m68*-*-netbsd] \
|
||||||
|
|| [istarget m68*-*-netbsd*4k*] \
|
||||||
|
|| [istarget m68k-sony-*] \
|
||||||
|
|| [istarget m68*-sun-sunos\[34\]*] \
|
||||||
|
|| [istarget m68*-wrs-vxworks*] \
|
||||||
|
|| [istarget ns32k-*-*] \
|
||||||
|
|| [istarget sparc*-*-netbsd] \
|
||||||
|
|| [istarget sparc-sun-sunos4*] \
|
||||||
|
|| [istarget vax-dec-ultrix*] \
|
||||||
|
|| [istarget vax-*-netbsd] } {
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# is_pecoff_format
|
# is_pecoff_format
|
||||||
# true if the object format is known to be PECOFF
|
# true if the object format is known to be PECOFF
|
||||||
|
|
Loading…
Reference in New Issue