+2000-07-19 H.J. Lu <hjl@gnu.org>
+
+ * elf32-arm.h (elf32_arm_size_dynamic_sections): Also set
+ DF_TEXTREL if DT_TEXTREL is set.
+ * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
+ * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
+ * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
+ * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
+ * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
+ * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
+ * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
+ * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
+ * elf64-ia64.c (elf64_ia64_size_dynamic_sections): Likewise.
+ * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
+
+ * bfd/elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also
+ set DF_SYMBOLIC for symbolic link. Also set DT_RUNPATH if
+ DT_RPATH is set.
+ Set the DT_FLAGS and DT_FLAGS_1 entries if necessary.
+
2000-07-19 H.J. Lu <hjl@gnu.org>
* bfd-in.h (bfd_elf_set_dt_needed_soname): New.
{
if (! bfd_elf32_add_dynamic_entry (info, DT_TEXTREL, 0))
return false;
+ info->flags |= DF_TEXTREL;
}
}
{
if (! bfd_elf32_add_dynamic_entry (info, DT_TEXTREL, 0))
return false;
+ info->flags |= DF_TEXTREL;
}
}
{
if (! bfd_elf32_add_dynamic_entry (info, DT_TEXTREL, 0))
return false;
+ info->flags |= DF_TEXTREL;
}
}
{
if (!bfd_elf32_add_dynamic_entry (info, DT_TEXTREL, 0))
return false;
+ info->flags |= DF_TEXTREL;
}
}
{
if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_TEXTREL, 0))
return false;
+ info->flags |= DF_TEXTREL;
}
if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_PLTGOT, 0))
{
if (! bfd_elf32_add_dynamic_entry (info, DT_TEXTREL, 0))
return false;
+ info->flags |= DF_TEXTREL;
}
}
{
if (! bfd_elf32_add_dynamic_entry (info, DT_TEXTREL, 0))
return false;
+ info->flags |= DF_TEXTREL;
}
}
{
if (! bfd_elf64_add_dynamic_entry (info, DT_TEXTREL, 0))
return false;
+ info->flags |= DF_TEXTREL;
}
}
{
if (! bfd_elf64_add_dynamic_entry (info, DT_TEXTREL, 0))
return false;
+ info->flags |= DF_TEXTREL;
}
}
{
if (! bfd_elf64_add_dynamic_entry (info, DT_TEXTREL, 0))
return false;
+ info->flags |= DF_TEXTREL;
}
}
{
if (! bfd_elf64_add_dynamic_entry (info, DT_TEXTREL, 0))
return false;
+ info->flags |= DF_TEXTREL;
}
/* Add dynamic STT_REGISTER symbols and corresponding DT_SPARC_REGISTER
{
if (! elf_add_dynamic_entry (info, DT_SYMBOLIC, 0))
return false;
+ info->flags |= DF_SYMBOLIC;
}
if (rpath != NULL)
indx = _bfd_stringtab_add (elf_hash_table (info)->dynstr, rpath,
true, true);
if (indx == (bfd_size_type) -1
- || ! elf_add_dynamic_entry (info, DT_RPATH, indx))
+ || ! elf_add_dynamic_entry (info, DT_RPATH, indx)
+ || ! elf_add_dynamic_entry (info, DT_RUNPATH, indx))
return false;
}
elf_tdata (output_bfd)->cverdefs = cdefs;
}
+ if (info->flags)
+ {
+ if (! elf_add_dynamic_entry (info, DT_FLAGS, info->flags))
+ return false;
+ }
+
+ if (info->flags_1)
+ {
+ if (! info->shared)
+ info->flags_1 &= ~ (DF_1_INITFIRST
+ | DF_1_NODELETE
+ | DF_1_NOOPEN);
+ if (! elf_add_dynamic_entry (info, DT_FLAGS_1, info->flags_1))
+ return false;
+ }
+
/* Work out the size of the version reference section. */
s = bfd_get_section_by_name (dynobj, ".gnu.version_r");