This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[committed, PATCH] bfin: Don't create .interp section for info->nointerp
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: binutils at sourceware dot org
- Date: Mon, 9 Oct 2017 15:08:55 -0700
- Subject: [committed, PATCH] bfin: Don't create .interp section for info->nointerp
- Authentication-results: sourceware.org; auth=none
Don't create the .interp section with "ld --no-dynamic-linker". This
fixed:
FAIL: PR ld/20828 forcibly exported symbol version without section GC
FAIL: PR ld/20828 forcibly exported symbol version with section GC
FAIL: readelf version information
* elf32-bfin.c (bfin_size_dynamic_sections): Don't create the
.interp section with "ld --no-dynamic-linker".
---
bfd/ChangeLog | 5 +++++
bfd/elf32-bfin.c | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index c334e53307..c14a3bc491 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf32-bfin.c (bfin_size_dynamic_sections): Don't create the
+ .interp section with "ld --no-dynamic-linker".
+
2017-10-09 Alan Modra <amodra@gmail.com>
PR 22212
diff --git a/bfd/elf32-bfin.c b/bfd/elf32-bfin.c
index 09e50ce616..94c7c2a900 100644
--- a/bfd/elf32-bfin.c
+++ b/bfd/elf32-bfin.c
@@ -5336,7 +5336,7 @@ bfin_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED,
if (elf_hash_table (info)->dynamic_sections_created)
{
/* Set the contents of the .interp section to the interpreter. */
- if (bfd_link_executable (info))
+ if (bfd_link_executable (info) && !info->nointerp)
{
s = bfd_get_linker_section (dynobj, ".interp");
BFD_ASSERT (s != NULL);
--
2.13.6