News for hackers. Stuff that matters.
Re:The /bin/true Command and Copyright (2009) by smsm42 on Sunday August 22, 2021 @01:58AM (#28263253)
On macos, /usr/bin/true is 118K, not counted the linked shared libSystem.dylib. I wonder what did they put in there? Doesn't seem to have --version or any GNU bells and whistles of that nature.
Re:The /bin/true Command and Copyright (2009) by ziml77 on Monday August 23, 2021 @11:44PM (#28284859)
Based on a quick check of the disassembly, _exit is dynamically linked. It appears that because of that dynamic linkage, there's some information stored for dyld to use. That data seems to be split across a few sections which are loaded with padding.

It's also a fat binary. It contains both an X64 and AArch64 version.

Re:The /bin/true Command and Copyright (2009) by ziml77 on Monday August 23, 2021 @11:46PM (#28284869)
I should add that it really is doing nothing other than calling exit:

    EntryPoint:
        push       rbp
        mov        rbp, rsp
        xor        edi, edi
        call       imp___stubs__exit  
    imp___stubs__exit:
        jmp        qword [_exit_ptr]
Re:The /bin/true Command and Copyright (2009) by xxpor on Sunday August 22, 2021 @03:35AM (#28263628)
How big is a basic hello world compiled with -O3?