This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: GOLD ALIGN ISSUE
- From: Takis Psarogiannakopoulos <takis at XFree86 dot Org>
- To: binutils at sourceware dot org
- Date: Sat, 12 Dec 2009 18:36:57 -0800 (PST)
- Subject: Re: GOLD ALIGN ISSUE
- References: <20091212114104.Y10777@public.xfree86.org>
On Sat, 12 Dec 2009, Takis Psarogiannakopoulos wrote:
>
> 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) ?
>
Well I guess we can do that in output.cc, Output_segment::write_header as
+ if (this->type_ == elfcpp::PT_DYNAMIC)
+ ophdr->put_p_align(0);
+ else
ophdr->put_p_align(std::max(this->min_p_align_,
this->maximum_alignment()));