News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Allocating space in bss using GAS

Started by drhowarddrfine, November 09, 2006, 03:59:39 PM

Previous topic - Next topic

drhowarddrfine

I don't know why I'm struggling with this but I'm trying to create a 32 byte space, called 'environ', in the .bss section using GAS on FreeBSD, which should be the same in Linux.  I thought the way to do this would be:

environ: .long 32

or,

environ: .long .+32

But no matter what I try, I only get one long word.  I guess I'm rushing through the binutils docs too fast but I know some of you are tinkering with GAS so hope you can help.

Vortex

Hi Howard,

Can you try this one?

environ: .space 32, 0

drhowarddrfine

That did it. Thanks.
Is .long only for a single long word while .space is for many bytes?

Vortex

Quote from: drhowarddrfine on November 09, 2006, 11:41:07 PM
That did it. Thanks.
Is .long only for a single long word while .space is for many bytes?

Hi Howard,

As I know, .long is only for a single long word.