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]

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


Hi All,

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.

then we assemble the sample then examine the section details like

$ objdump -x test.o | more

test.o:     file format elf64-x86-64
test.o
architecture: i386:x86-64, flags 0x00000011:
HAS_RELOC, HAS_SYMS
start address 0x0000000000000000

Sections:
Idx Name          Size      VMA               LMA               File off  Algn
  0 .text         00000000  0000000000000000  0000000000000000  00000040  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  1 .data         00000000  0000000000000000  0000000000000000  00000040  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  2 .bss          00000000  0000000000000000  0000000000000000  00000040  2**2
                  ALLOC
  3 .data.rel.local.qslab_reg_names 00000000  0000000000000000
0000000000000000  00000040  2**5
                  CONTENTS, ALLOC, LOAD, DATA
  4 .rodata       0000013e  0000000000000000  0000000000000000  00000040  2**0
                  CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA
  5 .text.bar     0000000d  0000000000000000  0000000000000000  0000017e  2**0
                  CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
  6 .debug_info   0000010f  0000000000000000  0000000000000000  0000018b  2**0


we can make a note that , the section .data.rel.local.qslab_reg_names
size is zero  from objdump ???

Any inputs here ,will be appreciated .


Thank you
~Umesh


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