Skip to content

Instantly share code, notes, and snippets.

@andir
Last active May 18, 2021 16:22

Revisions

  1. andir revised this gist May 18, 2021. 2 changed files with 649 additions and 0 deletions.
    330 changes: 330 additions & 0 deletions otool -l hydra
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,330 @@
    otool -l /nix/store/814ql2bfkwdfb73rmd9fi3d9vfdjhcap-bootstrap-tools/lib/libc++.1.0.dylib  ⎈ application_eks  18:15:50
    /nix/store/814ql2bfkwdfb73rmd9fi3d9vfdjhcap-bootstrap-tools/lib/libc++.1.0.dylib:
    Load command 0
    cmd LC_SEGMENT_64
    cmdsize 632
    segname __TEXT
    vmaddr 0x0000000000000000
    vmsize 0x0000000000078000
    fileoff 0
    filesize 491520
    maxprot 0x00000005
    initprot 0x00000005
    nsects 7
    flags 0x0
    Section
    sectname __text
    segname __TEXT
    addr 0x0000000000005d60
    size 0x0000000000066920
    offset 23904
    align 2^2 (4)
    reloff 0
    nreloc 0
    flags 0x80000400
    reserved1 0
    reserved2 0
    Section
    sectname __stubs
    segname __TEXT
    addr 0x000000000006c680
    size 0x00000000000007ec
    offset 444032
    align 2^2 (4)
    reloff 0
    nreloc 0
    flags 0x80000408
    reserved1 0 (index into indirect symbol table)
    reserved2 12 (size of stubs)
    Section
    sectname __stub_helper
    segname __TEXT
    addr 0x000000000006ce6c
    size 0x00000000000007a4
    offset 446060
    align 2^2 (4)
    reloff 0
    nreloc 0
    flags 0x80000400
    reserved1 0
    reserved2 0
    Section
    sectname __const
    segname __TEXT
    addr 0x000000000006d610
    size 0x0000000000002158
    offset 448016
    align 2^4 (16)
    reloff 0
    nreloc 0
    flags 0x00000000
    reserved1 0
    reserved2 0
    Section
    sectname __cstring
    segname __TEXT
    addr 0x000000000006f768
    size 0x00000000000013b5
    offset 456552
    align 2^0 (1)
    reloff 0
    nreloc 0
    flags 0x00000002
    reserved1 0
    reserved2 0
    Section
    sectname __gcc_except_tab
    segname __TEXT
    addr 0x0000000000070b20
    size 0x0000000000004ff8
    offset 461600
    align 2^2 (4)
    reloff 0
    nreloc 0
    flags 0x00000000
    reserved1 0
    reserved2 0
    Section
    sectname __unwind_info
    segname __TEXT
    addr 0x0000000000075b18
    size 0x00000000000024e4
    offset 482072
    align 2^2 (4)
    reloff 0
    nreloc 0
    flags 0x00000000
    reserved1 0
    reserved2 0
    Load command 1
    cmd LC_SEGMENT_64
    cmdsize 312
    segname __DATA_CONST
    vmaddr 0x0000000000078000
    vmsize 0x0000000000008000
    fileoff 491520
    filesize 32768
    maxprot 0x00000003
    initprot 0x00000003
    nsects 3
    flags 0x10
    Section
    sectname __got
    segname __DATA_CONST
    addr 0x0000000000078000
    size 0x00000000000000e0
    offset 491520
    align 2^3 (8)
    reloff 0
    nreloc 0
    flags 0x00000006
    reserved1 169 (index into indirect symbol table)
    reserved2 0
    Section
    sectname __mod_init_func
    segname __DATA_CONST
    addr 0x00000000000780e0
    size 0x0000000000000008
    offset 491744
    align 2^3 (8)
    reloff 0
    nreloc 0
    flags 0x00000009
    reserved1 0
    reserved2 0
    Section
    sectname __const
    segname __DATA_CONST
    addr 0x00000000000780e8
    size 0x0000000000004098
    offset 491752
    align 2^3 (8)
    reloff 0
    nreloc 0
    flags 0x00000000
    reserved1 0
    reserved2 0
    Load command 2
    cmd LC_SEGMENT_64
    cmdsize 392
    segname __DATA
    vmaddr 0x0000000000080000
    vmsize 0x0000000000008000
    fileoff 524288
    filesize 16384
    maxprot 0x00000003
    initprot 0x00000003
    nsects 4
    flags 0x0
    Section
    sectname __la_symbol_ptr
    segname __DATA
    addr 0x0000000000080000
    size 0x0000000000000548
    offset 524288
    align 2^3 (8)
    reloff 0
    nreloc 0
    flags 0x00000007
    reserved1 197 (index into indirect symbol table)
    reserved2 0
    Section
    sectname __data
    segname __DATA
    addr 0x0000000000080548
    size 0x0000000000000648
    offset 525640
    align 2^3 (8)
    reloff 0
    nreloc 0
    flags 0x00000000
    reserved1 0
    reserved2 0
    Section
    sectname __bss
    segname __DATA
    addr 0x0000000000080bc0
    size 0x0000000000005d00
    offset 0
    align 2^6 (64)
    reloff 0
    nreloc 0
    flags 0x00000001
    reserved1 0
    reserved2 0
    Section
    sectname __common
    segname __DATA
    addr 0x00000000000868c0
    size 0x00000000000005ac
    offset 0
    align 2^3 (8)
    reloff 0
    nreloc 0
    flags 0x00000001
    reserved1 0
    reserved2 0
    Load command 3
    cmd LC_SEGMENT_64
    cmdsize 72
    segname __LINKEDIT
    vmaddr 0x0000000000088000
    vmsize 0x0000000000048000
    fileoff 540672
    filesize 294576
    maxprot 0x00000001
    initprot 0x00000001
    nsects 0
    flags 0x0
    Load command 4
    cmd LC_ID_DYLIB
    cmdsize 112
    name /nix/store/814ql2bfkwdfb73rmd9fi3d9vfdjhcap-bootstrap-tools/lib/libc++.1.0.dylib (offset 24)
    time stamp 1 Thu Jan 1 01:00:01 1970
    current version 1.0.0
    compatibility version 1.0.0
    Load command 5
    cmd LC_DYLD_INFO_ONLY
    cmdsize 48
    rebase_off 540672
    rebase_size 672
    bind_off 541344
    bind_size 1288
    weak_bind_off 542632
    weak_bind_size 488
    lazy_bind_off 543120
    lazy_bind_size 3264
    export_off 546384
    export_size 64216
    Load command 6
    cmd LC_SYMTAB
    cmdsize 24
    symoff 613192
    nsyms 3616
    stroff 672512
    strsize 154912
    Load command 7
    cmd LC_DYSYMTAB
    cmdsize 80
    ilocalsym 0
    nlocalsym 1069
    iextdefsym 1069
    nextdefsym 2106
    iundefsym 3175
    nundefsym 441
    tocoff 0
    ntoc 0
    modtaboff 0
    nmodtab 0
    extrefsymoff 0
    nextrefsyms 0
    indirectsymoff 671048
    nindirectsyms 366
    extreloff 0
    nextrel 0
    locreloff 0
    nlocrel 0
    Load command 8
    cmd LC_BUILD_VERSION
    cmdsize 32
    platform 1
    minos 11.0
    sdk 11.0
    ntools 1
    tool 3
    version 530.0
    Load command 9
    cmd LC_SOURCE_VERSION
    cmdsize 16
    version 0.0
    Load command 10
    cmd LC_ENCRYPTION_INFO_64
    cmdsize 24
    cryptoff 16384
    cryptsize 475136
    cryptid 0
    pad 0
    Load command 11
    cmd LC_LOAD_DYLIB
    cmdsize 56
    name /usr/lib/libSystem.B.dylib (offset 24)
    time stamp 2 Thu Jan 1 01:00:02 1970
    current version 1292.0.0
    compatibility version 1.0.0
    Load command 12
    cmd LC_LOAD_DYLIB
    cmdsize 56
    name @rpath/lib/libc++abi.dylib (offset 24)
    time stamp 2 Thu Jan 1 01:00:02 1970
    current version 1.0.0
    compatibility version 1.0.0
    Load command 13
    cmd LC_LOAD_DYLIB
    cmdsize 104
    name /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (offset 24)
    time stamp 2 Thu Jan 1 01:00:02 1970
    current version 1770.106.0
    compatibility version 150.0.0
    Load command 14
    cmd LC_RPATH
    cmdsize 32
    path @loader_path/../lib (offset 12)
    Load command 15
    cmd LC_RPATH
    cmdsize 96
    path /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-swift-corefoundation/Library/Frameworks (offset 12)
    Load command 16
    cmd LC_FUNCTION_STARTS
    cmdsize 16
    dataoff 610600
    datasize 2592
    Load command 17
    cmd LC_DATA_IN_CODE
    cmdsize 16
    dataoff 613192
    datasize 0
    Load command 18
    cmd LC_CODE_SIGNATURE
    cmdsize 16
    dataoff 827424
    datasize 7824
    319 changes: 319 additions & 0 deletions otool -l native
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,319 @@
    otool -l /nix/store/nws7cix70a5j2w3mfn68a8wgzgb8mhz6-bootstrap-tools/lib/libc++.1.0.dylib ↵ INT  ⎈ application_eks  18:19:46
    /nix/store/nws7cix70a5j2w3mfn68a8wgzgb8mhz6-bootstrap-tools/lib/libc++.1.0.dylib:
    Load command 0
    cmd LC_SEGMENT_64
    cmdsize 632
    segname __TEXT
    vmaddr 0x0000000000000000
    vmsize 0x0000000000078000
    fileoff 0
    filesize 491520
    maxprot 0x00000005
    initprot 0x00000005
    nsects 7
    flags 0x0
    Section
    sectname __text
    segname __TEXT
    addr 0x0000000000005d60
    size 0x0000000000066920
    offset 23904
    align 2^2 (4)
    reloff 0
    nreloc 0
    flags 0x80000400
    reserved1 0
    reserved2 0
    Section
    sectname __stubs
    segname __TEXT
    addr 0x000000000006c680
    size 0x00000000000007ec
    offset 444032
    align 2^2 (4)
    reloff 0
    nreloc 0
    flags 0x80000408
    reserved1 0 (index into indirect symbol table)
    reserved2 12 (size of stubs)
    Section
    sectname __stub_helper
    segname __TEXT
    addr 0x000000000006ce6c
    size 0x00000000000007a4
    offset 446060
    align 2^2 (4)
    reloff 0
    nreloc 0
    flags 0x80000400
    reserved1 0
    reserved2 0
    Section
    sectname __const
    segname __TEXT
    addr 0x000000000006d610
    size 0x0000000000002158
    offset 448016
    align 2^4 (16)
    reloff 0
    nreloc 0
    flags 0x00000000
    reserved1 0
    reserved2 0
    Section
    sectname __cstring
    segname __TEXT
    addr 0x000000000006f768
    size 0x00000000000013b5
    offset 456552
    align 2^0 (1)
    reloff 0
    nreloc 0
    flags 0x00000002
    reserved1 0
    reserved2 0
    Section
    sectname __gcc_except_tab
    segname __TEXT
    addr 0x0000000000070b20
    size 0x0000000000004ff8
    offset 461600
    align 2^2 (4)
    reloff 0
    nreloc 0
    flags 0x00000000
    reserved1 0
    reserved2 0
    Section
    sectname __unwind_info
    segname __TEXT
    addr 0x0000000000075b18
    size 0x00000000000024e4
    offset 482072
    align 2^2 (4)
    reloff 0
    nreloc 0
    flags 0x00000000
    reserved1 0
    reserved2 0
    Load command 1
    cmd LC_SEGMENT_64
    cmdsize 312
    segname __DATA_CONST
    vmaddr 0x0000000000078000
    vmsize 0x0000000000008000
    fileoff 491520
    filesize 32768
    maxprot 0x00000003
    initprot 0x00000003
    nsects 3
    flags 0x10
    Section
    sectname __got
    segname __DATA_CONST
    addr 0x0000000000078000
    size 0x00000000000000e0
    offset 491520
    align 2^3 (8)
    reloff 0
    nreloc 0
    flags 0x00000006
    reserved1 169 (index into indirect symbol table)
    reserved2 0
    Section
    sectname __mod_init_func
    segname __DATA_CONST
    addr 0x00000000000780e0
    size 0x0000000000000008
    offset 491744
    align 2^3 (8)
    reloff 0
    nreloc 0
    flags 0x00000009
    reserved1 0
    reserved2 0
    Section
    sectname __const
    segname __DATA_CONST
    addr 0x00000000000780e8
    size 0x0000000000004098
    offset 491752
    align 2^3 (8)
    reloff 0
    nreloc 0
    flags 0x00000000
    reserved1 0
    reserved2 0
    Load command 2
    cmd LC_SEGMENT_64
    cmdsize 392
    segname __DATA
    vmaddr 0x0000000000080000
    vmsize 0x0000000000008000
    fileoff 524288
    filesize 16384
    maxprot 0x00000003
    initprot 0x00000003
    nsects 4
    flags 0x0
    Section
    sectname __la_symbol_ptr
    segname __DATA
    addr 0x0000000000080000
    size 0x0000000000000548
    offset 524288
    align 2^3 (8)
    reloff 0
    nreloc 0
    flags 0x00000007
    reserved1 197 (index into indirect symbol table)
    reserved2 0
    Section
    sectname __data
    segname __DATA
    addr 0x0000000000080548
    size 0x0000000000000648
    offset 525640
    align 2^3 (8)
    reloff 0
    nreloc 0
    flags 0x00000000
    reserved1 0
    reserved2 0
    Section
    sectname __bss
    segname __DATA
    addr 0x0000000000080bc0
    size 0x0000000000005d00
    offset 0
    align 2^6 (64)
    reloff 0
    nreloc 0
    flags 0x00000001
    reserved1 0
    reserved2 0
    Section
    sectname __common
    segname __DATA
    addr 0x00000000000868c0
    size 0x00000000000005ac
    offset 0
    align 2^3 (8)
    reloff 0
    nreloc 0
    flags 0x00000001
    reserved1 0
    reserved2 0
    Load command 3
    cmd LC_SEGMENT_64
    cmdsize 72
    segname __LINKEDIT
    vmaddr 0x0000000000088000
    vmsize 0x0000000000048000
    fileoff 540672
    filesize 294592
    maxprot 0x00000001
    initprot 0x00000001
    nsects 0
    flags 0x0
    Load command 4
    cmd LC_ID_DYLIB
    cmdsize 112
    name /nix/store/nws7cix70a5j2w3mfn68a8wgzgb8mhz6-bootstrap-tools/lib/libc++.1.0.dylib (offset 24)
    time stamp 1 Thu Jan 1 01:00:01 1970
    current version 1.0.0
    compatibility version 1.0.0
    Load command 5
    cmd LC_DYLD_INFO_ONLY
    cmdsize 48
    rebase_off 540672
    rebase_size 672
    bind_off 541344
    bind_size 1288
    weak_bind_off 542632
    weak_bind_size 488
    lazy_bind_off 543120
    lazy_bind_size 3264
    export_off 546384
    export_size 64224
    Load command 6
    cmd LC_SYMTAB
    cmdsize 24
    symoff 613200
    nsyms 3616
    stroff 672520
    strsize 154912
    Load command 7
    cmd LC_DYSYMTAB
    cmdsize 80
    ilocalsym 0
    nlocalsym 1069
    iextdefsym 1069
    nextdefsym 2106
    iundefsym 3175
    nundefsym 441
    tocoff 0
    ntoc 0
    modtaboff 0
    nmodtab 0
    extrefsymoff 0
    nextrefsyms 0
    indirectsymoff 671056
    nindirectsyms 366
    extreloff 0
    nextrel 0
    locreloff 0
    nlocrel 0
    Load command 8
    cmd LC_BUILD_VERSION
    cmdsize 32
    platform 1
    minos 11.0
    sdk 11.0
    ntools 1
    tool 3
    version 530.0
    Load command 9
    cmd LC_SOURCE_VERSION
    cmdsize 16
    version 0.0
    Load command 10
    cmd LC_ENCRYPTION_INFO_64
    cmdsize 24
    cryptoff 16384
    cryptsize 475136
    cryptid 0
    pad 0
    Load command 11
    cmd LC_LOAD_DYLIB
    cmdsize 56
    name /usr/lib/libSystem.B.dylib (offset 24)
    time stamp 2 Thu Jan 1 01:00:02 1970
    current version 1292.0.0
    compatibility version 1.0.0
    Load command 12
    cmd LC_LOAD_DYLIB
    cmdsize 56
    name @rpath/lib/libc++abi.1.dylib (offset 24)
    time stamp 2 Thu Jan 1 01:00:02 1970
    current version 1.0.0
    compatibility version 1.0.0
    Load command 13
    cmd LC_RPATH
    cmdsize 32
    path @loader_path/../lib (offset 12)
    Load command 14
    cmd LC_FUNCTION_STARTS
    cmdsize 16
    dataoff 610608
    datasize 2592
    Load command 15
    cmd LC_DATA_IN_CODE
    cmdsize 16
    dataoff 613200
    datasize 0
    Load command 16
    cmd LC_CODE_SIGNATURE
    cmdsize 16
    dataoff 827440
    datasize 7824
  2. andir revised this gist May 18, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    # hydra built toolchain
    ❯ otool -La /nix/store/814ql2bfkwdfb73rmd9fi3d9vfdjhcap-bootstrap-tools/lib/libc++.1.0.dylib  ⎈ application_eks  18:13:27
    ❯ otool -L /nix/store/814ql2bfkwdfb73rmd9fi3d9vfdjhcap-bootstrap-tools/lib/libc++.1.0.dylib  ⎈ application_eks  18:13:27
    /nix/store/814ql2bfkwdfb73rmd9fi3d9vfdjhcap-bootstrap-tools/lib/libc++.1.0.dylib:
    /nix/store/814ql2bfkwdfb73rmd9fi3d9vfdjhcap-bootstrap-tools/lib/libc++.1.0.dylib (compatibility version 1.0.0, current version 1.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1292.0.0)
  3. andir created this gist May 18, 2021.
    14 changes: 14 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    # hydra built toolchain
    ❯ otool -La /nix/store/814ql2bfkwdfb73rmd9fi3d9vfdjhcap-bootstrap-tools/lib/libc++.1.0.dylib  ⎈ application_eks  18:13:27
    /nix/store/814ql2bfkwdfb73rmd9fi3d9vfdjhcap-bootstrap-tools/lib/libc++.1.0.dylib:
    /nix/store/814ql2bfkwdfb73rmd9fi3d9vfdjhcap-bootstrap-tools/lib/libc++.1.0.dylib (compatibility version 1.0.0, current version 1.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1292.0.0)
    @rpath/lib/libc++abi.dylib (compatibility version 1.0.0, current version 1.0.0)
    /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1770.106.0)

    # native toolchain
    ❯ otool -L /nix/store/nws7cix70a5j2w3mfn68a8wgzgb8mhz6-bootstrap-tools/lib/libc++.1.0.dylib  ⎈ application_eks  18:13:45
    /nix/store/nws7cix70a5j2w3mfn68a8wgzgb8mhz6-bootstrap-tools/lib/libc++.1.0.dylib:
    /nix/store/nws7cix70a5j2w3mfn68a8wgzgb8mhz6-bootstrap-tools/lib/libc++.1.0.dylib (compatibility version 1.0.0, current version 1.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1292.0.0)
    @rpath/lib/libc++abi.1.dylib (compatibility version 1.0.0, current version 1.0.0)