This is the mail archive of the
mailing list for the binutils project.
Re: MIPS gas doesn't set SH_FLAG
Thanks for looking at this.
> It is a bigger, messier puzzle in that no MIPS specific ELF section
> header flags can (currently) be set via the .section directive.
would have guessed that it was that much more general...
> 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.
Could I try out the patch? It wasn't attached to the copies of your
email that I received, and I haven't found it poking around binutils
web pages that I see (I'm not oriented there at all).
> 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...
When I was looking at this I wondered about an objcopy workaround.
If --set-section-flags was generalized to take a numeric value with
the desired bits set, it could come in handy.
In case anyone is interested: the real problem arose from a user
of gnu Ada being unable to use some SGI tools (e.g. pixie) because
IRIX ld output two .debug_frame sections because the flags were
set differently in different input relocatables (some with NOSTRIP, some
without). gcc is setting NOSTRIP, but gas is ignoring it. We are
working with gas instead of the IRIX assembler, because IRIX 'as' is
broken in a couple of ways that are real show stoppers.