This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [Gold] Question about the incorrect variable alignment if the alignment is greater than the page size
- From: Ian Lance Taylor <iant at google dot com>
- To: Alexander Ivchenko <aivchenk at gmail dot com>
- Cc: binutils <binutils at sourceware dot org>
- Date: Fri, 31 May 2013 06:41:23 -0700
- Subject: Re: [Gold] Question about the incorrect variable alignment if the alignment is greater than the page size
- References: <CACysShirkNk_oLSTqSWZ9-YThCb_Gx=0jC-_KPh8ZwkWjxHJkQ at mail dot gmail dot com>
On Fri, May 31, 2013 at 4:13 AM, Alexander Ivchenko <aivchenk@gmail.com> wrote:
>
> Was that behavior made intentionally or it's just a bug?
> I know that it's a pretty big alignment and that could be suspicious,
> but we can at least warn the user that his code won't be linked the
> way it was written.
It's a bug. The bug is in Layout::set_segment_offsets. It rounds the
address to abi_pagesize without considering that the segment alignment
might be larger than that.
Ian