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

--- Comment #1 from Stas Sergeev <stsp at users dot sourceforge.net> ---
The attached test file is needed to
reproduce the problem:

$ readelf -l tmp.elf
 Section to Segment mapping:
  Segment Sections...
   00     .note.gnu.property 
   01     .text 
   02     .bss 
   03     .note.gnu.property 
   04     .note.gnu.property 
   05     

$ strip --strip-debug -R '.note.*' tmp.elf
$  Section to Segment mapping:
  Segment Sections...
   00     
   01     .text 
   02     .bss 
   03     
   04     
   05     

(I have omitted some parts of readelf
output for brevity).
Now we see that the segment 0, which
was previously covering .note sections,
is unmapped, but still has non-zero size.
Segments 3, 4 and 5 are also not removed,
but they are not PT_LOAD, and have zero
size, so do not harm. But segment 0 should
be removed IMO.

Also I wonder why the segment that contains
.note sections is PT_LOAD? Is this really
needed? I have my own elf loader, and it
gets confused by this all.

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

Reply via email to