bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: linker problem ? help needed !!!


From: kanda1979
Subject: Re: linker problem ? help needed !!!
Date: Tue, 22 Jul 2008 16:08:55 +0530 (IST)

Hi Nick,
Thank you very much.
Your solution is wonderful.
I got desired results.
I made my development scripts simpler.


Can you give me one more suggestion.


I want to compile multiple files C and C++ and link with gcc.

Is there any way.

Thanks,
Navi






----- Original Message -----
From: Nick Clifton <address@hidden>
To: address@hidden
Cc: address@hidden
Sent: Tue, 22 Jul 2008 13:02:51 +0530 (IST)
Subject: Re: linker problem ? help needed !!!

Hi Navi,

> Thanks for your prompt reply.

You're welcome.  Please keep the CC line though as other people may be 
interested in this problem and its solution.

> I have figured out the reason for the error.
> Because the length of following command :
> ld -v -T ../SRC\link.ld -o kernel.sys kernel.o ckernel.o Interrupts.o 
> common.o idt.o isr.o stdio.o timer.o keyboad.o Kernelheap.o paging.o

> [...]
> But this is a temporary solution , what will i do when i have to link
 > a lot of object files....(30 to 40 , for exmaple) , as the project
 > grows in future.

Assuming that you are using a relatively recent version of the linker 
you can use the @<file> feature to put all of the object filenames into 
a single text file called <file>.  eg:

   echo kernel.o ckernel.o Interrupts.o common.o idt.o isr.o stdio.o 
timer.o keyboad.o Kernelheap.o paging.o > object_files

   ld -v -T ../SRC/link.ld -o kernel.sys @object_files

Cheers
   Nick





reply via email to

[Prev in Thread] Current Thread [Next in Thread]