This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: Update "-z relro" tests to include .data.rel.ro section


This patch adds a .data.rel.ro section to "-z relro" tests so that it
will pass on Linux/MIPS. But I am not sure how useful "-z relro" is
on Linux/MIPS since it only applies to .data.rel.ro sections.


H.J.
---
2006-09-15  H.J. Lu  <hongjiu.lu@intel.com>

	* ld-elf/binutils.exp: Update "-z relro" tests to use relro.s.

	* ld-elf/relro.s: New file.

--- ld/testsuite/ld-elf/binutils.exp.relro	2006-08-17 08:44:56.000000000 -0700
+++ ld/testsuite/ld-elf/binutils.exp	2006-09-15 08:59:21.000000000 -0700
@@ -101,10 +101,10 @@ binutils_test strip "-shared" maxpage1
 binutils_test objcopy "" maxpage1
 binutils_test objcopy "-shared" maxpage1
 
-binutils_test strip "-z relro" maxpage1
-binutils_test strip "-z relro -shared" maxpage1
-binutils_test objcopy "-z relro" maxpage1
-binutils_test objcopy "-z relro -shared" maxpage1
+binutils_test strip "-z relro" relro
+binutils_test strip "-z relro -shared" relro
+binutils_test objcopy "-z relro" relro
+binutils_test objcopy "-z relro -shared" relro
 
 binutils_test objcopy "" tbss1
 binutils_test objcopy "-shared" tbss1
--- ld/testsuite/ld-elf/relro.s.relro	2006-09-15 09:03:12.000000000 -0700
+++ ld/testsuite/ld-elf/relro.s	2006-09-15 09:00:47.000000000 -0700
@@ -0,0 +1,14 @@
+	.globl main
+	.globl start
+	.globl _start
+	.globl __start
+	.text
+main:
+start:
+_start:
+__start:
+	.long	0
+	.data
+	.long	0
+	.section .data.rel.ro,"aw",%progbits
+	.long	0


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]