PATCH: Properly align __*_array_start
Jakub Jelinek
jakub@redhat.com
Mon Dec 16 10:09:00 GMT 2002
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
More information about the Libc-alpha
mailing list