When I link FASM emitted code against code
that was assembled by MASM (or against MS'
kernel32.lib/user32.lib/etc.), I typically get warnings
from the linker griping about the fact that there
are multiple ".data" or ".bss" sections with different
attributes. I am assuming that this is talking about
the "readability/writeability/executable" attributes
attached to a section in FASM. I've tried
readable/writeable and readable/writeable/executable
for my .data and .bss sections and can't seem to get
the warnings to to away.

I don't believe this is an issue (because I supply linker
options to explicitly tell the linker how to set these
sections), but the warning is annoying and will cause
some people grief when assembling source code.

Anyone know what attributes I should use?

I guess the other option is figure out what the warning
level is that will shut up the linker, but I really don't like
doing that (since there may be some important warnings
it quiets by doing this).
Cheers,
Randy Hyde
Posted on 2003-01-25 19:18:45 by rhyde
IMAGE_SCN_CNT_INITIALIZED_DATA or IMAGE_SCN_MEM_READ or IMAGE_SCN_MEM_WRITE
Posted on 2003-01-26 04:40:18 by Axial
In fasm's syntax it's:


section '.data' data readable writeable

When you define '.bss' section you don't have to provide 'data' flag, if section contains only uninitialized data, fasm will mark it automatically with appropriate flag.
Posted on 2003-01-26 04:49:34 by Tomasz Grysztar

In fasm's syntax it's:


section '.data' data readable writeable

When you define '.bss' section you don't have to provide 'data' flag, if section contains only uninitialized data, fasm will mark it automatically with appropriate flag.


Aha!
That's what the <data> stands for.
It all becomes clear now...
Thanks, everyone.
Randy Hyde
Posted on 2003-01-26 15:57:47 by rhyde



Aha!
That's what the <data> stands for.
It all becomes clear now...
Thanks, everyone.
Randy Hyde


Okay, I changed the section definitions around
and now those nasty warnings went away.
Thanks again, everyone.
Randy Hyde
Posted on 2003-01-26 18:22:01 by rhyde