2 68k cpu questions
Franzi Edo.
edo.franzi@ukos.ch
Wed May 24 18:47:00 GMT 2006
Thank's Dave,
Unfortunately your suggestion doesn't help me.
On 24 May 2006, at 13:50, Dave Korn wrote:
> On 23 May 2006 22:15, Franzi Edo. wrote:
>
>> Any suggestion on how to define (or use) this symbol?
>
> #include <errno.h> is the usual way to define it. "-lc" is the
> usual way to
> use it.
>
On my application I use <errno.h> and in my makefile I use -lc
Moreover, I tried to introduce 2 times -lc ... unsuccessfully!
Here is my makefile
CPU = m68k-elf
CC = $(CPU)-gcc
LD = $(CPU)-ld
CC_CFLAGS = -Wall -Os -g -c
LD_CFLAGS = -M -r -T
LIBINOU = ../../../../_08_GCC_Stufs/Target/LCF332G
INCLTAR = ../../../../Includes/Target/LCF332G
DEP = $(INCLTAR)/uKOS.h \
Makefile
all : PRGM_01.elf
PRGM_01.elf : crt0.o PRGM_01.o c68_Usr.ld Makefile
$(LD) crt0.o PRGM_01.o -lc -lc $(LIBINOU)/libIO.a $(LD_CFLAGS)
c68_Usr.ld -nostartfiles -o $@
crt0.o : crt0.s Makefile
$(CC) -nostartfiles -c $<
%.o : %.c Makefile
$(CC) -nostartfiles -c $<
clean:
rm -f *.o *.elf
>> My second question is about the access to the static data. I would
>> like to point the data with an index register
>> (typically A5). So, the crt0 should be able to initialise A5 with
>> the .data pointer and I would like that gcc generates the
>> data access like this move.l .....,(offsetxyz,A5).
>>
>> Any suggestion on how to implement this?
>
> By using "gcc -fpic/-fPIC"?
>
For this problem the flag fpic/fPIC makes the code relocatable (the
call, jumps etc. referenced by PC), but the data still remain coded
in absolute (no usage of the A5 or other registers).
Any other ideas?
Regards, Edo
--
For unsubscribe information see http://sourceware.org/lists.html#faq
More information about the crossgcc
mailing list