This is the mail archive of the binutils@sources.redhat.com 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] m32r-linux-ld support for position independent executables


Hi Nick,

Thease patches are to support pie.
Please commit it into 2.16-branch and mainline.

Regards,

Kazuhiro Inaoka

bfd/ChangeLog

2005-06-23 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>

	* elf32-m32r.c (m32r_elf_size_dynamic_sections): Use info->executable
	instead of !info->shared where appropriate.

ld/ChangeLog

2005-06-23 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>

* emulparams/m32relf_linux.sh (GENERATE_PIE_SCRIPT): Set to yes.
Index: elf32-m32r.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-m32r.c,v
retrieving revision 1.57
diff -u -r1.57 elf32-m32r.c
--- elf32-m32r.c	11 Feb 2005 17:18:41 -0000	1.57
+++ elf32-m32r.c	22 Jun 2005 05:39:16 -0000
@@ -2331,7 +2331,7 @@
   if (htab->root.dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (! info->shared)
+      if (info->executable)
 	{
 	  s = bfd_get_section_by_name (dynobj, ".interp");
 	  BFD_ASSERT (s != NULL);
@@ -2472,7 +2472,7 @@
 #define add_dynamic_entry(TAG, VAL) \
   _bfd_elf_add_dynamic_entry (info, TAG, VAL)
 
-      if (! info->shared)
+      if (info->executable)
 	{
 	  if (! add_dynamic_entry (DT_DEBUG, 0))
 	    return FALSE;
Index: m32relf_linux.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/m32relf_linux.sh,v
retrieving revision 1.1
diff -u -r1.1 m32relf_linux.sh
--- m32relf_linux.sh	19 Dec 2003 11:44:00 -0000	1.1
+++ m32relf_linux.sh	22 Jun 2005 05:40:08 -0000
@@ -11,3 +11,4 @@
 # top of simulator memory (32MB).
 OTHER_RELOCATING_SECTIONS='PROVIDE (_stack = 0x2000000);'
 GENERATE_SHLIB_SCRIPT=yes
+GENERATE_PIE_SCRIPT=yes

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