flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > MS COFF uninitialized data

Author
Thread Post new topic Reply to topic
bitRAKE



Joined: 21 Jul 2003
Posts: 4175
Location: vpcmpistri
bitRAKE 31 Oct 2007, 16:22
...appears to be broken. I've tried different linkers (MS Link, PoLink). MS Link indicates there are references past the end of the object file. PoLink warns of conflicting flags, and doesn't include the .bss segment in the output EXE. (or, it crashes).

When I manually merge the .bss and .data segments - no errors at all.
So, I must have created initial data in .bss segment? NO:
Code:
      rb 8
State:      rb SBYTES    
does not have any initial data. Nor do other object files. Yet, the segments are tagged differently within the object files.

I haven't tried re-ordering the segments - should that matter?

Is anyone using MS COFF in their projects?
Post 31 Oct 2007, 16:22
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 31 Oct 2007, 16:49
When you are reporting bug, please post FULL source. Otherwise, we can't reproduce the problem.

Quote:
Is anyone using MS COFF in their projects?

Me, no problem sofar
Post 31 Oct 2007, 16:49
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 4175
Location: vpcmpistri
bitRAKE 31 Oct 2007, 17:39
vid wrote:
When you are reporting bug, please post FULL source. Otherwise, we can't reproduce the problem.
I will work to refine the source demonstraighting the problem and post here. Also, will do the same for the OBJ that crashes PoLink.
Post 31 Oct 2007, 17:39
View user's profile Send private message Visit poster's website Reply with quote
asmfan



Joined: 11 Aug 2006
Posts: 392
Location: Russian
asmfan 31 Oct 2007, 18:16
I forsee the problem is in DATA flag on uninitialized data section.
Post 31 Oct 2007, 18:16
View user's profile Send private message Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 4175
Location: vpcmpistri
bitRAKE 31 Oct 2007, 19:03
Here is simple project producing bad exe from polink and only error from mslink. I've included output from builds, but would only have to add paths to batch file to rebuild. (There is an error in MSCOFF.asm, but it isn't the crash of error - just forgot to correct stack after wsprintf.)


Description: MS COFF Errors
Download
Filename: MSCOFF.rar
Filesize: 3.44 KB
Downloaded: 631 Time(s)

Post 31 Oct 2007, 19:03
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 31 Oct 2007, 22:38
asmfan: you was right Wink
Post 31 Oct 2007, 22:38
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 4175
Location: vpcmpistri
bitRAKE 01 Nov 2007, 01:59
I've found where FASM sets the high bit on the section flags byte, and tracing it back to maybe find out why some are not set correctly.
Post 01 Nov 2007, 01:59
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 01 Nov 2007, 02:18
bitRAKE: asmfan already found the problem: you used "data" flag on BSS section. Do you suggest "data" should be used on BSS?
Post 01 Nov 2007, 02:18
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 4175
Location: vpcmpistri
bitRAKE 01 Nov 2007, 03:57
Okay, the syntax error wasn't clear and the COFF example doesn't have a BSS section nor isit explained in the manual. Thanks (...I'm a little dense on the rebound.)
Post 01 Nov 2007, 03:57
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.