* bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): In SGI-
compatible objects, add the values of defined external symbols to the addend.
This commit is contained in:
parent
6eaa6adc99
commit
d2fba50dd9
|
@ -1,3 +1,9 @@
|
||||||
|
2003-07-09 Richard Sandiford <rsandifo@redhat.com>
|
||||||
|
|
||||||
|
* bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): In SGI-
|
||||||
|
compatible objects, add the values of defined external symbols
|
||||||
|
to the addend.
|
||||||
|
|
||||||
2003-07-09 Richard Sandiford <rsandifo@redhat.com>
|
2003-07-09 Richard Sandiford <rsandifo@redhat.com>
|
||||||
|
|
||||||
* elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Always
|
* elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Always
|
||||||
|
|
|
@ -3887,6 +3887,7 @@ mips_elf_create_dynamic_relocation (output_bfd, info, rel, h, sec,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
long indx;
|
long indx;
|
||||||
|
bfd_boolean defined_p;
|
||||||
|
|
||||||
/* We must now calculate the dynamic symbol table index to use
|
/* We must now calculate the dynamic symbol table index to use
|
||||||
in the relocation. */
|
in the relocation. */
|
||||||
|
@ -3899,6 +3900,15 @@ mips_elf_create_dynamic_relocation (output_bfd, info, rel, h, sec,
|
||||||
become local. */
|
become local. */
|
||||||
if (indx == -1)
|
if (indx == -1)
|
||||||
indx = 0;
|
indx = 0;
|
||||||
|
if (SGI_COMPAT (output_bfd))
|
||||||
|
defined_p = ((h->root.elf_link_hash_flags
|
||||||
|
& ELF_LINK_HASH_DEF_REGULAR) != 0);
|
||||||
|
else
|
||||||
|
/* ??? glibc's ld.so just adds the final GOT entry to the
|
||||||
|
relocation field. It therefore treats relocs against
|
||||||
|
defined symbols in the same way as relocs against
|
||||||
|
undefined symbols. */
|
||||||
|
defined_p = FALSE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -3928,13 +3938,14 @@ mips_elf_create_dynamic_relocation (output_bfd, info, rel, h, sec,
|
||||||
useful, after all. This should be a bit more efficient
|
useful, after all. This should be a bit more efficient
|
||||||
as well. */
|
as well. */
|
||||||
indx = 0;
|
indx = 0;
|
||||||
|
defined_p = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If the relocation was previously an absolute relocation and
|
/* If the relocation was previously an absolute relocation and
|
||||||
this symbol will not be referred to by the relocation, we must
|
this symbol will not be referred to by the relocation, we must
|
||||||
adjust it by the value we give it in the dynamic symbol table.
|
adjust it by the value we give it in the dynamic symbol table.
|
||||||
Otherwise leave the job up to the dynamic linker. */
|
Otherwise leave the job up to the dynamic linker. */
|
||||||
if (!indx && r_type != R_MIPS_REL32)
|
if (defined_p && r_type != R_MIPS_REL32)
|
||||||
*addendp += symbol;
|
*addendp += symbol;
|
||||||
|
|
||||||
/* The relocation is always an REL32 relocation because we don't
|
/* The relocation is always an REL32 relocation because we don't
|
||||||
|
|
Loading…
Reference in New Issue