public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Nick Clifton <nickc@redhat.com>
To: Brett Porter <porter@adacore.com>,
	Eric Christopher <echristo@redhat.com>,
	seufer@csv.ica.uni-stuttgart.de
Cc: binutils@sources.redhat.com
Subject: Re: MIPS gas doesn't set SH_FLAG
Date: Mon, 28 Feb 2005 19:38:00 -0000	[thread overview]
Message-ID: <4223544F.7000407@redhat.com> (raw)
In-Reply-To: <Pine.GSO.4.58.0502232002530.3552@nile.gnat.com>

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  <nickc@redhat.com>

	* 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  <nickc@redhat.com>

	* 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.

  reply	other threads:[~2005-02-28 17:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-24  1:11 Changing .dynstr to be more C++ friendly? Chris Kirby
2005-02-24 13:15 ` MIPS gas doesn't set SH_FLAG Brett Porter
2005-02-28 19:38   ` Nick Clifton [this message]
2005-03-01  1:18     ` Eric Christopher
2005-03-01  9:47       ` Nick Clifton
2005-03-01 16:38         ` Brett Porter
2005-03-01 17:27         ` Eric Christopher
2005-02-24 13:58 ` Changing .dynstr to be more C++ friendly? Alan Modra
2005-02-24 17:14   ` Chris Kirby
2005-02-24 17:28     ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4223544F.7000407@redhat.com \
    --to=nickc@redhat.com \
    --cc=binutils@sources.redhat.com \
    --cc=echristo@redhat.com \
    --cc=porter@adacore.com \
    --cc=seufer@csv.ica.uni-stuttgart.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).