I've created a dll and it has the following sections (I have manually created the .bss section):

.text
.data
.bss
.rdata
.reloc

Can I safely merge some of them?
Posted on 2003-12-20 13:51:03 by Delight
You can merge most sections, but keep resources in a section of it's own. I generally wouldn't merge readonly sections with r/w sections, and generally I don't bother to merge sections at all.
Posted on 2003-12-20 18:13:13 by f0dder
The .reloc section is required. Generally you can merge the other sections.
Posted on 2003-12-20 21:27:38 by Poimander
Hm, do relocations really need to be in their own section? I thought they could be merged, too. And they aren't really *critical*, though I would advice against removing them :)
Posted on 2003-12-20 21:34:56 by f0dder
I can't remember the refernce but apparently the loader requires it for a DLL.
Posted on 2003-12-20 21:40:31 by Poimander
I guess I should play around... you _can_ skip .reloc if you are sure not to cause any address space clashes... but it's a silly 'optimization' and is bound to get you into trouble. (It's still good running rebase on your DLLs to avoid address space clashes even if you do have relocs in your images, since the reloc stage can then be skipped).
Posted on 2003-12-20 21:43:10 by f0dder