Hello Sir,
I'm a beginner in gcc and have some doubts.Please clear.
As part of my project, I have to develop a small kernel and
I have selected gcc and the associated tools for this purpose. In
some kernels, I have seen assembly routines been written in nasm
and C programs in gcc.
I want to compile both with nasm and gcc respectively. The problem
is I want to link these elf objs to obtain a single large elf
file.
Please suggest the syntax for the command line switch to
compile a C program to obtain a elf output.Can I specify the name
of the output file? Also specify the ld option to link more than
one elf file to obtain a big elf file.
Another doubt is about how to write a linker script for elf
output. I have seen them in several kernels but have'nt understood
yet.
How should I specify my new linker script. In the info page
it is written that the option -t may be used. Is it necessary that
the script file must have a specific extension? Let me say my idea
for using this. First use "ld -T scriptfilename" as command line.
Then use the ld option to link all the elf objs. Also, how can I
specify the name of the output file?
Thanking You
Dennis Jacob M.
___________________________________________________
Television meets Accounts; Jyoti Weds Rajaram.
Rediff Matchmaker strikes another interesting match !!
Visit http://matchmaker.rediff.com?1