m68hc11 %hi relocate problem with carry

James Murray jsm@jsm-net.demon.co.uk
Sun Mar 4 15:01:00 GMT 2012


On Sat, 2012-03-03 at 15:40 -0700, Sean Keys wrote:
> Hi James,
> 
> Have a look at my latest XGATE patch. Actually it worked fine in the 
> previous patch too but you would have to look at more than the opcode 
> table file to notice that :).  It's a simple port to follow and it 
> appears to work as it should.
> 

I don't seem to be able to be able to compile it?

After adding in the missing config.sub, configure then works, but
building ends with numerous errors such as these:

/tmp/sean/bfd/elf32-xgate.c:580:1: error: ‘xgate_add_stub’ defined but
not used
/tmp/sean/bfd/elf32-xgate.c:635:1: error: ‘xgate_elf_set_symbol’ defined
but not used
/tmp/sean/bfd/elf32-xgate.c:627:1: error: ‘xgate_elf_export_one_stub’
defined but not used
/tmp/sean/bfd/elf32-xgate.c:755:13: error: ‘scan_sections_for_abi’
defined but not used
/tmp/sean/bfd/elf32-xgate.c:484:1: error:
‘elf32_xgate_link_hash_newfunc’ defined but not used

This was built using:
--target=xgate 	--enable-targets=xgate 


I'm guessing that you took a different approach to the suggested one
from MIPs though? That is quite involved.
For XGATE the high and low parts should always be adjacent which can
hopefully use a simpler solution.

%hi/%lo do appear to be be used in one place by m68hc11 gcc, however I
have not been aware of any buggy code generated due to this potential %
hi carry problem, so a remedy might be to issue an error in the case of
%hi with addition to the symbol. (I'm not sure I have the time right now
to correctly implement the method from MIPs.)

regards

James



More information about the Binutils mailing list