On Sun, Jan 06, 2013 at 10:18:23AM -0800, Ian Lance Taylor wrote: > On Sat, Jan 5, 2013 at 5:05 PM, horseriver <horserivers@xxxxxxxxx> 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 <horserivers@xxxxxxxxx> 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