Re: what is the difference between the two command?
On Sun, Jan 20, 2013 at 5:01 PM, horseriver wrote: > On Sun, Jan 20, 2013 at 09:07:15AM -0800, Ian Lance Taylor wrote: >> On Sat, Jan 19, 2013 at 1:30 PM, horseriver wrote: >> > On Sat, Jan 19, 2013 at 09:47:53PM -0800, Ian Lance Taylor wrote: >> >> On Fri, Jan 18, 2013 at 10:19 PM, horseriver >> >> wrote: >> >> > hi: >> >> > >> >> >Here are two command for producting one .so file : >> >> > >> >> >1. gcc -nostdlib -Wl,-T,vsyscall.lds vsyscall-int80.o -o >> >> > vsyscall-int80.so >> >> > >> >> >2. ld -T vsyscall.lds vsyscall-int80.o -o vsyscall-int80.so >> >> >> >> There is no substantive difference between these commands. There are >> >> various minor differences that probably don't matter. Use the -v >> >> option when invoking gcc to see precisely how it invokes the linker. >> >> >> >> In particular, invoking the linker via the gcc driver will cause some >> >> C++-specific operations to occur when needed, but since you aren't >> >> using C++ in this case they won't happen. >> > >> > Thanks! >> > >> >I have a weird problem here! >> > >> >When I type the 1 to make vsyscall-int80.so ,ld report error: Not >> > enough room for program headers, try linking with -N >> > >> >But,When I type 2 to make vsyscall-int80.so,it works successfully. >> > >> > What is the reason? >> >> I don't know. Run the complete gcc command with the -v option and you >> will see precisely how it invokes the linker. > >gcc -v > Using built-in specs. > Target: i486-linux-gnu > 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 > Thread model: posix > > which option make the two commands different? You are just showing the results of gcc -v. I'm asking you to add -v to the actual gcc command that you are running. That is: gcc -nostdlib -Wl,-T,vsyscall.lds vsyscall-int80.o -o vsyscall-int80.so -v. Ian ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: what is the difference between the two command?
On Mon, Jan 21, 2013 at 1:01 AM, horseriver wrote: > On Sun, Jan 20, 2013 at 09:07:15AM -0800, Ian Lance Taylor wrote: > > On Sat, Jan 19, 2013 at 1:30 PM, horseriver > wrote: > > > On Sat, Jan 19, 2013 at 09:47:53PM -0800, Ian Lance Taylor wrote: > > >> On Fri, Jan 18, 2013 at 10:19 PM, horseriver > wrote: > > >> > hi: > > >> > > > >> >Here are two command for producting one .so file : > > >> > > > >> >1. gcc -nostdlib -Wl,-T,vsyscall.lds vsyscall-int80.o -o > vsyscall-int80.so > > >> > > > >> >2. ld -T vsyscall.lds vsyscall-int80.o -o vsyscall-int80.so > > >> > > >> There is no substantive difference between these commands. There are > > >> various minor differences that probably don't matter. Use the -v > > >> option when invoking gcc to see precisely how it invokes the linker. > > >> > > >> In particular, invoking the linker via the gcc driver will cause some > > >> C++-specific operations to occur when needed, but since you aren't > > >> using C++ in this case they won't happen. > > > > > > Thanks! > > > > > >I have a weird problem here! > > > > > >When I type the 1 to make vsyscall-int80.so ,ld report error: Not > enough room for program headers, try linking with -N > > > > > >But,When I type 2 to make vsyscall-int80.so,it works successfully. > > > > > > What is the reason? > > > > I don't know. Run the complete gcc command with the -v option and you > > will see precisely how it invokes the linker. > >gcc -v > Using built-in specs. > Target: i486-linux-gnu > 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 > Thread model: posix > > which option make the two commands different? > I think that question is more suitable for gcc or ld mailing lists. > > Thanks! > > > > > Ian > > ___ > Kernelnewbies mailing list > Kernelnewbies@kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > -- Thank you Warm Regards Anuz ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: what is the difference between the two command?
On Sun, Jan 20, 2013 at 09:07:15AM -0800, Ian Lance Taylor wrote: > On Sat, Jan 19, 2013 at 1:30 PM, horseriver wrote: > > On Sat, Jan 19, 2013 at 09:47:53PM -0800, Ian Lance Taylor wrote: > >> On Fri, Jan 18, 2013 at 10:19 PM, horseriver wrote: > >> > hi: > >> > > >> >Here are two command for producting one .so file : > >> > > >> >1. gcc -nostdlib -Wl,-T,vsyscall.lds vsyscall-int80.o -o > >> > vsyscall-int80.so > >> > > >> >2. ld -T vsyscall.lds vsyscall-int80.o -o vsyscall-int80.so > >> > >> There is no substantive difference between these commands. There are > >> various minor differences that probably don't matter. Use the -v > >> option when invoking gcc to see precisely how it invokes the linker. > >> > >> In particular, invoking the linker via the gcc driver will cause some > >> C++-specific operations to occur when needed, but since you aren't > >> using C++ in this case they won't happen. > > > > Thanks! > > > >I have a weird problem here! > > > >When I type the 1 to make vsyscall-int80.so ,ld report error: Not > > enough room for program headers, try linking with -N > > > >But,When I type 2 to make vsyscall-int80.so,it works successfully. > > > > What is the reason? > > I don't know. Run the complete gcc command with the -v option and you > will see precisely how it invokes the linker. gcc -v Using built-in specs. Target: i486-linux-gnu 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 Thread model: posix which option make the two commands different? Thanks! > > Ian ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: what is the difference between the two command?
On Sat, Jan 19, 2013 at 1:30 PM, horseriver wrote: > On Sat, Jan 19, 2013 at 09:47:53PM -0800, Ian Lance Taylor wrote: >> On Fri, Jan 18, 2013 at 10:19 PM, horseriver wrote: >> > hi: >> > >> >Here are two command for producting one .so file : >> > >> >1. gcc -nostdlib -Wl,-T,vsyscall.lds vsyscall-int80.o -o >> > vsyscall-int80.so >> > >> >2. ld -T vsyscall.lds vsyscall-int80.o -o vsyscall-int80.so >> >> There is no substantive difference between these commands. There are >> various minor differences that probably don't matter. Use the -v >> option when invoking gcc to see precisely how it invokes the linker. >> >> In particular, invoking the linker via the gcc driver will cause some >> C++-specific operations to occur when needed, but since you aren't >> using C++ in this case they won't happen. > > Thanks! > >I have a weird problem here! > >When I type the 1 to make vsyscall-int80.so ,ld report error: Not enough > room for program headers, try linking with -N > >But,When I type 2 to make vsyscall-int80.so,it works successfully. > > What is the reason? I don't know. Run the complete gcc command with the -v option and you will see precisely how it invokes the linker. Ian ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: what is the difference between the two command?
On Sat, Jan 19, 2013 at 09:47:53PM -0800, Ian Lance Taylor wrote: > On Fri, Jan 18, 2013 at 10:19 PM, horseriver wrote: > > hi: > > > >Here are two command for producting one .so file : > > > >1. gcc -nostdlib -Wl,-T,vsyscall.lds vsyscall-int80.o -o > > vsyscall-int80.so > > > >2. ld -T vsyscall.lds vsyscall-int80.o -o vsyscall-int80.so > > There is no substantive difference between these commands. There are > various minor differences that probably don't matter. Use the -v > option when invoking gcc to see precisely how it invokes the linker. > > In particular, invoking the linker via the gcc driver will cause some > C++-specific operations to occur when needed, but since you aren't > using C++ in this case they won't happen. Thanks! I have a weird problem here! When I type the 1 to make vsyscall-int80.so ,ld report error: Not enough room for program headers, try linking with -N But,When I type 2 to make vsyscall-int80.so,it works successfully. What is the reason? gcc -v Using built-in specs. Target: i486-linux-gnu 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,ob jc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-includ ed-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 Thread model: posix gcc version 4.4.5 (Debian 4.4.5-8) > > Ian ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies