How to call linker?

Linux specific forum
User avatar
Brujah
Enthusiast
Enthusiast
Posts: 237
Joined: Mon Nov 03, 2003 7:45 pm
Location: Germany
Contact:

How to call linker?

Post 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?
Pupil
Enthusiast
Enthusiast
Posts: 715
Joined: Fri Apr 25, 2003 3:56 pm

Post 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..
User avatar
Brujah
Enthusiast
Enthusiast
Posts: 237
Joined: Mon Nov 03, 2003 7:45 pm
Location: Germany
Contact:

Post 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?
Pupil
Enthusiast
Enthusiast
Posts: 715
Joined: Fri Apr 25, 2003 3:56 pm

Post 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?
Post Reply