From: "H. J. Lu" <hjl@lucon.org>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Roland McGrath <roland@redhat.com>,
Ulrich Drepper <drepper@redhat.com>,
Glibc hackers <libc-hacker@sources.redhat.com>,
binutils@sources.redhat.com
Subject: Re: [PATCH] Fix tst-array* on x86_64
Date: Tue, 10 Dec 2002 09:43:00 -0000 [thread overview]
Message-ID: <20021210094308.A11254@lucon.org> (raw)
In-Reply-To: <20021210145250.M1310@sunsite.ms.mff.cuni.cz>; from jakub@redhat.com on Tue, Dec 10, 2002 at 02:52:50PM +0100
On Tue, Dec 10, 2002 at 02:52:50PM +0100, Jakub Jelinek wrote:
> Hi!
>
> This is actually the same crap as I had to work around in test-string.h,
> ie. x86_64 aligns preinit_array etc. to 16 bytes because they are >=
> 16 bytes, yet its actual size is 24 bytes.
> /* x86-64 ABI requires arrays greater than 16 bytes to be aligned
> to 16byte boundary. */
> Linker script of course doesn't expect .init_array/.fini_array/.preinit_array
> sections to be more than word aligned and thus the labels around them
> are on wrong positions.
>
> 2002-12-10 Jakub Jelinek <jakub@redhat.com>
>
> * elf/tst-array1.c (preinit_array, init_array, fini_array):
> Explicitely align the array to sizeof (void *).
> * elf/tst-array2dep.c (init_array, fini_array): Likewise.
>
> --- libc/elf/tst-array1.c.jj 2002-11-07 23:28:04.000000000 +0100
> +++ libc/elf/tst-array1.c 2002-12-10 16:01:54.000000000 +0100
> @@ -35,7 +35,7 @@ preinit_2 (void)
> }
>
> void (*const preinit_array []) (void)
> - __attribute__ ((section (".preinit_array"))) =
> + __attribute__ ((section (".preinit_array"), aligned (sizeof (void *)))) =
> {
> &preinit_0,
> &preinit_1,
I assume size of void * is 8 byte for x86_64. Will it align at 16 byte?
Those *_array sections are special sections. Should they be handled by
gas/ld automatically?
H.J.
next prev parent reply other threads:[~2002-12-10 17:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-10 5:52 Jakub Jelinek
2002-12-10 9:43 ` H. J. Lu [this message]
2002-12-10 10:06 ` Jakub Jelinek
2002-12-10 10:47 ` Ulrich Drepper
2002-12-10 15:25 ` Roland McGrath
2002-12-10 15:44 ` H. J. Lu
2002-12-10 16:35 ` Roland McGrath
2002-12-10 16:56 ` H. J. Lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20021210094308.A11254@lucon.org \
--to=hjl@lucon.org \
--cc=binutils@sources.redhat.com \
--cc=drepper@redhat.com \
--cc=jakub@redhat.com \
--cc=libc-hacker@sources.redhat.com \
--cc=roland@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).