I develope my mini os using DJGPP on windows.
When i input command line"ld -T link.ld -o kernel.bin start.o main.o .....(16 .o files in total)",it tells me "System can't execute the specific program".I also try on Cygwin,which tells
me "Invalid argument".
Please give me some suggestions to make me continue my work.
Asking for suggestions
Re:Asking for suggestions
You may have exceeded the maximum commandline length, to get around it you'll need to use the archive tool (ar) to combine the packages or use a 32bit compiler which will have a longer commandline.
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Asking for suggestions
do you call cygwin's linker from DOS command line ? or from cygwin's shell ?
Either you actually have one of your .o files that has wrong format, or your command line is too long -- for the shell, not for LD which could happily handle dozens more of files. You can indeed use AR to pack .o files together, or you can just use "ld ... *.o", then making explicit reference to "start.ko" in your linker script to make sure it bypasses the completion's ordering ...
Either you actually have one of your .o files that has wrong format, or your command line is too long -- for the shell, not for LD which could happily handle dozens more of files. You can indeed use AR to pack .o files together, or you can just use "ld ... *.o", then making explicit reference to "start.ko" in your linker script to make sure it bypasses the completion's ordering ...
Re:Asking for suggestions
DOS Program's commandline (ie. DJGPP) have a 127 character limit whereas a 32bit build (Cygwin, MinGW, cross-compiler, etc) has a limit of about 32767 characters.
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Asking for suggestions
Yeah, true, yet he mentions "invalid argument" reported by cygwin ...AR wrote: DOS Program's commandline (ie. DJGPP) have a 127 character limit whereas a 32bit build (Cygwin, MinGW, cross-compiler, etc) has a limit of about 32767 characters.
Re:Asking for suggestions
Thanks very much!
I also resolved it several hours ago.I write a Makefile,and use the make tool of Djgpp.This method can bypass the length limit of Dos command line.
I also resolved it several hours ago.I write a Makefile,and use the make tool of Djgpp.This method can bypass the length limit of Dos command line.