From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13911 invoked by alias); 25 Jul 2003 16:10:26 -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 13904 invoked from network); 25 Jul 2003 16:10:25 -0000 Received: from unknown (HELO rwcrmhc11.comcast.net) (204.127.198.35) by sources.redhat.com with SMTP; 25 Jul 2003 16:10:25 -0000 Received: from lucon.org ([12.234.88.5]) by comcast.net (rwcrmhc11) with ESMTP id <2003072516102401300ork94e>; Fri, 25 Jul 2003 16:10:24 +0000 Received: by lucon.org (Postfix, from userid 1000) id 846CC2C4EB; Fri, 25 Jul 2003 16:10:18 +0000 (UTC) Date: Fri, 25 Jul 2003 16:10:00 -0000 From: "H. J. Lu" To: Nick Clifton Cc: binutils@sources.redhat.com Subject: Re: PATCH: Don't use section name to set ELF section data Message-ID: <20030725161018.GA31551@lucon.org> References: <20030614190932.GA5459@lucon.org> <20030725013603.GB17609@lucon.org> <20030725143806.GA29992@lucon.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="ikeVEW9yuYc//A+q" Content-Disposition: inline In-Reply-To: <20030725143806.GA29992@lucon.org> User-Agent: Mutt/1.4.1i X-SW-Source: 2003-07/txt/msg00510.txt.bz2 --ikeVEW9yuYc//A+q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 629 On Fri, Jul 25, 2003 at 07:38:06AM -0700, H. J. Lu wrote: > On Fri, Jul 25, 2003 at 01:25:31PM +0100, Nick Clifton wrote: > > Hi H.J. > > > > > Here is the new patch. It caused no regressions on all targets > > > affected. It fixed an ELF/ppc64 bug. > > > > Excellent. > > ... > > > Approved - please apply. > > > > Done. I made a small change. I used > > if (! BFD_SEND ((B), _new_section_hook, ((B), (S)))) \ > > instead of > > if (!_bfd_elf_new_section_hook ((B), (S))) \ > My patch mishandled the case: .section .foo,"aw",@nobits I checked in the following patch as an obvious fix. H.J. --ikeVEW9yuYc//A+q Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="gas-type.patch" Content-length: 641 2003-07-25 H.J. Lu * config/obj-elf.c (obj_elf_change_section): Always set section type and flags. --- gas/config/obj-elf.c.type 2003-07-25 09:03:06.000000000 -0700 +++ gas/config/obj-elf.c 2003-07-25 08:59:49.000000000 -0700 @@ -681,11 +681,11 @@ obj_elf_change_section (name, type, attr name); } attr |= def_attr; - - elf_section_type (sec) = type; - elf_section_flags (sec) = attr; } + elf_section_type (sec) = type; + elf_section_flags (sec) = attr; + /* Convert ELF type and flags to BFD flags. */ flags = (SEC_RELOC | ((attr & SHF_WRITE) ? 0 : SEC_READONLY) --ikeVEW9yuYc//A+q--