On 6 Jul, John Tytgat wrote in message
<bd1a1f6753.Jo@hobbes.bass-software.com>:
[Much useful stuff]
> Hope this helps a bit
It certainly does -- many thanks. A number of key gaps in my knowledge are
now filled, although it also raises some more questions that I didn't know
to ask before...
One of the sources I'm trying to move across is the IcnClipBrd module, which
came from ObjAsm code generated out of ARMalyser (as Thomas's original
sources were lost, IIRC). That's obviously not going to want to end up in
AIF format; I've had a dig around the GCCSDK sources, and having found the
DRender module have come up with something like the following
--8<--
AREA Module,CODE
ENTRY
ModuleHeader
DCD StartCode
DCD InitialisationCode
DCD FinalisationCode
DCD ServiceCallHandler offset
DCD TitleString
DCD HelpString
DCD CommandTable table offset
DCD 0
DCD 0
DCD 0
DCD 0
DCD 0
DCD ModuleFlagWord
ModuleFlagWord
DCD 1
; etc...
END
--8<--
Assembling this with
$ asasm -o main.o main.s
$ arm-unknown-riscos-strip -O binary -o hello_module,ffa main.o
(as DRender's Makefile does) seems to come up with the desired result. I'm
not sure if it's the "correct" way to do it, though -- it seems to be
generating an ELF file and then stripping away the ELF bits?
The original code (which originally came from ARMalyser) opened with simply
--8<--
ORG &0
ENTRY
--8<--
at the start which seems to cause AsAsm to generate unwanted code for
constructs like
--8<--
LDR R1, TaskWord
TaskWord
DCD &4B534154
--8<--
(specifically MOV R1, &xxxx where &xxxx is the offset into the module of
TaskWord, as opposed to PC-relative LDR R1, &xxxx which was intended).
Reading the ObjAsm manual gives the the impression that this is what I
should probably expect ORG 0 to do.
--
Steve Fryatt - Leeds, England
http://www.stevefryatt.org.uk/
_______________________________________________
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