Note · budding
Restoring IRIX 6.5 dynamic linking in binutils
- Stage
- budding
- Links
- 1 out, 1 in
Current binutils still knows about IRIX, but programs it links do not start on IRIX 6.5: the system’s runtime linker, rld, rejects or mishandles them. Four changes to binutils 2.47 were needed for IRIX 7 before a dynamically linked program built with a modern toolchain ran on the real operating system.
- Local entries in the global offset table are laid out the way
rldexpects. - The
.rld_mapsection is emitted.rlduses it to publish its map of loaded objects to debuggers. - The newer
DT_MIPS_RLD_MAP_RELdynamic tag is suppressed. Linux’s loader understands it; IRIX’s does not. - A section alignment in the startup object
crt1is corrected.
With those, both o32 and n32 test programs run in an IRIX 6.5 guest.
The way they are tested matters as much as the patches. The same source is compiled twice inside an emulated Indy running IRIX: once with SGI’s own MIPSpro compiler and once with the new toolchain. Both programs run on the guest and their output is compared. MIPSpro’s result is treated as the definition of correct.
Links to
Projects
- IRIX 7 A Rust operating system for the SGI Indy, meant to run IRIX 6.5 applications unchanged.
Linked from
Projects
- IRIX 7 A Rust operating system for the SGI Indy, meant to run IRIX 6.5 applications unchanged.
Related by meaning