[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Linking minixfs
This is probably obvious, but I can't find a solution in the docs,
so:
How on earth do you get minixfs to link ?
If I use the standard makefile, it cgcc chokes on the .s files, no
problem, a couple of lines like:
init.o: init.s
${CC} -c init.s -o init.o
work fine. Then it gets to the linking stage, and I get:
% cgcc -G -o minix.xfs init.o minixfs.o minixdev.o io.o cache.o dir.o
inode.o zone.o main.o trans.o misc.o bitmap.o check.o init.o
tinyxhdi.o kludge.o hdio.o -lgnu16
/data/sjg/gcc/lib/gnu16.olb(main.o): Undefined symbol "_main"
(It's actually done with make, so there's no %, but it makes things
clearer...)
Now if I create a function in (for eg: main.c)
int main()
{}
it will link fine, but this isn't what I want, 'cos then the standard
gcc startup stuff will be called, and we want to 'jmp _minix_init'
instead. I can't use the -c flag to stop linking, because I *do*
want it linked, but I don't want the startup code. How ??
Any help appreciated.
Simon.