This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Regrading the .data.rel.local section size on x86-64.


On Mär 20 2017, Umesh Kalappa <umesh.kalappa0@gmail.com> wrote:

> Here is the asm sample like
>
> .file   "test.c"
>     .text
> .Ltext0:
>     .section    .data.rel.local.qslab_reg_names,"aw",@progbits
>     .align 32
>     .type   qslab_reg_names, @object
>     .size   qslab_reg_names, 128
> qslab_reg_names:
>     .section    .rodata
> .LC0:
>     .string "FPGALIB_GPIO_ID_QSLAB_LOS"
>     .quad   .LC0+16
>     .long   736
>     .zero   4
> .LC1:
>     .string "FPGALIB_GPIO_ID_QSLAB_LOL0"
>     .quad   .LC1+16
>     .long   737
>     .zero   4
> .LC2:
>     .string "FPGALIB_GPIO_ID_QSLAB_LOL1"
>     .quad   .LC2+16
>     .long   738
>     .zero   4
> .LC3:
>     .string "FPGALIB_GPIO_ID_QSLAB_LOL2"
>     .quad   .LC3+16
>     .long   739
>
> the .data.rel.local.qslab_reg_names section size ,is 128 bytes ,where
> the qslab_reg_names is the only object in the secttion.

The .size directive does not modify the size of the section, it only
sets the size attribute of the symbol.  Since the section has no
contents, it remains empty.  If you want to fill it with zeroes, use the
.zero directive.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]