GOLD ALIGN ISSUE
Takis Psarogiannakopoulos
takis@XFree86.Org
Sun Dec 13 03:27:00 GMT 2009
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()));
More information about the Binutils
mailing list