Develop and Download Open Source Software

Browse Subversion Repository

Diff of /trunk/bfd/elf32-m32r.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 20 by monabuilder, Sun Dec 7 02:23:44 2008 UTC revision 21 by monamour, Mon Jul 27 20:34:36 2009 UTC
# Line 1526  struct elf_m32r_link_hash_table Line 1526  struct elf_m32r_link_hash_table
1526    asection *sdynbss;    asection *sdynbss;
1527    asection *srelbss;    asection *srelbss;
1528    
1529    /* Small local sym to section mapping cache.  */    /* Small local sym cache.  */
1530    struct sym_sec_cache sym_sec;    struct sym_cache sym_cache;
1531  };  };
1532    
1533  /* Traverse an m32r ELF linker hash table.  */  /* Traverse an m32r ELF linker hash table.  */
# Line 1604  m32r_elf_link_hash_table_create (bfd *ab Line 1604  m32r_elf_link_hash_table_create (bfd *ab
1604    ret->srelplt = NULL;    ret->srelplt = NULL;
1605    ret->sdynbss = NULL;    ret->sdynbss = NULL;
1606    ret->srelbss = NULL;    ret->srelbss = NULL;
1607    ret->sym_sec.abfd = NULL;    ret->sym_cache.abfd = NULL;
1608    
1609    return &ret->root.root;    return &ret->root.root;
1610  }  }
# Line 1623  create_got_section (bfd *dynobj, struct Line 1623  create_got_section (bfd *dynobj, struct
1623    htab = m32r_elf_hash_table (info);    htab = m32r_elf_hash_table (info);
1624    htab->sgot = bfd_get_section_by_name (dynobj, ".got");    htab->sgot = bfd_get_section_by_name (dynobj, ".got");
1625    htab->sgotplt = bfd_get_section_by_name (dynobj, ".got.plt");    htab->sgotplt = bfd_get_section_by_name (dynobj, ".got.plt");
1626    if (! htab->sgot || ! htab->sgotplt)    htab->srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
1627      if (! htab->sgot || ! htab->sgotplt || ! htab->srelgot)
1628      abort ();      abort ();
1629    
   htab->srelgot = bfd_make_section_with_flags (dynobj, ".rela.got",  
                                                (SEC_ALLOC  
                                                 | SEC_LOAD  
                                                 | SEC_HAS_CONTENTS  
                                                 | SEC_IN_MEMORY  
                                                 | SEC_LINKER_CREATED  
                                                 | SEC_READONLY));  
   if (htab->srelgot == NULL  
       || ! bfd_set_section_alignment (dynobj, htab->srelgot, 2))  
     return FALSE;  
   
1630    return TRUE;    return TRUE;
1631  }  }
1632    
# Line 3951  m32r_elf_check_relocs (bfd *abfd, Line 3941  m32r_elf_check_relocs (bfd *abfd,
3941                  head = &((struct elf_m32r_link_hash_entry *) h)->dyn_relocs;                  head = &((struct elf_m32r_link_hash_entry *) h)->dyn_relocs;
3942                else                else
3943                  {                  {
3944                      /* Track dynamic relocs needed for local syms too.  */
3945                    asection *s;                    asection *s;
3946                    void *vpp;                    void *vpp;
3947                      Elf_Internal_Sym *isym;
3948    
3949                    /* Track dynamic relocs needed for local syms too.  */                    isym = bfd_sym_from_r_symndx (&htab->sym_cache,
3950                    s = bfd_section_from_r_symndx (abfd, &htab->sym_sec,                                                  abfd, r_symndx);
3951                                                   sec, r_symndx);                    if (isym == NULL)
3952                    if (s == NULL)                      return FALSE;
3953                      return FALSE;  
3954                      s = bfd_section_from_elf_index (abfd, isym->st_shndx);
3955                      if (s == NULL)
3956                        s = sec;
3957    
3958                    vpp = &elf_section_data (s)->local_dynrel;                    vpp = &elf_section_data (s)->local_dynrel;
3959                    head = (struct elf_m32r_dyn_relocs **) vpp;                    head = (struct elf_m32r_dyn_relocs **) vpp;

Legend:
Removed from v.20  
changed lines
  Added in v.21

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26