gas simple-forward test

John Darrington
Tue Oct 23 14:51:00 GMT 2018

Thanks for the hint.

I pushed a fix for this.


On Tue, Oct 23, 2018 at 08:48:37PM +1030, Alan Modra wrote:
     On Tue, Oct 23, 2018 at 10:30:47AM +0200, John Darrington wrote:
     > S12Z fails this test.
     > I'm not entirely clear what the test is checking, so I cannot say
     > whether this reveals a problem with the test or with the S12Z itself.
     It's testing that ".byte expression" and similar directives are
     handled for expressions that are constants, but gas does not know the
     fact that they are constant at the time the directive is assembled.
     So target code emits a fixup but by the time md_apply_fix is reached,
     gas should have resolved the expression down to a constant and
     fx_addsy and fx_subsy are both NULL.  md_apply_fix should set fx_done
     and write out the value.
     In the s12z case it looks like you're missing support for .dc.w/.short
     since md_apply_fix doesn't handle BFD_RELOC_16.  Note that your target
     doesn't need to support 16-bit relocs in object files (just like it
     currently does not support 8-bit relocs but does handle BFD_RELOC_8
     fixups in md_apply_fix).
     Alan Modra
     Australia Development Lab, IBM

More information about the Binutils mailing list