NASM Forum > Programming with NASM

Defining SECTIONS to works with gcc

(1/1)

nobody:
how i made to define a SECTION like this...

SEGMENT .text PUBLIC USE32 PARA

this segment/section are declared by gcc, if in my nasm module define:

SEGMENT .text PUBLIC USE32 PARA

this section appears in the map file:

SEGMENT text PUBLIC USE32 BYTE ''

not .text and not PARA    why???


Thanks

Frank Kotler:
I know almost nothing about this. I believe it's "normal" for Nasm to strip the "." from ".text" or other section names, and just pass "text" on to the linker. Is this causing a problem?

I have no idea why your alignment is being changed. Possibly the only alignment allowed by that output format? Normally, "gcc" would imply Linux, or other *nix-ish OS - "-f elf" - but gcc could also be used with djgpp - "-f coff" - or with mingw/cygwin - "-f win32". I doubt if it will help *me* to know which, but it might help others help you...

My only suggestion is "RTFM" - both the Nasm manual, and that of whichever gcc you're using. There may be a clue in there somewhere. If you figure anything out, please post!!!

Best,
Frank

Navigation

[0] Message Index

Go to full version