From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24205 invoked by alias); 10 Dec 2002 23:44:28 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 24187 invoked from network); 10 Dec 2002 23:44:28 -0000 Received: from unknown (HELO sccrmhc01.attbi.com) (204.127.202.61) by sources.redhat.com with SMTP; 10 Dec 2002 23:44:28 -0000 Received: from lucon.org (12-234-88-146.client.attbi.com[12.234.88.146]) by sccrmhc01.attbi.com (sccrmhc01) with ESMTP id <2002121023442700100pv53ge>; Tue, 10 Dec 2002 23:44:27 +0000 Received: by lucon.org (Postfix, from userid 1000) id 08E032C698; Tue, 10 Dec 2002 15:44:27 -0800 (PST) Date: Tue, 10 Dec 2002 15:44:00 -0000 From: "H. J. Lu" To: Roland McGrath Cc: Ulrich Drepper , Jakub Jelinek , Glibc hackers Subject: Re: [PATCH] Fix tst-array* on x86_64 Message-ID: <20021210154427.A4165@lucon.org> References: <3DF636B9.8070802@redhat.com> <200212102325.gBANPcs29501@magilla.sf.frob.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <200212102325.gBANPcs29501@magilla.sf.frob.com>; from roland@redhat.com on Tue, Dec 10, 2002 at 03:25:38PM -0800 X-SW-Source: 2002-12/txt/msg00024.txt.bz2 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.