bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/17773] Gap between sections and section headers when ld -s is us


From: michael at talosis dot ca
Subject: [Bug ld/17773] Gap between sections and section headers when ld -s is used
Date: Tue, 30 Dec 2014 17:35:09 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=17773

--- Comment #2 from Michael Deutschmann <michael at talosis dot ca> ---
Just the two-line assembler file:

.global _start
_start: hlt

suffices to demonstrate the behavior.

If this is assembled (with as directly, no options besides -o) and linked
(directly, just -s and -o) on 2.25, the resulting file gives the following
under readelf -S:

There are 3 section headers, starting at offset 0x6c:

Section Headers:
  [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf
Al
  [ 0]                   NULL            00000000 000000 000000 00      0   0 
0
  [ 1] .text             PROGBITS        08048054 000054 000001 00  AX  0   0 
1
  [ 2] .shstrtab         STRTAB          00000000 000055 000011 00      0   0 
1

The last section ends just before 0x66 (0x55 + 0x11).  With alignment, that
should place the section header table at 0x68.  But it's actually at 0x6c.

-- 
You are receiving this mail because:
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]