This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: GOLD ALIGN ISSUE
- From: Ian Lance Taylor <iant at google dot com>
- To: Takis Psarogiannakopoulos <takis at XFree86 dot Org>
- Cc: binutils at sourceware dot org
- Date: Tue, 15 Dec 2009 17:01:10 -0800
- Subject: Re: GOLD ALIGN ISSUE
- References: <20091212114104.Y10777@public.xfree86.org>
Takis Psarogiannakopoulos <takis@XFree86.Org> writes:
> This is a typical exe on some native system
> objdymp -p ...
>
> DYNAMIC off 0x000008e0 vaddr 0x080498e0 paddr 0x080498e0 align 2**0
> filesz 0x000000c0 memsz 0x000000c0 flags rwx
>
> Now this is what gold does on newly created exe.
>
> DYNAMIC off 0x00000830 vaddr 0x08049830 paddr 0x08049830 align 2**2
> filesz 0x00000098 memsz 0x00000098 flags rw-
>
> I had asked before about that, and Ive been told I would get default 2**0.
> But i am getting 2**2. How we force 2**0 (Ian) ?
The alignment of the program segment is set based on the alignment of
the sections which are stored in the segment. In this case since the
.dynamic section has an alignment of 2**2, the PT_DYNAMIC segment gets
an alignment of 2**2. That seems entirely correct to me, and your
other linker seems wrong (although in practice it doesn't matter).
Is it really important to change this?
Ian