Live data from Hacker News

Manually creating an ELF executable

negrebskoh.net

31–38 of 38 posts

Re: Manually creating an ELF executable

#31

Earlier quoted context omitted.

I studied physics, and I learnt actual programming and assembly language: I actually did this in the real world! What do you learn in Computer Science then?! Gibbering useless concepts that makes you non-sensical experts in the field of not delivering your software neither in time, nor in the frame of the specification? Or just

Why exactly does this article make you so enraged?

Indeed. He's telling us much more about himself than he is anything relevant to the article.

If you see nothing but a huge waste of time in this post, you're probably on the wrong site. HN in its prime would have really pissed you off, no doubt...

Re: Manually creating an ELF executable

#32
post #13

If you liked this, you'll probably like even more "A Whirlwind Tutorial on Creating Really Teensy ELF Executables for Linux" ( http://www.muppetlabs.com/~breadbox/software/tiny/teensy.htm... ). Last time I checked, the teensy executable had stopped working around Linux 2.6.26 or 2.6.27, and I don't know why. Relatedly, I wrote a tiny quasi-Forth in itself that generates ELF executables directly at https://github.com/…

That's odd. I'm currently running 2.6.32, and it's working fine for me. Maybe it was a transient problem? Feel free to email me if you notice any of the teensy executables not working. I don't follow the bleeding edge very closely, but I do make a serious effort to keep all of them working.

I'm delighted! That probably means SKF is back to working too :)

Edit: Hmm, apparently not — I must be cutting a corner of the ELF spec that teensy isn't, since teensy works for me too. I'm on 3.2.0-35 here.

Re: Manually creating an ELF executable

#33
This is great. I've had low-level stuff on my mind lately. I was thinking about where to start, either writing my own binary to the boot sector of a disk, or booting up MS-DOS and going from there, or from linux or windows and starting with machine code from there. So this would be perfect. (I was thinking of maybe implementing FORTH. Interesting that kragen mentions a "tiny quasi-Forth" that he made.)

Re: Manually creating an ELF executable

#34
post #2

So essentially, this is writing an application in machine code? This is so fascinating I'm starting to get palpitations. I've always wanted to know how to program in machine code. I've looked through the web countless times in search of something like this, and haven't ever found it, until now. Thanks for the great insight. This kind of stuff makes C/C++ look like stuff for total newbies. Getting this close to the ha…

We did it all the time in the early eighties, with machine language monitors.

Re: Manually creating an ELF executable

#35
post #20
post #5

One of the cool things about "personal computers", when they were not synonymous with "IBM PC" or x86 box, was that you had total control over every bit and byte that went into them. Sometimes you had to use switches to manually set memory contents, sometimes there was a hard coded 'boot loader' which would do that for you. The coolest demo I think I've seen in this space was an FPGA computer design where the first d…

It's kind of the same deal now with the Raspberry Pi, except for the fact that it uses RISC and not x86. It's a great tinkering platform. Now, if only somebody would make a ring-0 OS for ARM... Now THAT would be fun.

You mean like Active Oberon?

http://www.ocp.inf.ethz.ch/wiki/

Not sure how workable this version is, but you can check on the forums,

ftp://ftp.lrz.de/transfer/BlueBottle-A2/ARMRelease.zip

You just need to enjoy using Pascal syntax languages for system programming.

Re: Manually creating an ELF executable

#36
post #20
post #5

One of the cool things about "personal computers", when they were not synonymous with "IBM PC" or x86 box, was that you had total control over every bit and byte that went into them. Sometimes you had to use switches to manually set memory contents, sometimes there was a hard coded 'boot loader' which would do that for you. The coolest demo I think I've seen in this space was an FPGA computer design where the first d…

It's kind of the same deal now with the Raspberry Pi, except for the fact that it uses RISC and not x86. It's a great tinkering platform. Now, if only somebody would make a ring-0 OS for ARM... Now THAT would be fun.

There is FreeRTOS (http://www.freertos.org/).

Re: Manually creating an ELF executable

#38
post #23
post #2

So essentially, this is writing an application in machine code? This is so fascinating I'm starting to get palpitations. I've always wanted to know how to program in machine code. I've looked through the web countless times in search of something like this, and haven't ever found it, until now. Thanks for the great insight. This kind of stuff makes C/C++ look like stuff for total newbies. Getting this close to the ha…

> I've always wanted to know how to program in machine code. 1) Decide which processor you want to program. I'm going to use a Z80, since that's one I'm familiar with. 2) Get hold of a good book, making sure it includes a section that exhaustively describes each instruction and the machine code for each. Eg. "Programming the Z80" by Rodnay Zaks. The microprocessor's datasheet will generally do if your familiar with o…

If I had a nickel for every hour I spent doing this as a teen... (Sinclair ZX-81, then TRS-80 Model 1.)

Also, that Zaks book rocks. To this day one of the best programming references I've ever used. http://www.z80.info/zaks.html

Post reply on HN