This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: PATCH: Properly align __*_array_start
- From: Jakub Jelinek <jakub at redhat dot com>
- To: "H. J. Lu" <hjl at lucon dot org>
- Cc: binutils at sources dot redhat dot com, GNU C Library <libc-alpha at sources dot redhat dot com>
- Date: Mon, 16 Dec 2002 19:09:34 +0100
- Subject: Re: PATCH: Properly align __*_array_start
- References: <20021216100433.A23020@lucon.org>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, Dec 16, 2002 at 10:04:33AM -0800, H. J. Lu wrote:
> Hi Jakub,
>
> I don't believe
>
> http://sources.redhat.com/ml/libc-hacker/2002-12/msg00017.html
>
> is correct. The problem is we can have the .init_array section in a.o,
> b.o, c.o, .... You only want to align the first .init_array section
> the linker sees to the proper alignment according to the ABI since the
> linker will concatenate all .init_array sections into one. We don't
> want any gaps between them. The glibc problem is a linker bug. Please
> try the patch enclosed here.
The proper alignment of .init_array etc. is (IMHO) 8 on x86-64, not 16.
The ABI creators (Jan, Andreas) can explain their intent, but I think
.*_array are just special sections which contain function pointers,
it is not a C array variable with 2 or more members.
The alignment of 16 is a performance thing which makes no sense for
.*_array which are not copied somewhere else, just run one function pointer
following other one in crt*.
Jakub