From: Kaz Kojima Date: Tue, 3 Jun 2003 04:50:20 +0000 (+0000) Subject: * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2558b9a9f0a3b38756ba4044c052de5e0f2be6cc;p=binutils-gdb.git * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section and DT_DEBUG dynamic tag even for position independent executables. * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 459b569a03b..c56e243bba9 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2003-06-03 Kaz Kojima + + * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section + and DT_DEBUG dynamic tag even for position independent executables. + * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize. + 2003-06-02 Daniel Jacobowitz * config.bfd: Move obsolete entries out of the range of the diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c index 4ff31bfb695..2042c34dec2 100644 --- a/bfd/elf32-sh.c +++ b/bfd/elf32-sh.c @@ -4338,7 +4338,7 @@ sh_elf_size_dynamic_sections (output_bfd, info) 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); @@ -4500,7 +4500,7 @@ sh_elf_size_dynamic_sections (output_bfd, info) #define add_dynamic_entry(TAG, VAL) \ bfd_elf32_add_dynamic_entry (info, (bfd_vma) (TAG), (bfd_vma) (VAL)) - if (! info->shared) + if (info->executable) { if (! add_dynamic_entry (DT_DEBUG, 0)) return FALSE; diff --git a/bfd/elf64-sh64.c b/bfd/elf64-sh64.c index d666fca9cbe..fe3195ca3a0 100644 --- a/bfd/elf64-sh64.c +++ b/bfd/elf64-sh64.c @@ -3643,7 +3643,7 @@ sh64_elf64_size_dynamic_sections (output_bfd, info) if (elf_hash_table (info)->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); @@ -3777,7 +3777,7 @@ sh64_elf64_size_dynamic_sections (output_bfd, info) must add the entries now so that we get the correct size for the .dynamic section. The DT_DEBUG entry is filled in by the dynamic linker and used by the debugger. */ - if (! info->shared) + if (info->executable) { if (! bfd_elf64_add_dynamic_entry (info, DT_DEBUG, 0)) return FALSE;