This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: RFC: should MIPS gas have a -mlong switch?
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Richard Sandiford <rsandifo at redhat dot com>
- Cc: binutils at sources dot redhat dot com, echristo at redhat dot com
- Date: Fri, 4 Oct 2002 10:17:28 -0400
- Subject: Re: RFC: should MIPS gas have a -mlong switch?
- References: <wvnvg4ib9ms.fsf@talisman.cambridge.redhat.com>
On Fri, Oct 04, 2002 at 02:45:31PM +0100, Richard Sandiford wrote:
> I'm sure this has been discussed before, but I can't seem
> to find anything in the archives...
>
> What do folks think about adding -mlong options to MIPS
> gas and storing the long size in the header flags?
> It'd give tighter linker checking, and would allow
> the GDB command line to handle "(long)" correctly.
Only the former should be a problem... or debugging something written
entirely in assembly. GCC outputs the size of a long:
<1><10d>: Abbrev Number: 13 (DW_TAG_base_type)
DW_AT_name : (indirect string, offset: 0xe4b6): long int
DW_AT_byte_size : 4
DW_AT_encoding : 5 (signed)
[GDB doesn't correctly use that now, but that's a different problem.]
> 3. Don't do it. Get GCC to emit a .gcc_compiled_longXX
> section instead.
>
> Pro: backwards compatible, doesn't need gas to have a -mlong option.
> Con: perpetuates an old hack.
That looks like it only has the GDB benefit; and you can get that an
easier/more correct way.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer