NASM Forum > Programming with NASM
segment attributes specified on redeclaration
(1/1)
mene mene tekel:
Hi,
I compose my final asm file using some include files, some of them define segments like
segment .data data public use32 align=1 class=DATA
This way the composed file contains multiple statements like this and the compiler correctly say:
warning: segment attributes specified on redeclaration of segment: ignoring
I don't like these warnings looking for a solution without creating a lot of stupid segment names and then finally group them into a segment group.
Any idea for that?
Thanks
Martin
Frank Kotler:
Hi Martin,
I thought that was fixed... guess not...
The attributes in a section declaration are "sticky". If you can arrange for Nasm to *first* see "section .data some attributes", subsequent "section .data"s will have the same attributes, without any whining from Nasm. That's how I deal with it. The only "trick" is that the declaration with the attributes has to come first! Dunno if that will help you any...
Best,
Frank
maybe:
%ifdef GOT_SECTION_ATTRIBUTES
section .data
%elif
section .data use32 ; etc...
%define GOT_SECTION_ATTRIBUTES
%endif
???
mene mene tekel:
Yess, it works!
Many thanks,
Martin
Navigation
[0] Message Index
Go to full version