Hi. I have more libraries for kernel.
ld setupasm.o setup.o video.o system.o fdc.o dma.o dtables.o pit.o maths.o -o SETUP.BIN -Ttext 0x8000 -e _main --oformat binary -N
But when i want to run this command, dos is showing an error:
"System can not run this program".
Future, i will have more libraries. How can solve this problem?
LD and DOS Error
Re:LD and DOS Error
I am not sure what the problem is, here. Assert that ld is in your command path (by calling 'ld -v'), and that it isn't because you placed the files first and the options last (by reordering your command line).
If DOS is really that brain-damaged that it cannot handle a command line as short as this one, you might want to use 'ar' to create a link library. (See ar documentation, it's part of binutils.)
If DOS is really that brain-damaged that it cannot handle a command line as short as this one, you might want to use 'ar' to create a link library. (See ar documentation, it's part of binutils.)
Every good solution is obvious once you've found it.
Re:LD and DOS Error
DOS should not be the problem, i dont know what your running, but real DOS supports 180 character commandline (this limit is required by CP/M style applications -- aka ".com" files, which allocate 180 bytes for passing the commandline to the application) later versions of DOS, and DOS emulators in win95+ support an even longer commandline -- i have, however, heard that DJGPP has an artificial limit on the commandline -- im not sure what it is thoughIf DOS is really that brain-damaged that it cannot handle a command line as short as this one
Re:LD and DOS Error
I though the limit on command line length was 128 bytes including the length byte, string, and terminator. At least this must be the case for .COM files since running past offset 100h would cause headaches.
Re:LD and DOS Error
So, I will write keyboard header file and add it to "ld" command. What can i do? (Im using WinXP, LD is last version.)
Re:LD and DOS Error
If parameter length is your problem, why not use a response file to specify your input libraries?
Re:LD and DOS Error
If your linker script is named Linker.txt:
->LD -T Linker.txt
Here's one for an OS I was messing around with a couple years back:
->LD -T Linker.txt
Here's one for an OS I was messing around with a couple years back:
Code: Select all
INPUT(Lib\crt0.o)
INPUT(Lib\EnvPhMem.o Lib\x86-32\envInit.o)
INPUT(Lib\x86-32\EnvVtMem.o)
INPUT(Lib\x86int.o Lib\x86mem.o Lib\x86gdt.o)
INPUT(Lib\x86-32\kstdlib.o)
INPUT(Lib\EnvMem.o Lib\EnvCore.o Lib\EnvLib.o)
INPUT(Lib\sysbase.o Lib\KernelASM.o)
INPUT(Lib\stdio.o Lib\stdlib.o Lib\string.o)
INPUT(Lib\KeyBoard.o Lib\Video_Text.o)
INPUT(Lib\Diskette.o Lib\Timer.o)
INPUT(Lib\FAT.o)
ENTRY(_crt0)
OUTPUT(Bin\EnvCore.sys)
OUTPUT_FORMAT(binary)
SECTIONS
{
. = 0x00100000;
.text : { *(.text) }
.data : { *(.data) }
.bss : { *(.bss) }
_Env_EndImage = .;
}
Re:LD and DOS Error
oops -- your right, the CP/M limit is less than 128 (112 seems right, but i cannot remember for sure, and i cannot find my books...), not 180 (DOS files have no problem with much longer commandlines, and i believe 180 was the limit within real DOS -- at least version 4+)blip wrote: I though the limit on command line length was 128 bytes including the length byte, string, and terminator. At least this must be the case for .COM files since running past offset 100h would cause headaches.