This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GOLD ALIGN ISSUE



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()));


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]