Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

In a discussion on backwards-compatibility in Linux kernel and GUI ABIs, Alan Cox notes that "my 3.6rc kernel will still run a Rogue binary built in 1992. X is back compatible to apps far older than Linux."

So just how backwards-compatible are the Linux Application binary interfaces?

What is the oldest binary executable, actually written and compiled years ago, that will still run on a modern stock general-purpose Linux distribution?

I'm sure all those words are subject to interpretation. My main notion is that it is not fair to run it via an emulator or specialized virtual machine or binary translator, but some such things are probably built into some modern distros, and learning about that is part of the fun here.

Variations by hardware architecture, executable file format, language, and major library dynamic loading dependencies are also of interest.

Note, when the rules are relaxed, here's one example of going further back. The 2002 web page Running a.out executables on modern Red Hat Linux talks about using really old Linux pre-ELF a.out-format executables after doing modprobe binfmt_aout and obtaining /lib/ld.so and libc.so.4 Again that's of peripheral interest for this question, but illustrates the sorts of things that can be involved when digging further back.

Update for you BSD fans, it's great to see that iBCS2 was supporting old Xenix apps (like zork/dungeon-2.5.6 from 1990) and SCO OpenServer 5.0.x apps as recently as NetBSD 4.0.1 (from 2008): iBCS2 & NetBSD | Fun with virtualization. But the same thing seems broken in NetBSD 5.0.x.

Update 2: One year later, after even getting an "Announcer" badge for this question, I'm still looking for an answer. And to clarify, since this is about APIs, it should be a "real" binary (non-zero length), that still at least mostly works in the original way.

share|improve this question
4  
IBCS should let you run binaries that are a few years older than Linux. –  Gilles Sep 7 '12 at 22:09
    
I was surprised to not see an "ABI" tag, and I couldn't create one yet. So add that if you think it makes sense. –  nealmcb Sep 7 '12 at 23:57
    
@Gilles Seems that iBCS is rather out-of-date. E.g. it was replaced by "Linux A.B.I." perhaps a decade ago (Linux ABI- Using other Unix binaries on Linux) and the most recent version of linux-abi seems to be from 2002 for 2.4.18: kernel.org/pub/linux/kernel/people/hch/linux-abi/v2.4 –  nealmcb Sep 8 '12 at 0:21
1  
A 1981 binary of Zork runs on IBM's VM/370 and thus presumably their current z/VM: Zork - Computer History Wiki. And a 1978 binary of Zork runs on RT-11 if you can find that.... –  nealmcb Sep 8 '12 at 1:34
2  
+1 I read this quote last week as well, and wondered if it would turn up here. –  Michael Sep 9 '12 at 1:11

1 Answer 1

I think that /bin/true has to be the oldest working ..

Well, can you call a zero-byte file a binary?

touch /tmp/old_true
chmod 755 /tmp/old_true
/tmp/old_true
echo $?
share|improve this answer
1  
Cute. Do you know if /bin/true has been distributed as a zero-length file, and if so when and where? For grins, see Solaris /bin/true - TDWTF Forums –  nealmcb Sep 18 '12 at 3:07
3  
@nealmcb -- There was a 0-byte program called go.com for both CP/M and DOS that would rerun the last COM file loaded. So, it was even sold. So, in fact, it predates Linux. It just changed what it did when it jumped platform. Talk about backwards compatibility! We have a CP/M, DOS and *nix program all running at once. –  Jeremy J Starcher Sep 18 '12 at 3:15
    
What an odd behavior - run the last COM file.... Anyway, I'm still looking for a "real" binary (non-zero length), that still at least mostly works in the original way. –  nealmcb Sep 28 '13 at 14:37
    
Deleted......... –  Jeremy J Starcher Sep 29 '13 at 1:12
    
interestingly this works in a POSIX shell and csh, but it fails in zsh: zsh: exec format error –  Marco Sep 30 '13 at 20:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.