Author Topic: Defining SECTIONS to works with gcc  (Read 10138 times)

nobody

  • Guest
Defining SECTIONS to works with gcc
« on: January 02, 2005, 03:47:46 AM »
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

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: Defining SECTIONS to works with gcc
« Reply #1 on: January 23, 2005, 05:05:27 AM »
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