Lazarus
Free Pascal => General => Topic started by: 440bx on May 10, 2021, 06:43:11 am
-
Hello,
First, this is _mostly_ for self education.
After telling FPC to produce an assembly file, I'd like to use the assembler (AS) and linker (LD) to _manually_ create the executable.
Any guidance on how this can be done with both, 64bit and 32bit executables (hopefully it can be done), will be greatly appreciated. If there is a writeup on how to do this, a link to it would be great.
Thank you for your help.
-
Hello,
First, this is _mostly_ for self education.
After telling FPC to produce an assembly file, I'd like to use the assembler (AS) and linker (LD) to _manually_ create the executable.
Any guidance on how this can be done with both, 64bit and 32bit executables (hopefully it can be done), will be greatly appreciated. If there is a writeup on how to do this, a link to it would be great.
Thank you for your help.
Compile with -s, you will get ppas.sh. The required as and ld commands will be there unless internal assembler/linker is used.
-
Compile with -s, you will get ppas.sh. The required as and ld commands will be there unless internal assembler/linker is used.
Thank you Leledumbo. That's great, I'm going to carefully study the entire process.
-
Small addition: if you use "-s", the compiler will always switch to an external assembler. And if you add "-a", then the generated shell script for assembling/linking won't delete the assembler files once it's done.
-
Small addition: if you use "-s", the compiler will always switch to an external assembler. And if you add "-a", then the generated shell script for assembling/linking won't delete the assembler files once it's done.
Thank you Jonas. I did notice that. I am using -al. Should I be using -a instead ?
-
-al is a superset of -a, so it's fine.
-
-al is a superset of -a, so it's fine.
Thank you Jonas.