flat assembler
Message board for the users of flat assembler.

Index > Windows > MS COFF and help converting NASM to fasm

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 19871
Location: In your JS exploiting you and your system
revolution 22 Nov 2016, 14:16
Manos wrote:

P.S.
Did you download my wlink32 ?
No, it wasn't me.
Post 22 Nov 2016, 14:16
View user's profile Send private message Visit poster's website Reply with quote
Manos



Joined: 24 Aug 2003
Posts: 35
Location: Greece
Manos 22 Nov 2016, 15:49
revolution wrote:
Manos wrote:

P.S.
Did you download my wlink32 ?
No, it wasn't me.


You don't understood me.
I asked you if you are interested for wlink32.

Manos.
Post 22 Nov 2016, 15:49
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 19871
Location: In your JS exploiting you and your system
revolution 22 Nov 2016, 15:51
Manos wrote:
I asked you if you are interested for wlink32.
No, not me. I currently don't have a need for an x86 linker. But others here may have a use case.
Post 22 Nov 2016, 15:51
View user's profile Send private message Visit poster's website Reply with quote
Manos



Joined: 24 Aug 2003
Posts: 35
Location: Greece
Manos 22 Nov 2016, 15:53
revolution wrote:
Manos wrote:
I asked you if you are interested for wlink32.
No, not me. I currently don't have a need for an x86 linker. But others here may have a use case.


OK.

Thank you,
Manos.
Post 22 Nov 2016, 15:53
View user's profile Send private message Visit poster's website Reply with quote
Manos



Joined: 24 Aug 2003
Posts: 35
Location: Greece
Manos 22 Nov 2016, 18:43
In NASM there is a const segment: [section .rdata]

How can I phrase the above in FASM ?

Thanks,
Manos.
Post 22 Nov 2016, 18:43
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 19871
Location: In your JS exploiting you and your system
revolution 22 Nov 2016, 22:17
Manos wrote:
In NASM there is a const segment: [section .rdata]

How can I phrase the above in FASM ?
Code:
section '.rdata' data readable    
Post 22 Nov 2016, 22:17
View user's profile Send private message Visit poster's website Reply with quote
Manos



Joined: 24 Aug 2003
Posts: 35
Location: Greece
Manos 23 Nov 2016, 08:50
Thank you revolution.

Because I come from NASM to FASM and the FASM documentation is a bit short, could you translate
the following NASM expressions to FASM ?

[section tls]
[section tlsstartup]
[section tlsrundown]
[section cstartup]
[section crundown]
[section .drectve info]


Manos.
Post 23 Nov 2016, 08:50
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 19871
Location: In your JS exploiting you and your system
revolution 23 Nov 2016, 09:29
You can use the data directive to specify the predefined sections. Check out the PE specs for which section numbers relate to which data type.
Code:
data <section_number>
  ;stuff
end data    
From the fasm manual:
Quote:
data directive begins the definition of special PE data, it should be followed by one
of the data identifiers (export, import, resource or fixups) or by the number of data
entry in PE header. The data should be defined in next lines, ended with end data
directive. When fixups data definition is chosen, they are generated automatically and
no more data needs to be defined there. The same applies to the resource data when
the resource identifier is followed by from operator and quoted file name – in such case
data is taken from the given resource file.
Post 23 Nov 2016, 09:29
View user's profile Send private message Visit poster's website Reply with quote
Manos



Joined: 24 Aug 2003
Posts: 35
Location: Greece
Manos 23 Nov 2016, 20:06
Hi revolution.

Because my C compiler, (wcc32), was made to emit plain NASM code,
I modified it to emit plain FASM code.
This is the reason for the above questions.
The only problem with FASM was the absence of includelib that
MASM use or [section .drectve info] that NASM use.
But I managed it for FASM, like: section '.drectve' data readable linkinfo
The above Informs the linker that the current module should be linked with a library.

Example:
section '.drectve' data readable linkinfo
db "/defaultlib:msvcrt.lib"


Thank you for the help,
Manos.
Post 23 Nov 2016, 20:06
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:  
Goto page Previous  1, 2

< 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-2023, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.