Skip to content

0.30.1: the System V row states its program headers (no PT_PHDR), found on a System V kernel - #38

Merged
Sunrisepeak merged 1 commit into
mainfrom
eco/0.30.1-svr4-headers
Nov 19, 2026
Merged

Sunrisepeak merged 1 commit into
mainfrom
eco/0.30.1-svr4-headers

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

What

i686-svr4-musl links with a linker script, link/svr4.ld, that states the program headers: the same three PT_LOAD segments the link made before (the file's headers inside the first), PT_GNU_EH_FRAME, PT_GNU_STACK, and no PT_PHDR. No member changes; version 0.30.1.

Why

The row's programs were run on a System V kernel for the first time: AT&T UNIX System V/386 Release 4.0 Version 3.0, installed in QEMU from its floppy set (media this platform neither holds nor distributes), on the developer's machine.

Every program was killed as it started (status 137). The kernel's elfexec refuses an executable that has a PT_PHDR entry and no PT_INTERP one — the entry is for the run-time linker — and it refuses after the old image is gone. A static lld link always writes PT_PHDR when the headers are loaded. ibcs-us accepts either form, which is why the emulation never showed it.

Measured

With this branch's link, nothing rewritten after it:

Where What Result
System V/386 R4.0 v3.0 (QEMU, local, once) the specification's suite (env,time,fs,terminal) 111 held, 0 did not hold
same the program of checks/svr4, dev (stripped of debugging sections to fit a floppy) and release (as linked) output as under the emulation, status 7
same an external C project's two batch scripts, dev and release output as expected
ibcs-us, three interfaces the suite; the same project's 12-cell matrix 111 held ×3; 12 of 12

CI cannot run on that kernel; the svr4 job now reads the built program's headers (no PT_PHDR/PT_INTERP, three PT_LOAD).

Not in this change

The run on the System V kernel is not automated: no package of its media exists.

The kernel of AT&T UNIX System V/386 Release 4.0 refuses an executable that
has a PT_PHDR entry and no PT_INTERP one (elfexec), after the old image is
gone, so a program of i686-svr4-musl was killed as it started. A static lld
link writes PT_PHDR unless the headers are stated; link/svr4.ld states them:
the three segments the link made before, the file's headers in the first, no
PT_PHDR. The emulation (ibcs-us) accepts either form, so CI now reads the
headers of the built program.

Measured on that kernel (Release 4.0 Version 3.0 in QEMU, locally, once): the
specification's suite 111 held / 0 did not hold; the program of checks/svr4 in
both modes; no member changes.
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.

1 participant