Linking problem
Posted: Fri Apr 13, 2007 2:43 pm
Hello
some problem with the linker...I don't know exactly how it works, I never went deeper in the manual so I perhaps asks something trivial
here is my prblem...
let's say I have sega.s, main.c, resource.s
in resource.s I have only
my goal is to make a rom when you can add anything at the end so it can be handled by the program in main.c, calling mydata
I'm unable to link this with the result.bin ending by nothing...
I always have some data at the end of the file...so I assume it's the linker which add data/text/what ever....
the syntax I use
gcc -b 68k -O1 -c -o sega.o sega.s
gcc -b 68k -m68000 -O1 -c -I..\\..\\xgcc\\68K\\2_8_1\\INCLUDE\\ main.c
gcc -b 68k -O1 -c -o resource.o resource.s
gcc -Xlinker -L..\\..\\..\\xgcc\\68k\\2_8_1\\m68000\\ -b 68k -T md.ld -nostdlib -o blank. FILES -lm -lc -l135 -lgcc -lg
68k-objc -O binary blank. blank.bin
where FILES is
INPUT(sega.o)
INPUT(main.o)
INPUT(resource.o)
any idea someone ??
some problem with the linker...I don't know exactly how it works, I never went deeper in the manual so I perhaps asks something trivial
here is my prblem...
let's say I have sega.s, main.c, resource.s
in resource.s I have only
Code: Select all
.globl mydata
mydata:
I'm unable to link this with the result.bin ending by nothing...
I always have some data at the end of the file...so I assume it's the linker which add data/text/what ever....
the syntax I use
gcc -b 68k -O1 -c -o sega.o sega.s
gcc -b 68k -m68000 -O1 -c -I..\\..\\xgcc\\68K\\2_8_1\\INCLUDE\\ main.c
gcc -b 68k -O1 -c -o resource.o resource.s
gcc -Xlinker -L..\\..\\..\\xgcc\\68k\\2_8_1\\m68000\\ -b 68k -T md.ld -nostdlib -o blank. FILES -lm -lc -l135 -lgcc -lg
68k-objc -O binary blank. blank.bin
where FILES is
INPUT(sega.o)
INPUT(main.o)
INPUT(resource.o)
any idea someone ??