flat assembler
Message board for the users of flat assembler.

Index > Linux > ELF64 Thread Local Storage for fasmg

Author
Thread Post new topic Reply to topic
sylware



Joined: 23 Oct 2020
Posts: 3
Location: Marseille/France
sylware
Hi,

I would like to _try_ to add ELF64 Thread Local Storage support to fasmg.

Since my knowledge about fasm internals is zero and I only did scratch the surface of the fasmg macro language, I am unable to see if there are obvious show stoppers in those very internals and/or the macro language misses some critical features.

Any pointers/help/warnings/etc?
Post 23 Oct 2020, 02:15
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7802
Location: Kraków, Poland
Tomasz Grysztar
I regret that I have not finished the second chapter of my formats tutorial, as it could be a perfect reference here. But I believe even the first one (about PE) can be a good source of inspiration, showing how to build various format structure with only basic macro features. As demonstrated there, you do not really need any advanced tricks most of the time, only the very basics of fasmg's macro language.
Post 24 Oct 2020, 08:45
View user's profile Send private message Visit poster's website Reply with quote
sylware



Joined: 23 Oct 2020
Posts: 3
Location: Marseille/France
sylware
Thanks for your time, response, and pointers. I have been sidetracked on others topics. I'll probably be back later on this matter.
Nethertheless I did go deeper in tls, and the only reasonable way to deal "properly" with it is the "dynamic" way (tls specs from ulrich drepper): the location of tls data must use a dynamic linker ABI function for such task (because of lazy tls). It should be reduced to calling this dynamic linker function with some "offsets/ids" which would be provided via some relocation entries of tls types.
tls was a very bad idea in the first place, really bad. sad much software does rely on it (i.e. glibc) for their implementation.
Post 25 Oct 2020, 16:33
View user's profile Send private message 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-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.