This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: New test ld-elf/header fails for cris-elf (likely elsewhere)
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- Cc: binutils at sourceware dot org
- Date: Fri, 12 Jan 2007 11:58:50 +0000
- Subject: Re: New test ld-elf/header fails for cris-elf (likely elsewhere)
- References: <200701111643.l0BGhWXC011519@ignucius.se.axis.com>
Hans-Peter,
this fixes the problems, I think -- I'd got too many zeroes in the page size
anyway. Shinking it down to 256 will mean the -z option will end up controlling
the allocation, which is what we want. Tested in i86-linux, powerpc-vxworks and
powerpc64-linux.
I'll check this in on Sunday, if no one points out a flaw.
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk
2007-01-12 Nathan Sidwell <nathan@codesourcery.com>
* ld-elf/header.d: Reduce page size, restrict to linux & vxworks
* ld-elf/header.s: Adjust.
* ld-elf/header.t: Reduce initial offset.
Index: ld-elf/header.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-elf/header.d,v
retrieving revision 1.1
diff -c -3 -p -r1.1 header.d
*** ld-elf/header.d 11 Jan 2007 12:23:53 -0000 1.1
--- ld-elf/header.d 12 Jan 2007 11:54:25 -0000
***************
*** 1,12 ****
! # ld: -T header.t -z max-page-size=0x10000
# objdump: -hpw
#...
Program Header:
! LOAD off 0x0*0000000 vaddr 0x0*0010000 paddr 0x0*0010000 align 2..16
! filesz 0x0*001002[48] memsz 0x0*001002[48] flags rwx
Sections:
Idx Name Size VMA *LMA *File off Algn Flags
! 0 .text 0*000ffac 0*001007[48] 0*001007[48] 0*000007[48] 2... CONTENTS, ALLOC, LOAD, READONLY, CODE
! 1 .data 0*0000004 0*002002[04] 0*002002[04] 0*001002[04] 2... CONTENTS, ALLOC, LOAD, DATA
--- 1,13 ----
! # target: *-*-linux* *-*-vxworks
! # ld: -T header.t -z max-page-size=0x100
# objdump: -hpw
#...
Program Header:
! LOAD off 0x0*0000000 vaddr 0x0*0000100 paddr 0x0*0000100 align 2..8
! filesz 0x0*000012[48] memsz 0x0*000012[48] flags rwx
Sections:
Idx Name Size VMA *LMA *File off Algn Flags
! 0 .text 0*00000ac 0*000017[48] 0*000017[48] 0*000007[48] 2... CONTENTS, ALLOC, LOAD, READONLY, CODE
! 1 .data 0*0000004 0*000022[04] 0*000022[04] 0*000012[04] 2... CONTENTS, ALLOC, LOAD, DATA
Index: ld-elf/header.s
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-elf/header.s,v
retrieving revision 1.1
diff -c -3 -p -r1.1 header.s
*** ld-elf/header.s 11 Jan 2007 12:23:53 -0000 1.1
--- ld-elf/header.s 12 Jan 2007 11:54:25 -0000
***************
*** 1,7 ****
.text
.globl main
main:
! .rept 0x4000 - 0x15
.long 0xfedcba98
.endr
.data
--- 1,7 ----
.text
.globl main
main:
! .rept 0x40 - 0x15
.long 0xfedcba98
.endr
.data
Index: ld-elf/header.t
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-elf/header.t,v
retrieving revision 1.1
diff -c -3 -p -r1.1 header.t
*** ld-elf/header.t 11 Jan 2007 12:23:53 -0000 1.1
--- ld-elf/header.t 12 Jan 2007 11:54:25 -0000
*************** ENTRY(main)
*** 2,8 ****
SECTIONS
{
! . = 0x10000 + SIZEOF_HEADERS;
.text : { *(.text) }
.data : { *(.data) }
}
--- 2,8 ----
SECTIONS
{
! . = 0x100 + SIZEOF_HEADERS;
.text : { *(.text) }
.data : { *(.data) }
}