flat assembler
Message board for the users of flat assembler.
 Home   FAQ   Search   Register 
 Profile   Log in to check your private messages   Log in 
flat assembler > Compiler Internals > COMDAT in MS COFF / auxiliary symbols

Author
Thread Post new topic Reply to topic
xi



Joined: 26 May 2017
Posts: 1
COMDAT in MS COFF / auxiliary symbols
Hello. I remember that it was discussed here one time, but I want to ask this question one time more. So, is there a possibility to generate COMDAT sections in fasm source?

I have for example one asm file with many functions inside it; it is compiled as COFF and linked with VS2017 project. The problem is that I want Visual Studio to remove all unused functions.

I tried to put each function into separate section called .text$xyz (each section with it's own different name). Then I added COMDAT attribute to each function using hex editor. And VS failed to build that with following error:


Code:
fatal error LNK1162expected aux symbol for COMDAT section 0x1



So, I am missing auxiliary symbols I guess. How to force FASM generate these symbols and have real COMDATs? Maybe I have to use third-party software, I will be happy to know which software I should use.
Post 26 May 2017, 22:42
View user's profile Send private message Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 6605
Location: Kraków, Poland
The macros that implement MS COFF format for fasmg (they are in the fasmg package in "examples/x86/include/format/coffms.inc" file) would be the right place to work on such extensions. In fasm 1 it might not be easily attainable.
Post 26 May 2017, 23:18
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


Powered by phpBB © 2001-2005 phpBB Group.

Main index   Download   Documentation   Examples   Message board
Copyright © 2004-2016, Tomasz Grysztar.