<br><br><div class="gmail_quote">On Mon, Jan 21, 2013 at 1:01 AM, horseriver <span dir="ltr"><<a href="mailto:horserivers@gmail.com" target="_blank">horserivers@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Sun, Jan 20, 2013 at 09:07:15AM -0800, Ian Lance Taylor wrote:<br>
> On Sat, Jan 19, 2013 at 1:30 PM, horseriver <<a href="mailto:horserivers@gmail.com">horserivers@gmail.com</a>> wrote:<br>
> > On Sat, Jan 19, 2013 at 09:47:53PM -0800, Ian Lance Taylor wrote:<br>
> >> On Fri, Jan 18, 2013 at 10:19 PM, horseriver <<a href="mailto:horserivers@gmail.com">horserivers@gmail.com</a>> wrote:<br>
> >> > hi:<br>
> >> ><br>
> >> > Here are two command for producting one .so file :<br>
> >> ><br>
> >> > 1. gcc -nostdlib -Wl,-T,vsyscall.lds vsyscall-int80.o -o vsyscall-int80.so<br>
> >> ><br>
> >> > 2. ld -T vsyscall.lds vsyscall-int80.o -o vsyscall-int80.so<br>
> >><br>
> >> There is no substantive difference between these commands. There are<br>
> >> various minor differences that probably don't matter. Use the -v<br>
> >> option when invoking gcc to see precisely how it invokes the linker.<br>
> >><br>
> >> In particular, invoking the linker via the gcc driver will cause some<br>
> >> C++-specific operations to occur when needed, but since you aren't<br>
> >> using C++ in this case they won't happen.<br>
> ><br>
> > Thanks!<br>
> ><br>
> > I have a weird problem here!<br>
> ><br>
> > When I type the 1 to make vsyscall-int80.so ,ld report error: Not enough room for program headers, try linking with -N<br>
> ><br>
> > But,When I type 2 to make vsyscall-int80.so,it works successfully.<br>
> ><br>
> > What is the reason?<br>
><br>
> I don't know. Run the complete gcc command with the -v option and you<br>
> will see precisely how it invokes the linker.<br>
<br>
gcc -v<br>
Using built-in specs.<br>
Target: i486-linux-gnu<br>
Configured with: ../src/configure -v --with-pkgversion='Debian 4.4.5-8' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-targets=all --with-arch-32=i586 --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu<br>
Thread model: posix<br>
<br>
which option make the two commands different?<br></blockquote><div>I think that question is more suitable for gcc or ld mailing lists.<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Thanks!<br>
<br>
><br>
> Ian<br>
<br>
_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Thank you <br>Warm Regards<br>Anuz<br>