Porting binutils to Amiga Unix

Maciej W. Rozycki macro@linux-mips.org
Sat Apr 15 00:14:00 GMT 2017


On Tue, 11 Apr 2017, Nick Clifton wrote:

> The GNU assembler does support a .lcomm directive with three arguments, but only
> for certain targets.  Unfortunately the m68k is not one of these targets.  So in
> order to fix your problem and have aligned entries in the .bss section you are 
> going to have to modify the assembler sources.
> 
> Specifically you should find the definition of md_pseudo_table in gas/config/tc-m68k.c
> and add entry that reads:
> 
>    { "lcomm", s_lcomm_bytes, 1 },
>  
> Assuming that you want the alignment parameter to be a power of two, or:
> 
>    { "lcomm", s_lcomm_bytes, 2 },
>  
> If you want the alignment power to be a number of bytes.  (Yes the sense of the
> numbers is reversed.  No, I do not know why... :-)
> 
> Recompile and off you go.
> 
> BUT .. this would be a change that would affect all forms of the m68k assembler,
> which would be a bad thing.  So either you need to protect this new definition with
> a #ifdef ... #endif specific to the Amiga Unix port of the assembler, or else you
> need to invent a new name for the pseudo-op and use that instead.  Or both.  For 
> example:
> 
> #ifdef AMIGA_UNIX
>    { "aligned_lcomm", s_lcomm_bytes, 1 },
>  #endif

 Or, if necessary, you can handle the modified or new pseudo-op definition 
at the run time, like the MIPS target does in gas/config/tc-mips.c with 
`mips_nonecoff_pseudo_table'.

  Maciej



More information about the Binutils mailing list