flat assembler
Message board for the users of flat assembler.
Index
> Main > flink to do? |
Do you need a linker for fasm? | ||||||||||||||
|
||||||||||||||
Total Votes : 15 |
Author |
|
Tomasz Grysztar 18 Jul 2005, 08:57
I could still help with my own design hints if someone wanted to start such project - I was planning writing a linker from time to time, but never started anything more than just thinking and designing. However, you should note, that with the most of fasm's features before I implemented them it was a few days or weeks of designing and then just a few hours on coding the implementation.
|
|||
18 Jul 2005, 08:57 |
|
donkey7 18 Jul 2005, 09:55
btw: is it possible for fasm to generate mscoff files from 'normal' sources (like in other assemblers - they firstly generates only .obj files that must be later linked) using modified macros (extrn for all improts and ignoring imports).
|
|||
18 Jul 2005, 09:55 |
|
Tomasz Grysztar 18 Jul 2005, 10:43
What do you mean by 'normal sources'? For COFF output format you just have the dedicated set of directives, see manual.
|
|||
18 Jul 2005, 10:43 |
|
MCD 18 Jul 2005, 11:04
I was just wondering what the heck does anyone need a linker for Fasm. OBJs and other static libraries can be created with Fasm with usual source code. There are examples for OBJ and SYS files. Also you can add additional static libraries (precompiled binaries) to your usual code using the file directive. If all this isn't powerful enough, than you can customize it using macros a.s.o.
|
|||
18 Jul 2005, 11:04 |
|
Raedwulf 18 Jul 2005, 11:43
That's a point.
Anyway....why make another linker when there's a free one here which can used for anything :- http://www.smorgasbordet.com/pellesc/ Download pelles c and install it Polink is in the bin directory This is free and is used for some other assembler i think(I'm not sure though) |
|||
18 Jul 2005, 11:43 |
|
donkey7 18 Jul 2005, 11:52
MCD wrote: ...you can add additional static libraries (precompiled binaries) to your usual code using the file directive... how to do that? _________________ Keep coding! |
|||
18 Jul 2005, 11:52 |
|
Tomasz Grysztar 18 Jul 2005, 12:23
Quote: why make another linker when there's a free one here which can used for anything There are many free ones, but none of them is versatile enough to be a universal pair for fasm; well, GNU ld maybe. The main point would be to accept various input files (like combining COFF and ELF objects and libraries into single project) and link them into any output, allowing - in a way similar to fasm - to create any kind of executable no matter in what OS you are. It would also retain the section names and attributes as exactly as possible, while still merging the sections of the same names and attributes onto single section. These were my basic ideas for the flink when I though about it. But, anyway, you are generally right - I never felt such project is crucial for fasm, and so I never really started it. |
|||
18 Jul 2005, 12:23 |
|
pelaillo 18 Jul 2005, 12:59
My own idea about the subject is to take advantage of fasm's formatter. There is no need for an external linker if we add the ability to "read" object files and process them before the formatting.
|
|||
18 Jul 2005, 12:59 |
|
Tomasz Grysztar 18 Jul 2005, 13:03
The linking process and fasm's formatter are completely different things. fasm's formatter just adds the headers and other information to code generated by assembler - it doesn't rearrange and recombine this code in any way (and everything is put into the output in the same order as stated in source). The fact that fasm's formatter can format output file to be not only object file, but also some types of executables doesn't mean fasm has an built-in linker (I saw such false opinions formed sometimes). The job of linker is to combine the code and data sections from different sources (object files and libraries) into one - that means rearranging the sections, merging them, dropping the ones that are not needed in final executable, resolving references between them, etc.
|
|||
18 Jul 2005, 13:03 |
|
pelaillo 18 Jul 2005, 14:27
Quote:
Of course. I am talking about adding linking capabilities to it. I won't want it to rearrange the sections. I like the way Fasm's respect the given order in sources. Merging cannot be done in a flat memory but it can if we use separate buffers to tie them together at the end in the order given by the source code. |
|||
18 Jul 2005, 14:27 |
|
Vortex 18 Jul 2005, 17:48
Pelle's linker Polink does the job. It's very powerfull and free.
_________________ Code it... That's all... |
|||
18 Jul 2005, 17:48 |
|
f0dder 18 Jul 2005, 17:52
While not necessary for many users, a versatile linker would be a nice thing. Gnus LD is very powerful, but overly complex (it would probably take a while for a person unfamiliar with the internals to add a new input format). MS link and Pelle's polink are very nice, but not very flexible (talking about supported file formats, linker scripts, ...)
A good linker could come in very handy for os development, and it might be interesting to have a windows linker that supports elf objects and libraries. Not to mention some *decent* linker scripts. |
|||
18 Jul 2005, 17:52 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.