From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31447 invoked by alias); 27 Sep 2003 12:26:46 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 31439 invoked from network); 27 Sep 2003 12:26:44 -0000 Received: from unknown (HELO rediffmail.com) (203.199.83.245) by sources.redhat.com with SMTP; 27 Sep 2003 12:26:44 -0000 Received: (qmail 24903 invoked by uid 510); 27 Sep 2003 12:30:21 -0000 Date: Sat, 27 Sep 2003 12:26:00 -0000 Message-ID: <20030927123021.24902.qmail@mailweb33.rediffmail.com> Received: from unknown (202.4.191.1) by rediffmail.com via HTTP; 27 sep 2003 12:30:21 -0000 MIME-Version: 1.0 From: "dennis jacob" Reply-To: "dennis jacob" To: gcc-help@gcc.gnu.org Subject: help for doubts(gcc) Content-type: text/plain; format=flowed Content-Disposition: inline X-SW-Source: 2003-09/txt/msg00300.txt.bz2 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