The MASM Forum Archive 2004 to 2012

General Forums => The Laboratory => Topic started by: drhowarddrfine on November 09, 2006, 03:59:39 PM

Title: Allocating space in bss using GAS
Post by: drhowarddrfine on November 09, 2006, 03:59:39 PM
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.
Title: Re: Allocating space in bss using GAS
Post by: Vortex on November 09, 2006, 06:41:20 PM
Hi Howard,

Can you try this one?

environ: .space 32, 0
Title: Re: Allocating space in bss using GAS
Post by: 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?
Title: Re: Allocating space in bss using GAS
Post by: Vortex on November 10, 2006, 07:38:28 AM
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.