Mon Jun 16 12:31:29 1997 Ian Lance Taylor <ian@cygnus.com>
+ * elf32-i386.c (elf_i386_relocate_section): When generating a
+ shared library, do the relocation if the input section is not
+ allocated in memory.
+
* elflink.h (NAME(bfd_elf,size_dynamic_sections)): Call
elf_link_assign_sym_version before elf_adjust_dynamic_symbol.
(elf_fix_symbol_flags): New static function, broken out of
|| (h->elf_link_hash_flags
& ELF_LINK_HASH_DEF_REGULAR) == 0)
&& (r_type == R_386_32
- || r_type == R_386_PC32)))
+ || r_type == R_386_PC32)
+ && (input_section->flags & SEC_ALLOC) != 0))
{
/* In these cases, we don't need the relocation
value. We check specially because in some
else if (r_type == R_386_PC32)
{
BFD_ASSERT (h != NULL && h->dynindx != -1);
- relocate = false;
+ if ((input_section->flags & SEC_ALLOC) != 0)
+ relocate = false;
+ else
+ relocate = true;
outrel.r_info = ELF32_R_INFO (h->dynindx, R_386_PC32);
}
else
else
{
BFD_ASSERT (h->dynindx != -1);
- relocate = false;
+ if ((input_section->flags & SEC_ALLOC) != 0)
+ relocate = false;
+ else
+ relocate = true;
outrel.r_info = ELF32_R_INFO (h->dynindx, R_386_32);
}
}