Skip to content

Look for dynamic linker in /bin/less in integ test#1159

Merged
davidlattimore merged 1 commit into
wild-linker:mainfrom
daniel-levin:illumos_fixes
Oct 6, 2025
Merged

Look for dynamic linker in /bin/less in integ test#1159
davidlattimore merged 1 commit into
wild-linker:mainfrom
daniel-levin:illumos_fixes

Conversation

@daniel-levin

@daniel-levin daniel-levin commented Oct 6, 2025

Copy link
Copy Markdown
Contributor

More Illumos fun! This change checks less for a dynamic linker as well. Formatting the array makes the change look larger than it is. Combined with #1158 we are now up to 27 passing integ tests on Illumos, up from just 9. As for why less? Well, it's a pager that's pretty pervasively installed, so why not make a last-ditch effort there?

It turns out that on Illumos, lots of coreutils are actually 32-bit binaries. I tracked this down to here. I printed the error returned by object - something about invalid headers. Sure enough - less is 64 bit and ls is 32 bit!

❯ readelf -h /bin/less
ELF Header:
  Magic:   7f 45 4c 46 02 01 01 06 01 00 00 00 00 00 00 00
  Class:                             ELF64
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - Solaris
  ABI Version:                       1
  Type:                              EXEC (Executable file)
  Machine:                           Advanced Micro Devices X86-64
  Version:                           0x1
  Entry point address:               0x410cc0
  Start of program headers:          64 (bytes into file)
  Start of section headers:          311888 (bytes into file)
  Flags:                             0x0
  Size of this header:               64 (bytes)
  Size of program headers:           56 (bytes)
  Number of program headers:         6
  Size of section headers:           64 (bytes)
  Number of section headers:         30
  Section header string table index: 28
❯ readelf -h /bin/ls
ELF Header:
  Magic:   7f 45 4c 46 01 01 01 06 01 00 00 00 00 00 00 00
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - Solaris
  ABI Version:                       1
  Type:                              EXEC (Executable file)
  Machine:                           Intel 80386
  Version:                           0x1
  Entry point address:               0x8052650
  Start of program headers:          52 (bytes into file)
  Start of section headers:          46156 (bytes into file)
  Flags:                             0x0
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         7
  Size of section headers:           40 (bytes)
  Number of section headers:         30
  Section header string table index: 29
thread 'integration_test::program_name_03___trivial_dynamic_c__' panicked at wild/tests/integration_tests.rs:359:14:
Failed to find a suitable host dynamically linked binary
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

@davidlattimore davidlattimore merged commit 938fd32 into wild-linker:main Oct 6, 2025
20 checks passed
@daniel-levin daniel-levin deleted the illumos_fixes branch October 7, 2025 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants