RFC: should MIPS gas have a -mlong switch?
Daniel Jacobowitz
drow@mvista.com
Fri Oct 4 07:16:00 GMT 2002
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
More information about the Binutils
mailing list