From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16955 invoked by alias); 7 Jan 2013 01:49:31 -0000 Received: (qmail 16746 invoked by uid 22791); 7 Jan 2013 01:49:30 -0000 X-SWARE-Spam-Status: No, hits=-3.2 required=5.0 tests=AWL,BAYES_00,DATE_IN_PAST_06_12,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-pb0-f47.google.com (HELO mail-pb0-f47.google.com) (209.85.160.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 07 Jan 2013 01:49:24 +0000 Received: by mail-pb0-f47.google.com with SMTP id un1so10221676pbc.34 for ; Sun, 06 Jan 2013 17:49:23 -0800 (PST) X-Received: by 10.68.236.2 with SMTP id uq2mr180787079pbc.55.1357523363274; Sun, 06 Jan 2013 17:49:23 -0800 (PST) Received: from localhost ([118.186.128.251]) by mx.google.com with ESMTPS id hc4sm36637957pbc.30.2013.01.06.17.49.13 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 06 Jan 2013 17:49:21 -0800 (PST) Date: Mon, 07 Jan 2013 14:28:00 -0000 From: horseriver To: Ian Lance Taylor Cc: gcc-help@gcc.gnu.org Subject: Re: compile question Message-ID: <20130106160710.GA2454@debian.localdomain> References: <20130105191804.GB3090@debian.localdomain> <20130106010523.GA2459@debian.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2013-01/txt/msg00034.txt.bz2 On Sun, Jan 06, 2013 at 10:18:23AM -0800, Ian Lance Taylor wrote: > On Sat, Jan 5, 2013 at 5:05 PM, horseriver wrote: > > On Sat, Jan 05, 2013 at 09:26:08PM -0800, Ian Lance Taylor wrote: > >> On Sat, Jan 5, 2013 at 11:18 AM, horseriver wrote: > >> > > >> > when I use gcc compiling a .c file to a .o file , will it call ld to do some link work ? > >> > >> If you run "gcc -o foo.o -c foo.c", or simply "gcc -c foo.c", it will > >> not run ld. > > > > thanks! > > > > If the object flie is .so ,will ld be called by gcc ? > > > > I am trying to compile linux kernel , in arch/i386/kernel , > > kbuild need to build a vsyscall_int80.so , but it give this error : > > > > ld: arch/i386/kernel/vsyscall-int80.so: Not enough room for program headers > > > > how to do for this issure ? > > > Please reply to the mailing list, not just to me. Thanks. > > > The name of the result is irrelevant to how the gcc driver behaves. A > file named .so is usually a shared library; to create a shared > library, pass the option -shared to the gcc driver. > > I don't know what is wrong with your build of the Linux kernel. That > kind of problem normally indicates a discrepancy between the linker > script and the specific linker that you are using. It can also mean > that the compiler is generating sections that the linker script does > not expect. thanks! how can I get to know which ld-script files are used by ld when build this .so file ? I think this would help . > > Ian