Page 1 of 1

Help with fpc!

Posted: Mon Jul 21, 2008 12:09 pm
by SirStorm25
Hi All!

I was wondering if it was possible to compile a .pas file to an object file (.o).
But, sadly I lost some code files which I can no-longer find on the internet, as
the website was removed :( . But, I still have the compiled .o files and .ppu files.
Plus, the pascal file requires some of these "lost" code files. So, I was wondering
how I would be able to compile the file with the same options as below, but without
needing to have the other .pas files. E.g: Put the .pas file in the same directory as the
.o and .ppu files and compile the .pas file, heres the options for fpc that I'm using:

fpc -Aelf -n -O3 -Op3 -Si -Sc -Sg -Xd -Rintel -Tlinux

Hope you can help!
Regards

SirStorm25.

Re: Help with fpc!

Posted: Mon Jul 21, 2008 12:40 pm
by SirStorm25
Would it be possible to import the .o or .ppu files instead of the uses list?

Re: Help with fpc!

Posted: Mon Jul 21, 2008 1:24 pm
by SirStorm25
Any Ideas?

Re: Help with fpc!

Posted: Mon Jul 21, 2008 2:04 pm
by Laksen
You can't rely on the internal linker anymore but instead have to hope the interface is intact. You must also be 100% certain that the system.pas unit hasn't changed for any of the files, compiled as well as uncompiled.

If you have absolutely no way of regaining the source to the compiled unit you'll probably have to use an external linker, such as binutils' ld

you can use the -Cn compiler flag to omit the internal linking state

Re: Help with fpc!

Posted: Tue Jul 22, 2008 6:03 am
by SirStorm25
Hmmm... Anyone know which version of fpc outputs version 90 ppus?

Also, if u do, anyone have a download link???

Regards

SirStorm25