WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: exec old binaries depending on libc5  (Read 2943 times)

Offline smultita

  • Newbie
  • *
  • Posts: 13
    • EmbLin
exec old binaries depending on libc5
« on: August 19, 2010, 10:58:25 AM »
I have some old console programs (binaries depending on libc.so.5 and ld-linux.so.1) I would like to run.

I have done this in the past on a Debian Linux version 2.6.11 by just copying the libs (above) to /lib.
However when I test this in Tinycore 3.0 (or Microcore) the programs run, but after a while I get Segmentation Fault. This seems to be caused by the shared memory (used by the programs to communicate between each other) which is corrupted.

Is it anyway possible to run old binaries still depending on libc.so.5 and ld-linux.so.1 on Tinycore,  Microcore or any newer Linux distro ?

« Last Edit: August 20, 2010, 03:35:16 AM by smultita »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: exec old binaries depending on libc5
« Reply #1 on: August 24, 2010, 09:36:23 AM »
They shouldn't have run on 2.x either. They won't run on any modern distro (unless really lucky, I guess), since libc5 depends on a security option being disabled.

You can turn that security feature off at runtime though to try to run them:
http://kernel.xc.net/html/linux-2.6.35/x86/COMPAT_BRK
The only barriers that can stop you are the ones you create yourself.

Offline smultita

  • Newbie
  • *
  • Posts: 13
    • EmbLin
Re: exec old binaries depending on libc5
« Reply #2 on: August 25, 2010, 11:18:51 AM »
in TinyCore 3  /proc/sys/kernel/randomize_va_space  is already set to 2  (=off ?) in tinycore 3

The binaries where develop long time ago under Linux kernel 2.0.35 which used libc5
The have been running on 2.4.26 for several years (which used libc6 but libc.so.5 and ld-linux.so.1 was cp to /lib)
 

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: exec old binaries depending on libc5
« Reply #3 on: August 25, 2010, 12:11:49 PM »
2 is on, I don't know what would be the off value but guessing 0. Yeah, the Kconfig text is kinda confusing.
The only barriers that can stop you are the ones you create yourself.

Offline smultita

  • Newbie
  • *
  • Posts: 13
    • EmbLin
Re: exec old binaries depending on libc5
« Reply #4 on: August 26, 2010, 03:07:11 AM »
Thanks a lot guys
Code: [Select]
echo 0 > /proc/sys/kernel/randomize_va_space
did the job  :D
« Last Edit: August 26, 2010, 03:22:32 AM by smultita »