hacker-news-custom-logo

Hackr News App

8 comments

  • wincy

     

    16 hours ago

    [ - ]

    I remember learning about ELF files first because that’s how you’d run pirated PS2 games. Funny how my insatiable appetite for games in my teens resulted in learning so much about Linux executable files and eventually it seemed inevitable that I should just learn to code.

    d3Xt3r

     

    8 hours ago

    [ - ]

    Funny how a lot of us got into computers that way. For me, it was wanting to play Prince of Persia and other DOS games on my cousin's PC when he wasn't around. Figured out what CD and DIR did and how I could run different games by varying the commands. In a few years I was whipping up my own game launcher using AUTOEXEC.BAT, which got me into scripting. I learned to love DOS, and so the eventual transition to Linux was easy for me as I already a CLI fan and I was blown away with how much more powerful the Linux terminal was. It was basically love at first sight.

  • Animats

     

    17 hours ago

    [ - ]

    Oh, nice. Did not know that executable image processing had moved to user space. Does this eliminate kernel crashes from malformed executables?

    jchw

     

    14 hours ago

    [ - ]

    I think static executables will still be mostly loaded by the kernel; when you have a binary with PT_INTERP it will load that instead, but that executable still needs to be loaded in by the elf binfmt. Unless I just entirely missed what you were talking about from the article, which is surely possible, though I double checked and I don't see it implying that static binaries are loaded by userspace.

    To me this whole thing is interesting since it essentially requires ELF loading to be duplicated between the kernel and libc, and then possibly duplicated again for libdl vs ldlinux. Seems unideal. (Though nothing new. Pretty sure it's been like that for decades by this point.)

    Animats

     

    2 hours ago

    [ - ]

    > essentially requires ELF loading to be duplicated between the kernel and libc, and then possibly duplicated again for libdl vs ldlinux. Seems unideal.

    Oh.

    I liked the way QNX did it. Loading was done by a .so file, entirely by userspace. When you built a kernel boot image, you could include whatever userspace programs and .so files were needed to get started, as raw memory images. They were all loaded by the boot loader. That included the .so file with the code for loading programs. All loading and preprocessing of executable images was done entirely in user space.

    It looks like Linux now has similar capabilities, but the old cruft remains. This is typical of Linux migration of machinery to user space. The kernel doesn't seem to shrink.

  • vaxman

     

    21 hours ago

    [ - ]

    We once called that “image activation” before the Industry was taken over by human LLMs in the wake of the dot-com crash.

    drewg123

     

    6 hours ago

    [ - ]

    FreeBSD still uses this term. Eg, the elf code lives in sys/kern/imgact_elf.c

    gjvc

     

    8 hours ago

    [ - ]

    Pretty sure only VMS used that term.