Re: Eliminating static binaries (Was: Unwanted RPM dependencies)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Once upon a time, Patrice Dumas <pertusus@xxxxxxx> said:
> Even if dyn libraries are shared, the code that is needed to perform the
> link may add more to the executable. You can try with a simple 'hello
> world' that use printf.

You should probably test that before you post.  I would say this is the
smallest possible regular C program:

$ cat x.c
int main ()
{
	return 0;
}
$ gcc -o x-dyn x.c
$ gcc -static -o x-stat x.c
$ strip x-dyn x-stat
$ ls -l x-dyn x-stat
-rwxr-xr-x 1 cmadams users   2816 Jun  6 08:38 x-dyn
-rwxr-xr-x 1 cmadams users 459492 Jun  6 08:38 x-stat
$ 

I don't forsee a static executable being smaller than a dynamic
executable in the real world.  It is possible that somebody could
hand-build (e.g. no gcc, ld, etc.) such an executable, but that doesn't
really count (since that isn't done in the real world).

-- 
Chris Adams <cmadams@xxxxxxxxxx>
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.

-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux