sec_symndx, rel->r_offset, rel->r_addend))
goto err_out;
+ /* Add symbol to dynamic symbol table. */
+ if (hh != NULL
+ && bfd_link_pic (info)
+ && ! (bfd_elf_link_record_local_dynamic_symbol
+ (info, abfd, r_symndx)))
+ goto err_out;
+
/* If we are building a shared library and we just recorded
a dynamic R_PARISC_FPTR64 relocation, then make sure the
section symbol for this section ends up in the dynamic
if (bfd_link_pic (info) && dynrel_type == R_PARISC_FPTR64
&& ! (bfd_elf_link_record_local_dynamic_symbol
(info, abfd, sec_symndx)))
- return false;
+ goto err_out;
}
}
return true;
}
-/* Allocate space for a DLT.PLT entry. */
+/* Allocate space for a PLT entry. */
static bool
allocate_global_data_plt (struct elf_link_hash_entry *eh, void *data)
if (!discarded_section (hppa_info->other_rel_sec))
hppa_info->other_rel_sec->size += sizeof (Elf64_External_Rela);
-
- /* Make sure this symbol gets into the dynamic symbol table if
- it is not already recorded. */
- if (eh->dynindx == -1 && eh->type != STT_PARISC_MILLI)
- {
- BFD_ASSERT (rent->sec->owner == hh->owner);
- if (!bfd_elf_link_record_local_dynamic_symbol
- (x->info, hh->owner, hh->sym_indx))
- return false;
- }
}
/* Take care of the GOT and PLT relocations. */
else
rel.r_addend = rent->addend;
+ BFD_ASSERT (dynindx != -1);
rel.r_info = ELF64_R_INFO (dynindx, rent->type);
loc = hppa_info->other_rel_sec->contents;