View | Details | Raw Unified | Return to bug 20995 | Differences between
and this patch

Collapse All | Expand All

(-)a/bfd/elf32-nios2.c (-9 / +7 lines)
Lines 4694-4700 static bfd_boolean Link Here
4694
nios2_elf32_check_relocs (bfd *abfd, struct bfd_link_info *info,
4694
nios2_elf32_check_relocs (bfd *abfd, struct bfd_link_info *info,
4695
			  asection *sec, const Elf_Internal_Rela *relocs)
4695
			  asection *sec, const Elf_Internal_Rela *relocs)
4696
{
4696
{
4697
  bfd *dynobj;
4698
  Elf_Internal_Shdr *symtab_hdr;
4697
  Elf_Internal_Shdr *symtab_hdr;
4699
  struct elf_link_hash_entry **sym_hashes, **sym_hashes_end;
4698
  struct elf_link_hash_entry **sym_hashes, **sym_hashes_end;
4700
  const Elf_Internal_Rela *rel;
4699
  const Elf_Internal_Rela *rel;
Lines 4708-4714 nios2_elf32_check_relocs (bfd *abfd, struct bfd_link_info *info, Link Here
4708
  if (bfd_link_relocatable (info))
4707
  if (bfd_link_relocatable (info))
4709
    return TRUE;
4708
    return TRUE;
4710
4709
4711
  dynobj = elf_hash_table (info)->dynobj;
4712
  symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
4710
  symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
4713
  sym_hashes = elf_sym_hashes (abfd);
4711
  sym_hashes = elf_sym_hashes (abfd);
4714
  sym_hashes_end = (sym_hashes
4712
  sym_hashes_end = (sym_hashes
Lines 4778-4788 nios2_elf32_check_relocs (bfd *abfd, struct bfd_link_info *info, Link Here
4778
		break;
4776
		break;
4779
	      }
4777
	      }
4780
4778
4781
	    if (dynobj == NULL)
4779
	    if (htab->root.dynobj == NULL)
4782
	      {
4780
	      {
4783
		/* Create the .got section.  */
4781
		/* Create the .got section.  */
4784
		elf_hash_table (info)->dynobj = dynobj = abfd;
4782
		htab->root.dynobj = abfd;
4785
		nios2_elf32_create_dynamic_sections (dynobj, info);
4783
		nios2_elf32_create_dynamic_sections (htab->root.dynobj, info);
4786
	      }
4784
	      }
4787
4785
4788
	    if (sgot == NULL)
4786
	    if (sgot == NULL)
Lines 4926-4932 nios2_elf32_check_relocs (bfd *abfd, struct bfd_link_info *info, Link Here
4926
	      if (sreloc == NULL)
4924
	      if (sreloc == NULL)
4927
		{
4925
		{
4928
		  sreloc = _bfd_elf_make_dynamic_reloc_section
4926
		  sreloc = _bfd_elf_make_dynamic_reloc_section
4929
		    (sec, dynobj, 2, abfd, TRUE);
4927
		    (sec, htab->root.dynobj, 2, abfd, TRUE);
4930
		  if (sreloc == NULL)
4928
		  if (sreloc == NULL)
4931
		    return FALSE;
4929
		    return FALSE;
4932
		}
4930
		}
Lines 6003-6015 nios2_elf32_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, Link Here
6003
	      s->reloc_count = 0;
6001
	      s->reloc_count = 0;
6004
	    }
6002
	    }
6005
	}
6003
	}
6006
      else if (s == htab->root.sgot
6004
      else if (s == htab->root.sgotplt)
6007
	       || s == htab->root.sgotplt)
6008
	{
6005
	{
6009
	  if (s->size != 0)
6006
	  if (s->size != 0)
6010
	    got = TRUE;
6007
	    got = TRUE;
6011
	}
6008
	}
6012
      else if (s != htab->root.sdynbss
6009
      else if (s != htab->root.sgot
6010
	       && s != htab->root.sdynbss
6013
	       && s != htab->root.sdynrelro)
6011
	       && s != htab->root.sdynrelro)
6014
	/* It's not one of our sections, so don't allocate space.  */
6012
	/* It's not one of our sections, so don't allocate space.  */
6015
	continue;
6013
	continue;

Return to bug 20995