* Ld option -z mistreat (new tests ld-elf/commonpage1 ld-elf/maxpage1 fail for cris-elf arm-elf)
@ 2006-05-31 16:28 Hans-Peter Nilsson
2006-05-31 16:46 ` Thiemo Seufer
2006-05-31 21:46 ` Alan Modra
0 siblings, 2 replies; 5+ messages in thread
From: Hans-Peter Nilsson @ 2006-05-31 16:28 UTC (permalink / raw)
To: hongjiu.lu; +Cc: binutils
My autotester noticed:
Running /h/hp/binutils/cvs_latest/src/ld/testsuite/ld-elf/elf.exp ...
FAIL: ld-elf/commonpage1
FAIL: ld-elf/maxpage1
With the message in ld.log:
Running /h/hp/binutils/cvs_latest/src/ld/testsuite/ld-elf/elf.exp ...
/n/asic_slask/hp/autobinutest/ld/../gas/as-new -o tmpdir/dump0.o /h/hp/binutils/cvs_latest/src/ld/testsuite/ld-elf/maxpage1.s
./ld-new -L/h/hp/binutils/cvs_latest/src/ld/testsuite/ld-elf -z max-page-size=0x200000 -z common-page-size=0x100000 -o tmpdir/dump tmpdir/dump0.o
failed with: <./ld-new: unrecognized option '-z'
./ld-new: use the --help option for usage information>, expected: <>
./ld-new: unrecognized option '-z'
./ld-new: use the --help option for usage information
/n/asic_slask/hp/autobinutest/ld/../binutils/readelf -l --wide tmpdir/dump > tmpdir/dump.out
readelf: Error: 'tmpdir/dump': No such file
FAIL: ld-elf/commonpage1
and similar for maxpage1.
It looked like a port buglet, but it also fails for
--target=arm-elf so apparently not the case.
Is the -z option supposed to be Linux-specific and so a
"target: *-*-linux*" added to the top of the .d files the
obvious solution? Looking at elf32.em
gld${EMULATION_NAME}_add_options it seems -z should be a general
ELF-option, but de facto not.
FWIW, the
tests pass for native i686-pc-linux-gnu and cross to
cris-axis-linux-gnu.
brgds, H-P
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Ld option -z mistreat (new tests ld-elf/commonpage1 ld-elf/maxpage1 fail for cris-elf arm-elf)
2006-05-31 16:28 Ld option -z mistreat (new tests ld-elf/commonpage1 ld-elf/maxpage1 fail for cris-elf arm-elf) Hans-Peter Nilsson
@ 2006-05-31 16:46 ` Thiemo Seufer
2006-05-31 21:46 ` Alan Modra
1 sibling, 0 replies; 5+ messages in thread
From: Thiemo Seufer @ 2006-05-31 16:46 UTC (permalink / raw)
To: Hans-Peter Nilsson; +Cc: hongjiu.lu, binutils
Hans-Peter Nilsson wrote:
> My autotester noticed:
> Running /h/hp/binutils/cvs_latest/src/ld/testsuite/ld-elf/elf.exp ...
> FAIL: ld-elf/commonpage1
> FAIL: ld-elf/maxpage1
For mips-linux:
FAIL: ld-elf/commonpage1
FAIL: ld-elf/maxpage1
FAIL: MIPS multi-got-no-shared
/home/ths/gcc/binutils-upstream/head-build/ld/../gas/as-new -o tmpdir/dump0.o /home/ths/gcc/binutils-upstream/head/ld/testsuite/ld-elf/maxpage1.s
./ld-new -L/home/ths/gcc/binutils-upstream/head/ld/testsuite/ld-elf -z max-page-size=0x200000 -z common-page-size=0x100000 -o tmpdir/dump tmpdir/dump0.o
succeeded with: <./ld-new: warning: cannot find entry symbol __start; defaulting to 00000000004000b0>, expected: <>
./ld-new: warning: cannot find entry symbol __start; defaulting to 00000000004000b0
succeeded with: <./ld-new: warning: cannot find entry symbol __start; defaulting to 00000000004000b0>, expected: <>
FAIL: ld-elf/commonpage1
[snip]
/home/ths/gcc/binutils-upstream/head-build/ld/../gas/as-new -o tmpdir/dump0.o /home/ths/gcc/binutils-upstream/head/ld/testsuite/ld-elf/maxpage1.s
./ld-new -L/home/ths/gcc/binutils-upstream/head/ld/testsuite/ld-elf -z max-page-size=0x200000 -o tmpdir/dump tmpdir/dump0.o
succeeded with: <./ld-new: warning: cannot find entry symbol __start; defaulting to 00000000004000b0>, expected: <>
./ld-new: warning: cannot find entry symbol __start; defaulting to 00000000004000b0
succeeded with: <./ld-new: warning: cannot find entry symbol __start; defaulting to 00000000004000b0>, expected: <>
FAIL: ld-elf/maxpage1
[snip]
/home/ths/gcc/binutils-upstream/head-build/ld/../gas/as-new -EB -32 -KPIC -mno-shared -o tmpdir/dump0.o /home/ths/gcc/binutils-upstream/head/ld/testsuite/ld-mips-elf/multi-got-no-shared-1.s
/home/ths/gcc/binutils-upstream/head-build/ld/../gas/as-new -EB -32 -KPIC -mno-shared -o tmpdir/dump1.o /home/ths/gcc/binutils-upstream/head/ld/testsuite/ld-mips-elf/multi-got-no-shared-2.s
./ld-new -L/home/ths/gcc/binutils-upstream/head/ld/testsuite/ld-mips-elf -melf32btsmip --entry func1 -o tmpdir/dump tmpdir/dump0.o tmpdir/dump1.o
/home/ths/gcc/binutils-upstream/head-build/ld/../binutils/objdump -D -j .text --prefix-addresses --show-raw-insn tmpdir/dump > tmpdir/dump.out
regexp_diff match failure
regexp "^004000b0 <[^>]*> 3c1c0046 lui gp,0x46$"
line "004000b0 <func1> 3c1c0043 lui gp,0x43"
extra regexps in /home/ths/gcc/binutils-upstream/head/ld/testsuite/ld-mips-elf/multi-got-no-shared.d starting with "^00408d60 <[^>]*> 3c1c0047 lui gp,0x47$"
EOF from tmpdir/dump.out
FAIL: MIPS multi-got-no-shared
The ld-elf failures are just the usual missing __start for mips, I
haven't looked into multi-got-no-shared yet.
Thiemo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Ld option -z mistreat (new tests ld-elf/commonpage1 ld-elf/maxpage1 fail for cris-elf arm-elf)
2006-05-31 16:28 Ld option -z mistreat (new tests ld-elf/commonpage1 ld-elf/maxpage1 fail for cris-elf arm-elf) Hans-Peter Nilsson
2006-05-31 16:46 ` Thiemo Seufer
@ 2006-05-31 21:46 ` Alan Modra
2006-05-31 21:57 ` Hans-Peter Nilsson
1 sibling, 1 reply; 5+ messages in thread
From: Alan Modra @ 2006-05-31 21:46 UTC (permalink / raw)
To: Hans-Peter Nilsson; +Cc: hongjiu.lu, binutils
On Wed, May 31, 2006 at 12:05:45PM +0200, Hans-Peter Nilsson wrote:
> ./ld-new: unrecognized option '-z'
> ./ld-new: use the --help option for usage information
The failure is because cris-elf doesn't support shared libs.
GENERATE_SHLIB_SCRIPT isn't set.
--
Alan Modra
IBM OzLabs - Linux Technology Centre
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Ld option -z mistreat (new tests ld-elf/commonpage1 ld-elf/maxpage1 fail for cris-elf arm-elf)
2006-05-31 21:46 ` Alan Modra
@ 2006-05-31 21:57 ` Hans-Peter Nilsson
2006-05-31 23:21 ` [RFA:] " Hans-Peter Nilsson
0 siblings, 1 reply; 5+ messages in thread
From: Hans-Peter Nilsson @ 2006-05-31 21:57 UTC (permalink / raw)
To: amodra; +Cc: hans-peter.nilsson, hongjiu.lu, binutils
> Date: Wed, 31 May 2006 23:07:41 +0930
> From: Alan Modra <amodra@bigpond.net.au>
> On Wed, May 31, 2006 at 12:05:45PM +0200, Hans-Peter Nilsson wrote:
> > ./ld-new: unrecognized option '-z'
> > ./ld-new: use the --help option for usage information
>
> The failure is because cris-elf
And arm-elf, and...
> doesn't support shared libs.
> GENERATE_SHLIB_SCRIPT isn't set.
Inferring that all run_dump-tests using -z options should use
"#target:" or "#notarget:".
Tested cris-elf, arm-elf native i686-pc-linux-gnu and cross to
cris-axis-linux-gnu. Ok to commit?
ld/testsuite:
* ld-elf/commonpage1.d, ld-elf/maxpage1.d: Restrict to target
*-*-linux*.
Index: ld-elf/commonpage1.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-elf/commonpage1.d,v
retrieving revision 1.1
diff -u -p -r1.1 commonpage1.d
--- ld-elf/commonpage1.d 30 May 2006 16:45:32 -0000 1.1
+++ ld-elf/commonpage1.d 31 May 2006 14:28:40 -0000
@@ -1,5 +1,6 @@
#source: maxpage1.s
#ld: -z max-page-size=0x200000 -z common-page-size=0x100000
+#target: *-*-linux*
#readelf: -l --wide
#...
Index: ld-elf/maxpage1.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-elf/maxpage1.d,v
retrieving revision 1.1
diff -u -p -r1.1 maxpage1.d
--- ld-elf/maxpage1.d 30 May 2006 16:45:32 -0000 1.1
+++ ld-elf/maxpage1.d 31 May 2006 14:28:40 -0000
@@ -1,5 +1,6 @@
#source: maxpage1.s
#ld: -z max-page-size=0x200000
+#target: *-*-linux*
#readelf: -l --wide
#...
brgds, H-P
^ permalink raw reply [flat|nested] 5+ messages in thread
* [RFA:] Re: Ld option -z mistreat (new tests ld-elf/commonpage1 ld-elf/maxpage1 fail for cris-elf arm-elf)
2006-05-31 21:57 ` Hans-Peter Nilsson
@ 2006-05-31 23:21 ` Hans-Peter Nilsson
0 siblings, 0 replies; 5+ messages in thread
From: Hans-Peter Nilsson @ 2006-05-31 23:21 UTC (permalink / raw)
To: binutils
> Date: Wed, 31 May 2006 16:30:40 +0200
> From: Hans-Peter Nilsson <hp@axis.com>
> Inferring that all run_dump-tests using -z options should use
> "#target:" or "#notarget:".
Similarly other tests needing to use the ld -z option, of
course. Like these one, which get UNRESOLVED otherwise, thus a
nonzero "make check" exit. These are the only tests in
binutils.exp and there's a is_elf_format test at the top, but
future tests could presumably be added that don't use -z, so I
put the condition close to the test. Checked cross to
cris-axis-elf.
Ok to commit?
* ld-elf/binutils.exp: Restrict tests using ld option -z to target
*-*-linux*.
Index: binutils.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-elf/binutils.exp,v
retrieving revision 1.1
diff -u -p -r1.1 binutils.exp
--- binutils.exp 30 May 2006 16:45:32 -0000 1.1
+++ binutils.exp 31 May 2006 16:22:42 -0000
@@ -76,5 +76,10 @@ proc strip_test { ld_options test } {
pass "$ld_options"
}
-strip_test "-z max-page-size=0x200000" maxpage1
-strip_test "-z max-page-size=0x200000 -z common-page-size=0x100000" maxpage1
+# Use ld -z options only for GNU/Linux targets; they're unrecognized for
+# targets that don't support dynamic linking.
+
+if [istarget *-*-linux*] {
+ strip_test "-z max-page-size=0x200000" maxpage1
+ strip_test "-z max-page-size=0x200000 -z common-page-size=0x100000" maxpage1
+}
brgds, H-P
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-05-31 16:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-31 16:28 Ld option -z mistreat (new tests ld-elf/commonpage1 ld-elf/maxpage1 fail for cris-elf arm-elf) Hans-Peter Nilsson
2006-05-31 16:46 ` Thiemo Seufer
2006-05-31 21:46 ` Alan Modra
2006-05-31 21:57 ` Hans-Peter Nilsson
2006-05-31 23:21 ` [RFA:] " Hans-Peter Nilsson
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).