public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
From: "H. J. Lu" <hjl@lucon.org>
To: Roland McGrath <roland@redhat.com>
Cc: Ulrich Drepper <drepper@redhat.com>,
	Jakub Jelinek <jakub@redhat.com>,
	Glibc hackers <libc-hacker@sources.redhat.com>
Subject: Re: [PATCH] Fix tst-array* on x86_64
Date: Tue, 10 Dec 2002 15:44:00 -0000	[thread overview]
Message-ID: <20021210154427.A4165@lucon.org> (raw)
In-Reply-To: <200212102325.gBANPcs29501@magilla.sf.frob.com>; from roland@redhat.com on Tue, Dec 10, 2002 at 03:25:38PM -0800

On Tue, Dec 10, 2002 at 03:25:38PM -0800, Roland McGrath wrote:
> > Why are the labels around wrong?  I would imagine that padding is added
> > and that if two .preinit_array sections have to be concatenated there is
> > garbage between them.  But still, the lables should be rights.
> 
> This padding is added by the compiler, inside the section.  
> The labels are created by the linker.  i.e.: 
> 
> .globl preinit_array
> 	.section	.preinit_array,"a",@progbits
> 	.align 16
> 	.type	preinit_array, @object
> 	.size	preinit_array, 24
> preinit_array:
> 	.quad ...
> 
> This doesn't explain exactly what I saw, which was the linker symbols and
> the sections not starting at the same address.  But even if they matched,
> the leading or trailing zeros bite.

Does

  /* Ensure the __preinit_array_start label is properly aligned.  We
     could instead move the label definition inside the section, but
     the linker would then create the section even if it turns out to
     be empty, which isn't pretty.  */
  ${RELOCATING+. = ALIGN(${ALIGNMENT});}
  ${RELOCATING+${CREATE_SHLIB-PROVIDE (__preinit_array_start = .);}}
  .preinit_array   ${RELOCATING-0} : { *(.preinit_array) }
  ${RELOCATING+${CREATE_SHLIB-PROVIDE (__preinit_array_end = .);}}

explain what you saw?


H.J.

  reply	other threads:[~2002-12-10 23:44 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
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 [this message]
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=20021210154427.A4165@lucon.org \
    --to=hjl@lucon.org \
    --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).