From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4726 invoked by alias); 28 Jul 2003 14:42:54 -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 4719 invoked from network); 28 Jul 2003 14:42:50 -0000 Received: from unknown (HELO localhost.localdomain) (195.113.19.66) by sources.redhat.com with SMTP; 28 Jul 2003 14:42:50 -0000 Received: from sunsite.ms.mff.cuni.cz (sunsite.mff.cuni.cz [127.0.0.1]) by localhost.localdomain (8.12.8/8.12.8) with ESMTP id h6SEglqO025803; Mon, 28 Jul 2003 16:42:47 +0200 Received: (from jakub@localhost) by sunsite.ms.mff.cuni.cz (8.12.8/8.12.8/Submit) id h6SEgka2025793; Mon, 28 Jul 2003 16:42:46 +0200 Date: Mon, 28 Jul 2003 14:42:00 -0000 From: Jakub Jelinek To: binutils@sources.redhat.com, "H.J. Lu" Subject: Re: got and plt section attributes Message-ID: <20030728144245.GP20507@sunsite.ms.mff.cuni.cz> Reply-To: Jakub Jelinek References: <20030728142440.GY27145@bubble.sa.bigpond.net.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030728142440.GY27145@bubble.sa.bigpond.net.au> User-Agent: Mutt/1.4i X-SW-Source: 2003-07/txt/msg00533.txt.bz2 On Mon, Jul 28, 2003 at 11:54:40PM +0930, Alan Modra wrote: > This fixes warnings about "setting incorrect section attributes for > .got" when compiling gcc/config/rs6000/eabi-ci.asm. > > * elf.c (special_sections): Set attributes for .got and .plt. > > Index: bfd/elf.c > =================================================================== > RCS file: /cvs/src/src/bfd/elf.c,v > retrieving revision 1.193 > diff -u -p -r1.193 elf.c > --- bfd/elf.c 26 Jul 2003 01:06:27 -0000 1.193 > +++ bfd/elf.c 28 Jul 2003 14:10:11 -0000 > @@ -2192,13 +2192,13 @@ static struct bfd_elf_special_section co > { ".dynsym", 0, NULL, 0, > SHT_DYNSYM, SHF_ALLOC }, > { ".got", 0, NULL, 0, > - SHT_PROGBITS, 0 }, > + SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, > { ".hash", 0, NULL, 0, > SHT_HASH, SHF_ALLOC }, > { ".interp", 0, NULL, 0, > SHT_PROGBITS, 0 }, > { ".plt", 0, NULL, 0, > - SHT_PROGBITS, 0 }, > + SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR }, .plt is SHF_ALLOC + SHF_WRITE + SHF_EXECINSTR on about half of ELF arches I think (and SHT_NOBITS on ppc/ppc64). Do we really expect half of the arches to define their own special_section table with .plt section, or shouldn't backends inform ELF generic code whether they use .got.plt or not? Jakub