Documenting parts of the IRIX userland
#1
Documenting parts of the IRIX userland
A lot of this thread is just gonna be me providing insight, through hexediting, symbol tables and c library calls, how various commands and pieces of the IRIX userland work. This will hopefully provide others with information regarding how IRIX's internals work, how they are unique, and perhaps lay the groundwork for me, or others, to replace and update utilities. 

MV/LN/CP

Might surprise you guys, but these are all the same command on IRIX. I determined this through looking at the symbols used by each (they're nearly identical) and how they all stack up in memory. It's a rather unique setup, and one I've not seen in any other OS. This does not mean the binaries are symlinked, they aren't. But the code is literally identical across the three commands. 

patch

This was a bit surprising to me. IRIX's patch is just an old version of GNU patch. 1.1, dated 1995 to be exact. This one wasn't hard, just comparing neko_patch to IRIX patch.

tar

I previously determined this in another thread to be an old version of tar derived from 4.4BSD and probably shared with solaris and other SVR4 UNIXes. 

CPIO

I'm reasonably certain this a RISCOS (no, not the ARM OS, the UNIX one) binary. There's some similarities in the RISCOS code that's on bitsavers with the symbol tables generated by this. 

Sort, uniq, wc

4.4BSD-derived. 

diff
GNU diff not sure of the version, but it's probably a very old version as it doesn't accept all new flags in use by GNU diff nowadays. 

I'll add more, but this is kinda fun.

I'm the system admin of this site. Private security technician, licensed locksmith, hack of a c developer and vintage computer enthusiast. 

https://contrib.irixnet.org/raion/ -- contributions and pieces that I'm working on currently. 

https://codeberg.org/SolusRaion -- Code repos I control

Technical problems should be sent my way.
Raion
Chief IRIX Officer

Trade Count: (9)
Posts: 4,239
Threads: 533
Joined: Nov 2017
Location: Eastern Virginia
Website Find Reply
04-14-2021, 10:39 PM
#2
RE: Documenting parts of the IRIX userland
(04-14-2021, 10:39 PM)Raion Wrote:  MV/LN/CP

Might surprise you guys, but these are all the same command on IRIX. I determined this through looking at the symbols used by each (they're nearly identical) and how they all stack up in memory. It's a rather unique setup, and one I've not seen in any other OS. This does not mean the binaries are symlinked, they aren't. But the code is literally identical across the three commands. 

Odd.  On all my SGIs (IRIX 6.5.x on Octane, O300, Indigo2;  4.0.5 on Indigo) mv and cp are symlinks to ls.

I've also seen it in the past (I forget which OS) where they are all hard links to the same binary.  That might be the case in your system.  Does 'ls -i' show the same inode number for them all?

SGI:  Indigo, Indigo2, Octane, Origin 300
Sun:  SPARCstation 20 (x4), Ultra 2, Blade 2500, T5240
HP:  9000/380, 425e, C8000
Digital: DECstation 5000/125, PWS 600au
jpstewart
Developer

Trade Count: (1)
Posts: 444
Threads: 6
Joined: May 2018
Location: SW Ontario, CA
Find Reply
04-14-2021, 11:22 PM
#3
RE: Documenting parts of the IRIX userland
AH that works. I was thinking "strange".

I'm the system admin of this site. Private security technician, licensed locksmith, hack of a c developer and vintage computer enthusiast. 

https://contrib.irixnet.org/raion/ -- contributions and pieces that I'm working on currently. 

https://codeberg.org/SolusRaion -- Code repos I control

Technical problems should be sent my way.
Raion
Chief IRIX Officer

Trade Count: (9)
Posts: 4,239
Threads: 533
Joined: Nov 2017
Location: Eastern Virginia
Website Find Reply
04-14-2021, 11:41 PM
#4
RE: Documenting parts of the IRIX userland
For what it's worth, Solaris has them as hard links to the same binary.  I knew I'd seen it somewhere.  It was cp/mv/ln as hard links that taught me the trick of checking argv[0] and altering the program's behaviour based on it.

SGI:  Indigo, Indigo2, Octane, Origin 300
Sun:  SPARCstation 20 (x4), Ultra 2, Blade 2500, T5240
HP:  9000/380, 425e, C8000
Digital: DECstation 5000/125, PWS 600au
jpstewart
Developer

Trade Count: (1)
Posts: 444
Threads: 6
Joined: May 2018
Location: SW Ontario, CA
Find Reply
04-15-2021, 01:27 AM


Forum Jump:


Users browsing this thread: 1 Guest(s)