Page 1 of 1
How to call linker?
Posted: Sun Nov 20, 2005 8:19 pm
by Brujah
When I compile my program with
pbcompiler -c laby.pb
I get the commented Assembler outout.
Then I can Assemble it with
fasm -m 100000 laby.asm
Which gives me a Object file laby.o
But how do I call the linker then to get the final program?
Posted: Sun Nov 20, 2005 8:28 pm
by Pupil
As far as i know you can't do it like this because the PB libs aren't availabe in a linkable format if you're not compiling from the PBCompiler..
What you should do is replacing the FASM exe with a dummy file that pass the correct switches to the real FASM exe and then pass the output from FASM to the PBCompiler..
Posted: Mon Nov 21, 2005 12:17 am
by Brujah
Okay, I tried the following (without success yet...)
mv fasm fasm2
And wrote the following script to replace fasm:
#!/bin/bash
/usr/bin/fasm2 -m 100000 $@
But I still get errors.
I don`t know how the parameters are working.
How do I send the output back to pbcompiler?
Posted: Mon Nov 21, 2005 7:58 pm
by Pupil
I was more thinking of making a small PB program that uses the 'ProgramParameter()' function and use the stdin/out functions that i saw the other day here on the forum..
Correct me if i'm wrong (i'm not really used to linux) but isn't the very same original switch '-m 25000' passed to fasm aswell with the script you made, thus overriding the previous switch?