From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26089 invoked by alias); 28 Feb 2005 17:15:27 -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 25655 invoked from network); 28 Feb 2005 17:15:14 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 28 Feb 2005 17:15:14 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j1SHFEDg026461 for ; Mon, 28 Feb 2005 12:15:14 -0500 Received: from pobox.surrey.redhat.com (pobox.surrey.redhat.com [172.16.10.17]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j1SHFCK03577; Mon, 28 Feb 2005 12:15:12 -0500 Received: from [172.31.0.98] (vpnuser4.surrey.redhat.com [172.16.9.4]) by pobox.surrey.redhat.com (8.12.8/8.12.8) with ESMTP id j1SHFAZc002272; Mon, 28 Feb 2005 17:15:11 GMT Message-ID: <4223544F.7000407@redhat.com> Date: Mon, 28 Feb 2005 19:38:00 -0000 From: Nick Clifton User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) MIME-Version: 1.0 To: Brett Porter , Eric Christopher , seufer@csv.ica.uni-stuttgart.de CC: binutils@sources.redhat.com Subject: Re: MIPS gas doesn't set SH_FLAG References: <5.1.0.14.0.20050223142247.01c54d50@sherlock> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2005-02/txt/msg00696.txt.bz2 Hi Brett, Hi Eric, Hi Thiemo, > Brett Porter wrote: > Here is a rather simple program: > > .section .debug_frame,0x7000001e,0x8000000,0,4 > .byte 0 > > I'm trying to assemble it on an IRIX64 6.5 system with a recently > released gas and with gas built from snapshot sources dated today. > > That section flag bit is for SHF_MIPS_NOSTRIP. elfdump shows that > it isn't set in the output file. It is set when assembled with the > IRIX assembler. I bumped into this one -- didn't go hunting for > other flags... > > Is this a simple missing piece or part of a bigger, messier puzzle, > or ??? It is a bigger, messier puzzle in that no MIPS specific ELF section header flags can (currently) be set via the .section directive. The MIPS port of GAS does have special code to handle setting other section header flags via the .section directive, so I am assuming that the intent was that MIPS specific flags would be supported too. Hence I am offering up the attached patch as a possible solution. Eric, Thiemo - what do you think ? Tested with no regressions on mips-elf, mips64-linux-gnu and mipsisa32el-linux-gnu targets. Note - as an aside I noticed that readelf does not currently decode and display the values of MIPS specific section flags - it probably should do this, if somebody wanted to write the code... Cheers Nick bfd/ChangeLog 2005-02-28 Nick Clifton * elfxx-mips.c (_bfd_mips_elf_fake_sections): Copy user specified, MIPS specific section flags into the fake section's header. gas/ChangeLog 2005-02-28 Nick Clifton * config/tc-mips.c (mips_elf_section_flags): New function. Ensure that user specified MIPS specific section flags are permitted in the section header. * config/tc-mips.h (md_elf_section_flags): Define. Use mips_elf_section_flags.