Help with fpc!

Programming, for all ages and all languages.
Post Reply
SirStorm25
Posts: 11
Joined: Sun Jul 20, 2008 4:06 pm

Help with fpc!

Post 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.
010010000110100100100000010101000110100001100101011100100110010100100001
Can you read binary???

Currently Project I'm involved in:

The Free Pascal Operating System Project :D
SirStorm25
Posts: 11
Joined: Sun Jul 20, 2008 4:06 pm

Re: Help with fpc!

Post by SirStorm25 »

Would it be possible to import the .o or .ppu files instead of the uses list?
010010000110100100100000010101000110100001100101011100100110010100100001
Can you read binary???

Currently Project I'm involved in:

The Free Pascal Operating System Project :D
SirStorm25
Posts: 11
Joined: Sun Jul 20, 2008 4:06 pm

Re: Help with fpc!

Post by SirStorm25 »

Any Ideas?
010010000110100100100000010101000110100001100101011100100110010100100001
Can you read binary???

Currently Project I'm involved in:

The Free Pascal Operating System Project :D
Laksen
Member
Member
Posts: 140
Joined: Fri Nov 09, 2007 3:30 am
Location: Aalborg, Denmark

Re: Help with fpc!

Post 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
http://j-software.dk | JPasKernel - My Object Pascal kernel
SirStorm25
Posts: 11
Joined: Sun Jul 20, 2008 4:06 pm

Re: Help with fpc!

Post by SirStorm25 »

Hmmm... Anyone know which version of fpc outputs version 90 ppus?

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

Regards

SirStorm25
010010000110100100100000010101000110100001100101011100100110010100100001
Can you read binary???

Currently Project I'm involved in:

The Free Pascal Operating System Project :D
Post Reply