Tuesday, 12 March 2013

Re: [gccsdk] Porting asasm

>> sudo apt-get install bison flex libarchive-dev
>> autoreconf --install
>> ./configure --target=arm-linux-gnueabihf
>> make
>> DESTDIR=<path/to/installation> make install
>
> BTW, --target is not taken into account by asasm.

Without that, it falls over building libelf:

elf.c:34:18: error: 'unknown' undeclared here (not in a function)

> Asasm is not yet fully EABI compliant and this is high on my todo list.
> You can do a temporary hack by defining ELF_EABI (see src/output.c) and
> see how far you get with this in your project. One of things which would
> be wrong are the branch relocations

That was surprisingly painless, it now links and runs a trivially simple
program that I put together to test it. Thanks for the warning about
branch relocations: intra-area branches seem to work fine, and I'm pretty
sure I can live without branches to other areas, at least initially,
because I'm mainly planning on using assembler for leaf functions anyway.

Here are the first few minor niggles:

1) There are missing install rules in asasm/unittests/compare/Makefile
and asasm/unittests/reloc/Makefile
2) asasm seems to think BX <register> was a 5T instruction - it was
introduced in 4T

Thanks,
Ben

_______________________________________________
GCCSDK mailing list gcc@gccsdk.riscos.info
Bugzilla: http://www.riscos.info/bugzilla/index.cgi
List Info: http://www.riscos.info/mailman/listinfo/gcc
Main Page: http://www.riscos.info/index.php/GCCSDK

No comments:

Post a Comment