flat assembler
Message board for the users of flat assembler.
  
|  Index
      > Windows > multiple .asm gives multiple sections | 
| Author | 
 | 
| edfed 07 Aug 2019, 13:01 to achieve this, don't declare sections for each included file, but only beofre the first include. | |||
|  07 Aug 2019, 13:01 | 
 | 
| revolution 07 Aug 2019, 13:13 There are three options I can think of.
 1) Rewrite your code to manually merge all the sections together in the source. 2) Output a linkable format and use the linker to merge the sections. 3) Use macros to build and extend lists for each section. | |||
|  07 Aug 2019, 13:13 | 
 | 
| ProMiNick 07 Aug 2019, 16:02 Thou not needed to split code & data in subincludes at all.
 do section splitting in main file only. Nothing terrible if dota & code would be intermixed. And even if thour file would be presented by one single section there is nothing terrible - thou could intermix everithing there. But if thou going to place there resources too thou should name section as .rsrc and start it from resource header - after thou could intermix within it imports exports data & code or whatever. So classification of bytes sequences on data and code is very abstract. Thou are free to play in that abstraction or ignore it. | |||
|  07 Aug 2019, 16:02 | 
 | 
| DimonSoft 07 Aug 2019, 16:53 ProMiNick wrote: Nothing terrible if dota & code would be intermixed. Actually, this one is not a good idea unless one already has to have them intemixed (sizecoding?). | |||
|  07 Aug 2019, 16:53 | 
 | 
| SokilOff 08 Aug 2019, 21:12 int0x50 wrote: I am writing a project with multiple ASM files. In the main .asm file I have included all the other .asm files. I have compiled it and it works fine. But, since I have created .data and .text sections in each .asm, I have multiple sections in the PE file as well. Is this recommended? Long ago I had the same question. And, as revolution already said, macro is probably the best way to keep all code and data parts in the appropriate sections. You can take a look here. | |||
|  08 Aug 2019, 21:12 | 
 | 
| < Last Thread | Next Thread > | 
| Forum Rules: 
 | 
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.