sizeof() in assembler
Jakub Jelinek
jakub@redhat.com
Wed Sep 1 07:41:00 GMT 2004
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
More information about the Binutils
mailing list