|
From: Frank K. <fbk...@co...> - 2004-04-18 23:17:47
|
Alexei A. Frounze wrote: > You never get that message most probably because you do 32-bit coding and > because of that you don't specify additional attributes such as "PUBLIC > CLASS=CODE USE16". > > If you take the original file int86xa.asm I sent to nasmdevel and move STRUC > declarations after SEGMENT declaration, you'll have this message too at > compile time. Hi Alexei, The way to get rid of that message is, paradoxically, to declare segments twice: segment .text use32 public class-code segment .text Then the "__SECT__" macro, used by "struc" (but not "xstruc"???) will be just ".text" without the attributes, and Nasm will quit its whining. The message is annoying, but actually does no harm (unless you actually *intended* to change attributes, which won't work in any case). There was some discussion, at some point, of stripping the attributes from the "__SECT__" macro to get rid of the annoyance... nothing was done... I think Ifconfig has the problem, and its solution, nailed - Nasm starts out in a default section - usually ".text" - and if there's *anything* before you declare another section - code, data, even just a label - Nasm creates the section. In the case of "-f obj" (or -f bin), it's a 16-bit section, too, which pisses off the 32-bit linker if that's what you're doing. In 16-bit code you just get an extra, unintended, section. The warning about "redeclaration of attributes ignored" can be safely ignored. Best, Frank |