flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > COMDAT in MS COFF / auxiliary symbols

Thread Post new topic Reply to topic

Joined: 26 May 2017
Posts: 1
xi 26 May 2017, 22:42
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:

fatal error LNK1162: expected 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

Joined: 16 Jun 2003
Posts: 8346
Location: Kraków, Poland
Tomasz Grysztar 26 May 2017, 23:18
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

Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.