[svlug] Re: Compiling C++, Linux vs OpenBSD ?
dave at thor.sbay.org
Sat Sep 2 20:51:02 PDT 2000
On Sat, 2 Sep 2000, Bill Schoolcraft wrote:
> In doing some work in C++ I was compiling the very same
> program in Linux and in OpenBSD and the difference in size in the
> resulting binary confused me for it compiled so much bigger in
> OpenBSD. Here is the size difference.
Try this on each system:
g++ -c data.cpp
du -b data.o # this is the size of the actual object code of data.cpp
g++ data.o -o data
du -b data # this is the size of the data.cpp executable
My guess is that more code is getting statically linked into your OpenBSD
executable than your Linux executable.
Dave Zarzycki KF6ZSS
More information about the svlug