This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: sizeof() in assembler
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Massimiliano Cialdi <cialdi at firenze dot net>
- Cc: binutils ML <binutils at sources dot redhat dot com>
- Date: Wed, 1 Sep 2004 07:23:50 +0200
- Subject: Re: sizeof() in assembler
- References: <20040901092826.00002a28.cialdi@firenze.net>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Sep 01, 2004 at 09:28:26AM +0200, Massimiliano Cialdi wrote:
> I can define the size of an object:
>
> .section .rodata
> .align 1
> str:
> .ascii "+++***+++\r\n"
> .size str, .-str
>
>
> there exist something like sizeof(str) to retrive the size of object
> str?
No.
But you can always use
str:
.ascii "+++***+++\r\n"
sizeof_str = .-str
.size str, sizeof_str
Jakub