New test ld-elf/header fails for cris-elf (likely elsewhere)

Nathan Sidwell nathan@codesourcery.com
Thu Jan 11 17:44:00 GMT 2007


Hans-Peter Nilsson wrote:

> with ld.log:
> ./ld-new  -L/h/hp/binutils/cvs_latest/src/ld/testsuite/ld-elf  -T header.t -z max-page-size=0x10000 -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/objdump  -hpw tmpdir/dump > tmpdir/dump.out
> regexp_diff match failure
> regexp "^    LOAD off    0x0*0000000 vaddr 0x0*0010000 paddr 0x0*0010000 align 2..16$"
> line   "    LOAD off    0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**13"
> regexp_diff match failure
> regexp "^         filesz 0x0*001002[48] memsz 0x0*001002[48] flags rwx$"
> line   "         filesz 0x00001002 memsz 0x00001002 flags rw-"
> (more errors elided)
> 
> It seems this test should be restricted to linux and just for
> one architecture (perhaps just for ix86-GNU/Linux), as the
> expected output checks for certain alignment for sections and
> for certain layout.  Depending on the scope of your test
> (comment absent in header.d), I suggest you add a line at the
> top of header.d:
> 
> #target: *-*-linux*
> 
> (Though, that doesn't cover the 64k-alignment issue.  Does this
> test really pass on ix86-linux?)
> 
> Should we add that or more such target lines, or should header.d
> be generalized regarding output?  (What's really to be tested?)

Primarily what's being tested is that the link doesn't crash.   Perhaps it's 
just sufficient to check that, rather than also check the output.

Whether the right alignments occur to tickle the orginal bug depends on the 
program header size and the page size.  As I don't think the page size is 
forceable from the test harness, or detectable in the assembler source, perhaps 
we should just check the link succeeds.  Thoughts?

nathan

-- 
Nathan Sidwell    ::   http://www.codesourcery.com   ::         CodeSourcery
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk



More information about the Binutils mailing list