[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/3015] New: -z relro by default causes testsuite failures
From: |
meissner at suse dot de |
Subject: |
[Bug ld/3015] New: -z relro by default causes testsuite failures |
Date: |
9 Aug 2006 06:11:46 -0000 |
I enabled -z relro by default (link_info.relro = TRUE; in ldmain.c)
This causes some of the testcases in ld to fail:
FAIL: strip -z max-page-size=0x200000 (maxpage1)
FAIL: strip -z max-page-size=0x200000 -z common-page-size=0x100000 (maxpage1)
FAIL: strip -z max-page-size=0x100000 (maxpage1)
FAIL: strip -z max-page-size=0x100000 -z common-page-size=0x1000 (maxpage1)
FAIL: strip (maxpage1)
FAIL: objcopy (maxpage1)
FAIL: objcopy (tbss1)
FAIL: objcopy -shared (tbss1)
FAIL: objcopy -z max-page-size=0x100000 (tbss1)
FAIL: objcopy -z max-page-size=0x100000 -z common-page-size=0x1000 (tbss1)
FAIL: objcopy (tdata1)
FAIL: objcopy -shared (tdata1)
FAIL: objcopy -z max-page-size=0x100000 (tdata1)
FAIL: objcopy -z max-page-size=0x100000 -z common-page-size=0x1000 (tdata1)
FAIL: objcopy (tbss2)
FAIL: objcopy -z max-page-size=0x100000 (tbss2)
FAIL: objcopy -z max-page-size=0x100000 -z common-page-size=0x1000 (tbss2)
FAIL: objcopy -z max-page-size=0x100000 (tdata2)
FAIL: objcopy (tdata2)
FAIL: objcopy -shared (tdata2)
FAIL: objcopy -z max-page-size=0x100000 -z common-page-size=0x1000 (tdata2)
The problem with those testcase it, that ld generates
a PT_NULL section which is discard by strip and objcopy:
--- tmpdir/maxpage1.exp 2006-08-09 06:10:42.000000000 +0000
+++ tmpdir/maxpage1.out 2006-08-09 06:10:42.000000000 +0000
@@ -1,16 +1,14 @@
Elf file type is EXEC (Executable file)
Entry point 0x10000094
-There are 3 program headers, starting at offset 52
+There are 2 program headers, starting at offset 52
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
LOAD 0x000000 0x10000000 0x10000000 0x00098 0x00098 R E 0x10000
LOAD 0x001000 0x10011000 0x10011000 0x00004 0x00004 RW 0x10000
- NULL 0x000000 0x00000000 0x00000000 0x00000 0x00000 0
Section to Segment mapping:
Segment Sections...
00 .text
01 .data
- 02
The PT_NULL section is generated by
assign_file_positions_for_non_load_sections().
ld should probably not emit PT_NULL sections.
--
Summary: -z relro by default causes testsuite failures
Product: binutils
Version: 2.17
Status: NEW
Severity: normal
Priority: P2
Component: ld
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: meissner at suse dot de
CC: bug-binutils at gnu dot org
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.
- [Bug ld/3015] New: -z relro by default causes testsuite failures,
meissner at suse dot de <=
- [Bug ld/3015] -z relro by default causes testsuite failures, hjl at lucon dot org, 2006/08/10
- [Bug ld/3015] -z relro may create PT_NULL segment, hjl at lucon dot org, 2006/08/14
- [Bug ld/3015] -z relro may create PT_NULL segment, hjl at lucon dot org, 2006/08/14
- [Bug ld/3015] -z relro may create PT_NULL segment, hjl at lucon dot org, 2006/08/15
- [Bug ld/3015] -z relro may create PT_NULL segment, hjl at lucon dot org, 2006/08/16
- [Bug ld/3015] -z relro may create PT_NULL segment, hjl at lucon dot org, 2006/08/16
- [Bug ld/3015] -z relro may create PT_NULL segment, hjl at lucon dot org, 2006/08/31