[fpc-devel] Offset and size of .note.GNU-stack section in object files

Joost van der Sluis joost at cnoc.nl
Wed Jan 12 13:12:00 CET 2011


Hi all,

When working on bug 16545, I needed some reference so I did a 'readelf
-S' on a random .o file created by fpc.

I saw that the offset of the section behind the .note.GNU-stack section
has it's offset increased by one in comparison to the offset of
the .note.GNU-stack section. But the length of this section is 0, so
there shouldn't be an increase in the offset?

Am I right, or do I miss something?

The readelf-output of avl-tree.o, note the offsets of 00004ad7 and
00004ad8:

There are 12 section headers, starting at offset 0x6650:

Section Headers:
  [Nr] Name              Type             Address           Offset
       Size              EntSize          Flags  Link  Info  Align
  [ 0]                   NULL             0000000000000000  00000000
       0000000000000000  0000000000000000           0     0     0
  [ 1] .text             PROGBITS         0000000000000000  00000040
       00000000000023a0  0000000000000000  AX       0     0     16
  [ 2] .data             PROGBITS         0000000000000000  000023e0
       0000000000000000  0000000000000000  WA       0     0     16
  [ 3] .bss              NOBITS           0000000000000000  000023e0
       0000000000000008  0000000000000000  WA       0     0     16
  [ 4] .data.rel         PROGBITS         0000000000000000  000023e0
       00000000000006c0  0000000000000000  WA       0     0     16
  [ 5] .debug_frame      PROGBITS         0000000000000000  00002aa0
       0000000000000000  0000000000000000           0     0     8
  [ 6] .symtab           SYMTAB           0000000000000000  00002aa0
       0000000000000d68  0000000000000018           7    11     4
  [ 7] .strtab           STRTAB           0000000000000000  00003808
       0000000000001262  0000000000000000           0     0     1
  [ 8] .shstrtab         STRTAB           0000000000000000  00004a6a
       000000000000006d  0000000000000000           0     0     1
  [ 9] .note.GNU-stack   PROGBITS         0000000000000000  00004ad7
       0000000000000000  0000000000000000           0     0     1
  [10] .rela.text        RELA             0000000000000000  00004ad8
       0000000000001308  0000000000000018           6     1     4
  [11] .rela.data.rel    RELA             0000000000000000  00005de0
       0000000000000870  0000000000000018           6     4     4
Key to Flags:
  W (write), A (alloc), X (execute), M (merge), S (strings)
  I (info), L (link order), G (group), x (unknown)
  O (extra OS processing required) o (OS specific), p (processor
specific)


 

 




More information about the fpc-devel mailing list