bug-binutils
[Top][All Lists]
Advanced

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

[Bug admin/22393] New: Add read-only segment


From: hjl.tools at gmail dot com
Subject: [Bug admin/22393] New: Add read-only segment
Date: Fri, 03 Nov 2017 23:19:28 +0000

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

            Bug ID: 22393
           Summary: Add read-only segment
           Product: binutils
           Version: 2.30 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: admin
          Assignee: unassigned at sourceware dot org
          Reporter: hjl.tools at gmail dot com
  Target Milestone: ---

We currently put read-only sections in read-execute segment:

address@hidden gcc]$ readelf -lW /bin/ls

Elf file type is DYN (Shared object file)
Entry point 0x51c0
There are 9 program headers, starting at offset 64

Program Headers:
  Type           Offset   VirtAddr           PhysAddr           FileSiz  MemSiz
  Flg Align
  PHDR           0x000040 0x0000000000000040 0x0000000000000040 0x0001f8
0x0001f8 R E 0x8
  INTERP         0x000238 0x0000000000000238 0x0000000000000238 0x00001c
0x00001c R   0x1
      [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
  LOAD           0x000000 0x0000000000000000 0x0000000000000000 0x01d84c
0x01d84c R E 0x200000
  LOAD           0x01dfd0 0x000000000021dfd0 0x000000000021dfd0 0x001278
0x002418 RW  0x200000
  DYNAMIC        0x01ea18 0x000000000021ea18 0x000000000021ea18 0x0001e0
0x0001e0 RW  0x8
  NOTE           0x000254 0x0000000000000254 0x0000000000000254 0x000044
0x000044 R   0x4
  GNU_EH_FRAME   0x01a1f4 0x000000000001a1f4 0x000000000001a1f4 0x000824
0x000824 R   0x4
  GNU_STACK      0x000000 0x0000000000000000 0x0000000000000000 0x000000
0x000000 RW  0x10
  GNU_RELRO      0x01dfd0 0x000000000021dfd0 0x000000000021dfd0 0x001030
0x001030 R   0x1

 Section to Segment mapping:
  Segment Sections...
   00     
   01     .interp 
   02     .interp .note.ABI-tag .note.gnu.build-id .gnu.hash .dynsym .dynstr
.gnu.version .gnu.version_r .rela.dyn .init .plt .plt.got .text .fini .rodata
.eh_frame_hdr .eh_frame 
   03     .init_array .fini_array .data.rel.ro .dynamic .got .data .bss 
   04     .dynamic 
   05     .note.ABI-tag .note.gnu.build-id 
   06     .eh_frame_hdr 
   07     
   08     .init_array .fini_array .data.rel.ro .dynamic .got 
address@hidden gcc]$ 

I'd like to add a read-only segment for read-only sections to prevent
executing data in read-only sections as instructions.

-- 
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]