bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/3015] -z relro may create PT_NULL segment


From: hjl at lucon dot org
Subject: [Bug ld/3015] -z relro may create PT_NULL segment
Date: 14 Aug 2006 23:20:42 -0000

------- Additional Comments From hjl at lucon dot org  2006-08-14 23:20 -------
A testcase to show that -z relro may create PT_NULL segment:

address@hidden tmp]$ cat x.s
        .globl main
        .globl start
        .globl _start
        .globl __start
        .text
main:
start:
_start:
__start:
        .long   0
address@hidden tmp]$ gcc -c x.s
address@hidden tmp]$ ld  -z relro x.o
address@hidden tmp]$ readelf -l a.out

Elf file type is EXEC (Executable file)
Entry point 0x4000b0
There are 2 program headers, starting at offset 64

Program Headers:
  Type           Offset             VirtAddr           PhysAddr
                 FileSiz            MemSiz              Flags  Align
  LOAD           0x0000000000000000 0x0000000000400000 0x0000000000400000
                 0x00000000000000b4 0x00000000000000b4  R E    200000
  NULL           0x0000000000000000 0x0000000000000000 0x0000000000000000
                 0x0000000000000000 0x0000000000000000         0

 Section to Segment mapping:
  Segment Sections...
   00     .text
   01



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hjl at lucon dot org
            Summary|-z relro by default causes  |-z relro may create PT_NULL
                   |testsuite failures          |segment


http://sourceware.org/bugzilla/show_bug.cgi?id=3015

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




reply via email to

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