From: Bob Wilson Date: Tue, 10 Oct 2006 20:57:37 +0000 (+0000) Subject: bfd/ X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ba05963f0d3fa4bd091114878205d5cf0fc983df;p=binutils-gdb.git bfd/ * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Add DT_DEBUG for PIE executables. ld/ * emulparams/elf32xtensa.sh (GENERATE_PIE_SCRIPT): Enable. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index dfd47f650ed..2959a491838 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2006-10-10 Bob Wilson + + * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Add DT_DEBUG + for PIE executables. + 2006-10-03 Jakub Jelinek * elf-bfd.h (struct eh_cie_fde): Add set_loc pointer. diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c index d8b9d1ecf00..c93f84d8c76 100644 --- a/bfd/elf32-xtensa.c +++ b/bfd/elf32-xtensa.c @@ -1123,8 +1123,7 @@ add_extra_plt_sections (bfd *dynobj, int count) sname = (char *) bfd_malloc (10); sprintf (sname, ".plt.%u", chunk); - s = bfd_make_section_with_flags (dynobj, sname, - flags | SEC_CODE); + s = bfd_make_section_with_flags (dynobj, sname, flags | SEC_CODE); if (s == NULL || ! bfd_set_section_alignment (dynobj, s, 2)) return FALSE; @@ -1471,7 +1470,7 @@ elf_xtensa_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 cdae47b65db..3d6d4a66c9a 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,7 @@ +2006-10-10 Bob Wilson + + * emulparams/elf32xtensa.sh (GENERATE_PIE_SCRIPT): Enable. + 2006-10-06 Mike Frysinger * genscripts.sh: Respect LIBPATH_SUFFIX when not using sysroot. diff --git a/ld/emulparams/elf32xtensa.sh b/ld/emulparams/elf32xtensa.sh index 01eed3acfbc..8cc8f0d2193 100644 --- a/ld/emulparams/elf32xtensa.sh +++ b/ld/emulparams/elf32xtensa.sh @@ -10,6 +10,7 @@ MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" ARCH=xtensa MACHINE= GENERATE_SHLIB_SCRIPT=yes +GENERATE_PIE_SCRIPT=yes GENERATE_COMBRELOC_SCRIPT=yes NO_SMALL_DATA=yes PLT="/* .plt* sections are embedded in .text */"