PDA

View Full Version : Generating executables



Anonymous
16-06-2004, 05:27 PM
Okey, lets say I want to create an executable with delphi.
How exactly do you do this? Do you write the exe header and the machine code to a binary file or what? I know this is probably insane, but I was just wondering how you could do something like this.

Mrwb
16-06-2004, 05:29 PM
Damn! forgot to log in.. :oops: Diddn't know you could post as guest.
btw: someone ought to fix the cookie issue.. The login information isn't stored here...

Paulius
16-06-2004, 07:08 PM
well yes, but what's the point?

Useless Hacker
16-06-2004, 10:06 PM
Microsoft Portable Executable and Common Object File Format Specification (http://www.microsoft.com/whdc/system/platform/firmware/PECOFF.mspx)

Anonymous
16-06-2004, 10:56 PM
Useless hacker: Thanks for the link :)

Paulius: I'm just curiouse. ;)

WILL
18-06-2004, 02:20 AM
well yes, but what's the point?How do you think compilers are made? ;)

Mrwb: Good luck with your experiment, don't forget to try the same with Linux aswell. :)

cairnswm
18-06-2004, 04:55 AM
The shortcut link DGDev.tk doesn;t seem to store the cookies right but the

http://terraqueous.f2o.org/dgdev

seems to store the cookies fine

Mrwb
18-06-2004, 10:01 AM
cairnswm: I see. Finally I won't have to log in manualy *lazy*. ;)

Lightning
01-12-2004, 01:28 PM
FPC(FreePascal) uses the GNU tools, look at FPC's code and you'll see how it does it, it compiles the .o .a .ppu files and uses the GNU linker(crossplatform) to make executables and/or .dll/.so.

WILL
02-12-2004, 01:33 AM
Here is a very popular tutorial on writting a compiler by Jack Crenshaw PhD using Turbo Pascal 4.0.

TP4 you say?!?! Yup! :) This set of tutorials started in 1988 and was added to up until 1995 when it was seemingly abandoned, yet never finished. It contains about 16 chapters of how you would go about the various issues of developing a compiler.

Here is the link: Let's Build a Compiler (http://compilers.iecc.com/crenshaw/)

Lightning
02-12-2004, 09:42 AM
I have many docs about compilers but it's not that easy to understand without a working compiler, your problem is the linker e.g. ld.exe that converts binary ASM to an executable so you see the linker does everything and it's a part of GNU tools written in C if i'm not mistaking.

WILL
02-12-2004, 10:57 AM
Ironically, the tutorials that I have posted don't seem to make mention of how the linker works. :/ Does anyone have more information on how to make a linker?

Though it may be easier to just use one thats already made, like you suggest Lightning, it would not be as capable for something that was to cross-compile for multiple platforms. And besides, I rarely like doing that when I can indeed make my own. ;)