flat assembler
Message board for the users of flat assembler.

Index > Windows > bss sections with different flags?

Author
Thread Post new topic Reply to topic
Plue



Joined: 15 Dec 2005
Posts: 151
Plue
Code:
align 4
section '.bss' data readable writeable    


The above is the start of the .bss section for uninitialized data in two .asm files. I then compile them as MS COFF into .obj files. After that I give them to polink together with kernel32.lib, which gives me the following errors:
Code:
POLINK: warning: Multiple '.bss' sections found with different flags (0xc00000c0 and 0xc0000040).
POLINK: warning: Multiple '.data' sections found with different flags (0xc00000c0 and 0xc0000040).    

Now firstly I didn't define any data sections at all as far as I know, and since the definitions of the bss sections are equal they should have the same flags, right?

What am I missing here? Is this something from kernel32.lib, is it bad, and (what) do I need to avoid it?

_________________
Roses are red
Violets are blue
Some poems rhyme
And some don't.
Post 10 Nov 2006, 16:49
View user's profile Send private message Reply with quote
Goplat



Joined: 15 Sep 2006
Posts: 181
Goplat
looks like one of the files is missing flag 0x80 (IMAGE_SCN_CNT_UNINITIALIZED_DATA), you might have put initialized data (like "dd 0" instead of "dd ?") in its .bss.
Post 10 Nov 2006, 18:50
View user's profile Send private message Reply with quote
asmfan



Joined: 11 Aug 2006
Posts: 392
Location: Russian
asmfan
don't discribe bss section as data - it means initialized, just writable readable
Post 10 Nov 2006, 21:35
View user's profile Send private message Reply with quote
Plue



Joined: 15 Dec 2005
Posts: 151
Plue
Goplat wrote:
looks like one of the files is missing flag 0x80 (IMAGE_SCN_CNT_UNINITIALIZED_DATA), you might have put initialized data (like "dd 0" instead of "dd ?") in its .bss.
Awwwww can you say blunder? Thank you, that's got to be it. I remember I switched the code generation (this is a compiler) to uninitialized data, but I forgot to change dd into rd.

asmfan wrote:
don't discribe bss section as data - it means initialized, just writable readable
I'll do that as well, is it how it initially was (before I encountered the problem), but I changed it to see if it had any effect.

_________________
Roses are red
Violets are blue
Some poems rhyme
And some don't.
Post 10 Nov 2006, 22:55
View user's profile Send private message Reply with quote
Plue



Joined: 15 Dec 2005
Posts: 151
Plue
I removed the data description, now polink says that section .bss is missing contents flag, assuming data.
Also, it turned out that I hadn't forgotten to change dd 0 into rd 1.
The link can't be completed because polink says "POLINK: fatal error: Internal error: bss sequence."
Post 11 Nov 2006, 17:55
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 YouTube, Twitter.

Website powered by rwasa.