Line 1164... |
Line 1164... |
|| r_type == R_CRIS_32
|
|| r_type == R_CRIS_32
|
|| r_type == R_CRIS_8_PCREL
|
|| r_type == R_CRIS_8_PCREL
|
|| r_type == R_CRIS_16_PCREL
|
|| r_type == R_CRIS_16_PCREL
|
|| r_type == R_CRIS_32_PCREL))
|
|| r_type == R_CRIS_32_PCREL))
|
relocation = 0;
|
relocation = 0;
|
else if (!info->relocatable && unresolved_reloc)
|
else if (!info->relocatable && unresolved_reloc
|
|
&& (_bfd_elf_section_offset (output_bfd, info,
|
|
input_section,
|
|
rel->r_offset)
|
|
!= (bfd_vma) -1))
|
{
|
{
|
_bfd_error_handler
|
_bfd_error_handler
|
(_("%B, section %A: unresolvable relocation %s against symbol `%s'"),
|
(_("%B, section %A: unresolvable relocation %s against symbol `%s'"),
|
input_bfd,
|
input_bfd,
|
input_section,
|
input_section,
|
Line 2661... |
Line 2665... |
case R_CRIS_16_GOTPLT:
|
case R_CRIS_16_GOTPLT:
|
case R_CRIS_32_GOTPLT:
|
case R_CRIS_32_GOTPLT:
|
/* For local symbols, treat these like GOT relocs. */
|
/* For local symbols, treat these like GOT relocs. */
|
if (h == NULL)
|
if (h == NULL)
|
goto local_got_reloc;
|
goto local_got_reloc;
|
|
else
|
|
/* For global symbols, adjust the reloc-specific refcount. */
|
|
elf_cris_hash_entry (h)->gotplt_refcount--;
|
/* Fall through. */
|
/* Fall through. */
|
|
|
case R_CRIS_32_PLT_GOTREL:
|
case R_CRIS_32_PLT_GOTREL:
|
/* FIXME: We don't garbage-collect away the .got section. */
|
/* FIXME: We don't garbage-collect away the .got section. */
|
if (local_got_refcounts != NULL)
|
if (local_got_refcounts != NULL)
|
local_got_refcounts[-1]--;
|
local_got_refcounts[-1]--;
|
/* Fall through. */
|
/* Fall through. */
|
|
|
|
case R_CRIS_8:
|
|
case R_CRIS_16:
|
|
case R_CRIS_32:
|
case R_CRIS_8_PCREL:
|
case R_CRIS_8_PCREL:
|
case R_CRIS_16_PCREL:
|
case R_CRIS_16_PCREL:
|
case R_CRIS_32_PCREL:
|
case R_CRIS_32_PCREL:
|
case R_CRIS_32_PLT_PCREL:
|
case R_CRIS_32_PLT_PCREL:
|
|
/* Negate the increment we did in cris_elf_check_relocs. */
|
if (h != NULL)
|
if (h != NULL)
|
{
|
{
|
if (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
|
if (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
|
&& h->plt.refcount > 0)
|
&& h->plt.refcount > 0)
|
--h->plt.refcount;
|
--h->plt.refcount;
|
Line 2731... |
Line 2742... |
struct elf_cris_link_hash_entry *h;
|
struct elf_cris_link_hash_entry *h;
|
PTR p;
|
PTR p;
|
{
|
{
|
struct bfd_link_info *info = (struct bfd_link_info *) p;
|
struct bfd_link_info *info = (struct bfd_link_info *) p;
|
|
|
|
/* A GOTPLT reloc, when activated, is supposed to be included into
|
|
the PLT refcount. */
|
|
BFD_ASSERT (h->gotplt_refcount == 0
|
|
|| h->gotplt_refcount <= h->root.plt.refcount);
|
|
|
/* If nobody wanted a GOTPLT with this symbol, we're done. */
|
/* If nobody wanted a GOTPLT with this symbol, we're done. */
|
if (h->gotplt_refcount <= 0)
|
if (h->gotplt_refcount <= 0)
|
return TRUE;
|
return TRUE;
|
|
|
if (h->reg_got_refcount > 0)
|
if (h->reg_got_refcount > 0)
|