This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gas simple-forward test


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]