aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2005-07-04 13:54:36 +0000
committerNick Clifton <nickc@redhat.com>2005-07-04 13:54:36 +0000
commit80447b21a99357ba65e0ae4558b17bae94b4e572 (patch)
tree328f1bb68e66e41d61c16c48b5766370bf8641e8
parentdf80278b799985481340cc3fefba4ba5737a7cf2 (diff)
downloadgdb-80447b21a99357ba65e0ae4558b17bae94b4e572.zip
gdb-80447b21a99357ba65e0ae4558b17bae94b4e572.tar.gz
gdb-80447b21a99357ba65e0ae4558b17bae94b4e572.tar.bz2
m32r-linux-ld support for position independent executables
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf32-m32r.c4
-rw-r--r--ld/ChangeLog4
-rw-r--r--ld/emulparams/m32relf_linux.sh1
4 files changed, 12 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 87d7ee4..91d214f 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2005-07-04 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
+
+ * elf32-m32r.c (m32r_elf_size_dynamic_sections): Use
+ info->executable instead of !info->shared where appropriate.
+
2005-07-04 Alan Modra <amodra@bigpond.net.au>
PR 1042
diff --git a/bfd/elf32-m32r.c b/bfd/elf32-m32r.c
index f798088..6972ad3 100644
--- a/bfd/elf32-m32r.c
+++ b/bfd/elf32-m32r.c
@@ -2178,7 +2178,7 @@ m32r_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
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);
@@ -2317,7 +2317,7 @@ m32r_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
#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;
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 9f6122c..e94511a 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,7 @@
+2005-07-04 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
+
+ * emulparams/m32relf_linux.sh (GENERATE_PIE_SCRIPT): Set to yes.
+
2005-07-04 Aurelien Jarno <aurel32@debian.org>
* emultempl/elf32.em: Enable use of ld.so.conf for *-*-k*bsd-*.
diff --git a/ld/emulparams/m32relf_linux.sh b/ld/emulparams/m32relf_linux.sh
index 814c91a..be2ad23 100644
--- a/ld/emulparams/m32relf_linux.sh
+++ b/ld/emulparams/m32relf_linux.sh
@@ -11,3 +11,4 @@ MAXPAGESIZE=0x1000
# top of simulator memory (32MB).
OTHER_RELOCATING_SECTIONS='PROVIDE (_stack = 0x2000000);'
GENERATE_SHLIB_SCRIPT=yes
+GENERATE_PIE_SCRIPT=yes