flat assembler
Message board for the users of flat assembler.

Index > Main > flink to do?


Do you need a linker for fasm?
Yes
46%
 46%  [ 7 ]
No
53%
 53%  [ 8 ]
Total Votes : 15

Author
Thread Post new topic Reply to topic
donkey7



Joined: 31 Jan 2005
Posts: 127
Location: Poland, Malopolska
donkey7 18 Jul 2005, 07:38
Heh, it would be nice if there is a linker (flink) that would help maintaining projects. golink is a bit useless because it doesn't support .lib files, ond only mscoff format of object files.

is anyone interested in it (i mean - would anyone start that project, Tomasz Grysztar says that he has a lack of time to do it)?

_________________
Keep coding!
Post 18 Jul 2005, 07:38
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8358
Location: Kraków, Poland
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.
Post 18 Jul 2005, 08:57
View user's profile Send private message Visit poster's website Reply with quote
donkey7



Joined: 31 Jan 2005
Posts: 127
Location: Poland, Malopolska
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).
Post 18 Jul 2005, 09:55
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8358
Location: Kraków, Poland
Tomasz Grysztar 18 Jul 2005, 10:43
What do you mean by 'normal sources'? Confused For COFF output format you just have the dedicated set of directives, see manual.
Post 18 Jul 2005, 10:43
View user's profile Send private message Visit poster's website Reply with quote
MCD



Joined: 21 Aug 2004
Posts: 602
Location: Germany
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.
Post 18 Jul 2005, 11:04
View user's profile Send private message Reply with quote
Raedwulf



Joined: 13 Jul 2005
Posts: 375
Location: United Kingdom
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)
Post 18 Jul 2005, 11:43
View user's profile Send private message MSN Messenger Reply with quote
donkey7



Joined: 31 Jan 2005
Posts: 127
Location: Poland, Malopolska
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!
Post 18 Jul 2005, 11:52
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8358
Location: Kraków, Poland
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.
Post 18 Jul 2005, 12:23
View user's profile Send private message Visit poster's website Reply with quote
pelaillo
Missing in inaction


Joined: 19 Jun 2003
Posts: 878
Location: Colombia
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.
Post 18 Jul 2005, 12:59
View user's profile Send private message Yahoo Messenger Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8358
Location: Kraków, Poland
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.
Post 18 Jul 2005, 13:03
View user's profile Send private message Visit poster's website Reply with quote
pelaillo
Missing in inaction


Joined: 19 Jun 2003
Posts: 878
Location: Colombia
pelaillo 18 Jul 2005, 14:27
Quote:

The linking process and fasm's formatter are completely different things

Of course. Smile 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.
Post 18 Jul 2005, 14:27
View user's profile Send private message Yahoo Messenger Reply with quote
Vortex



Joined: 17 Jun 2003
Posts: 318
Vortex 18 Jul 2005, 17:48
Pelle's linker Polink does the job. It's very powerfull and free.

_________________
Code it... That's all...
Post 18 Jul 2005, 17:48
View user's profile Send private message Visit poster's website Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3175
Location: Denmark
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.
Post 18 Jul 2005, 17:52
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.