Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Aha, that helps explain the discrepancy of OS X 10.7:

    $ ls -la /usr/bin/true /usr/bin/false
    -r-xr-xr-x  1 root  wheel  34240 Jul 20  2011 /usr/bin/false
    -r-xr-xr-x  1 root  wheel  34240 Jul 20  2011 /usr/bin/true
    $ cmp -l /usr/bin/true /usr/bin/false |wc
        8194   24582  114716
and CentOS 6:

    $ ls -la /bin/true /bin/false
    -rwxr-xr-x. 1 root root 25144 Dec  7 14:51 /bin/false
    -rwxr-xr-x. 1 root root 25144 Dec  7 14:51 /bin/true
    $ cmp -l /bin/true /bin/false |wc
        355    1065    4970
The signature size explains (part of) the larger delta on OS X, but left me wondering, so:

    ~/coreutils/src]$ ls -alrth true.c false.c
    -rw-r--r--  1 dvd  staff   2.2K Jan 30 09:31 true.c
    -rw-r--r--  1 dvd  staff    51B Jan 30 09:31 false.c
Curious!

    ~/coreutils/src]$ cat false.c
    #define EXIT_STATUS EXIT_FAILURE
    #include "true.c"
And figuring out why that still results in such a large binary delta is over my head.


And figuring out why that still results in such a large binary delta is over my head.

On OS X these binaries are fat binaries:

    $ file /usr/bin/true
    /usr/bin/true: Mach-O universal binary with 2 architectures
    /usr/bin/true (for architecture x86_64):	Mach-O 64-bit executable x86_64
    /usr/bin/true (for architecture i386):	Mach-O executable i386




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: