From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15868 invoked by alias); 12 Aug 2003 00:25:37 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 15839 invoked from network); 12 Aug 2003 00:25:36 -0000 Received: from unknown (HELO mta08ps.bigpond.com) (144.135.25.169) by sources.redhat.com with SMTP; 12 Aug 2003 00:25:36 -0000 Received: from bubble.local ([144.135.25.87]) by mta08ps.email.bigpond.com (iPlanet Messaging Server 5.2 HotFix 1.14 (built Mar 18 2003)) with SMTP id <0HJH0057GD1H9X@mta08ps.email.bigpond.com> for binutils@sources.redhat.com; Tue, 12 Aug 2003 10:22:29 +1000 (EST) Received: from cpe-144-136-188-60.sa.bigpond.net.au ([144.136.188.60]) by psmam07bpa.bigpond.com(MailRouter V3.2g 125/12733776); Tue, 12 Aug 2003 10:22:29 +0000 Received: (qmail 1943 invoked by uid 179); Tue, 12 Aug 2003 00:22:29 +0000 Date: Tue, 12 Aug 2003 00:25:00 -0000 From: Alan Modra Subject: Re: powerpc64-linux hack In-reply-to: <3F37DC41.1060005@redhat.com> To: Ulrich Drepper , libc-alpha@sources.redhat.com Cc: binutils@sources.redhat.com, mostrows@watson.ibm.com Mail-followup-to: Ulrich Drepper , libc-alpha@sources.redhat.com, binutils@sources.redhat.com, mostrows@watson.ibm.com Message-id: <20030812002228.GA27145@bubble.sa.bigpond.net.au> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Content-disposition: inline User-Agent: Mutt/1.4i References: <20030811112952.GZ27145@bubble.sa.bigpond.net.au> <3F37DC41.1060005@redhat.com> X-SW-Source: 2003-08/txt/msg00168.txt.bz2 On Mon, Aug 11, 2003 at 11:11:13AM -0700, Ulrich Drepper wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Alan Modra wrote: > > We won't ever be returning to anything in crt1.o, so a toc adjustment is > > fine. > > > > * elf64-ppc.c (ppc64_elf_relocate_section): Add special case for crt1.o > > branch to __libc_start_main. > > That's a stupid change. There is no guarantee that future glibc > versions won't have different libc entry point names. I would never > accept hardcoding a name like this. If you need new functionality > design and implement it and use it for the __libc_start_main call. But > don't add a hack like this. Calm down. I did say it was a hack. Please apply the following. * sysdeps/powerpc/powerpc64/elf/start.S: Add a nop after __libc_start_main branch. Index: sysdeps/powerpc/powerpc64/elf/start.S =================================================================== RCS file: /cvs/glibc/libc/sysdeps/powerpc/powerpc64/elf/start.S,v retrieving revision 1.4 diff -u -p -r1.4 start.S --- sysdeps/powerpc/powerpc64/elf/start.S 10 Jul 2003 17:06:24 -0000 1.4 +++ sysdeps/powerpc/powerpc64/elf/start.S 12 Aug 2003 00:10:36 -0000 @@ -56,6 +56,9 @@ ENTRY(_start) /* and continue in libc-start, in glibc. */ b JUMPTARGET(BP_SYM(__libc_start_main)) +/* The linker needs this nop to recognize that it's OK to call via a + TOC adjusting stub. */ + nop END(_start) -- Alan Modra IBM OzLabs - Linux Technology Centre