This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: ld-elf/header failed for Linux/ia64
On Wed, Jan 17, 2007 at 10:44:36AM -0800, H. J. Lu wrote:
> Hi Nathan,
>
> The issue is .text section on ia64 is aligned at 16byte, not 4 byte.
> Instead of
>
> Section Headers:
> [Nr] Name Type Address Offset
> Size EntSize Flags Link Info Align
> [ 0] NULL 0000000000000000 00000000
> 0000000000000000 0000000000000000 0 0 0
> [ 1] .text PROGBITS 0000000000010078 00000078
> 000000000000ffac 0000000000000000 AX 0 0 4
>
> I got
>
> Section Headers:
> [Nr] Name Type Address Offset
> Size EntSize Flags Link Info Align
> [ 0] NULL 0000000000000000 00000000
> 0000000000000000 0000000000000000 0 0 0
> [ 1] .text PROGBITS 0000000000010080 00000080
> 000000000000ffac 0000000000000000 AX 0 0 16
>
> I will adjust your testcase.
>
I am checking this change as an obvious change.
H.J.
---
2007-01-17 H.J. Lu <hongjiu.lu@intel.com>
* ld-elf/header.d: Adjust for .text section with 16byte
alignment.
--- ld-elf/header.d.ia64 2007-01-12 09:41:40.000000000 -0800
+++ ld-elf/header.d 2007-01-17 11:08:53.000000000 -0800
@@ -5,9 +5,9 @@
#...
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
+ filesz 0x0*00100[23][048] memsz 0x0*00100[23][048] 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
+ 0 .text 0*000ffac 0*00100[78][048] 0*00100[78][048] 0*00000[78][048] 2... CONTENTS, ALLOC, LOAD, READONLY, CODE
+ 1 .data 0*0000004 0*002002[04c] 0*002002[04c] 0*001002[04c] 2... CONTENTS, ALLOC, LOAD, DATA