Develop and Download Open Source Software

Browse Subversion Repository

Diff of /trunk/bfd/elf32-sh.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 2187  struct elf_sh_link_hash_table Line 2187  struct elf_sh_link_hash_table
2187    /* The (unloaded but important) VxWorks .rela.plt.unloaded section.  */    /* The (unloaded but important) VxWorks .rela.plt.unloaded section.  */
2188    asection *srelplt2;    asection *srelplt2;
2189    
2190    /* Small local sym to section mapping cache.  */    /* Small local sym cache.  */
2191    struct sym_sec_cache sym_sec;    struct sym_cache sym_cache;
2192    
2193    /* A counter or offset to track a TLS got entry.  */    /* A counter or offset to track a TLS got entry.  */
2194    union    union
# Line 2281  sh_elf_link_hash_table_create (bfd *abfd Line 2281  sh_elf_link_hash_table_create (bfd *abfd
2281    ret->sdynbss = NULL;    ret->sdynbss = NULL;
2282    ret->srelbss = NULL;    ret->srelbss = NULL;
2283    ret->srelplt2 = NULL;    ret->srelplt2 = NULL;
2284    ret->sym_sec.abfd = NULL;    ret->sym_cache.abfd = NULL;
2285    ret->tls_ldm_got.refcount = 0;    ret->tls_ldm_got.refcount = 0;
2286    ret->plt_info = NULL;    ret->plt_info = NULL;
2287    ret->vxworks_p = vxworks_object_p (abfd);    ret->vxworks_p = vxworks_object_p (abfd);
# Line 2303  create_got_section (bfd *dynobj, struct Line 2303  create_got_section (bfd *dynobj, struct
2303    htab = sh_elf_hash_table (info);    htab = sh_elf_hash_table (info);
2304    htab->sgot = bfd_get_section_by_name (dynobj, ".got");    htab->sgot = bfd_get_section_by_name (dynobj, ".got");
2305    htab->sgotplt = bfd_get_section_by_name (dynobj, ".got.plt");    htab->sgotplt = bfd_get_section_by_name (dynobj, ".got.plt");
2306    if (! htab->sgot || ! htab->sgotplt)    htab->srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
2307      if (! htab->sgot || ! htab->sgotplt || ! htab->srelgot)
2308      abort ();      abort ();
   
   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;  
2309    return TRUE;    return TRUE;
2310  }  }
2311    
# Line 5212  sh_elf_check_relocs (bfd *abfd, struct b Line 5203  sh_elf_check_relocs (bfd *abfd, struct b
5203                  head = &((struct elf_sh_link_hash_entry *) h)->dyn_relocs;                  head = &((struct elf_sh_link_hash_entry *) h)->dyn_relocs;
5204                else                else
5205                  {                  {
5206                      /* Track dynamic relocs needed for local syms too.  */
5207                    asection *s;                    asection *s;
5208                    void *vpp;                    void *vpp;
5209                      Elf_Internal_Sym *isym;
5210    
5211                    /* Track dynamic relocs needed for local syms too.  */                    isym = bfd_sym_from_r_symndx (&htab->sym_cache,
5212                    s = bfd_section_from_r_symndx (abfd, &htab->sym_sec,                                                  abfd, r_symndx);
5213                                                   sec, r_symndx);                    if (isym == NULL)
                   if (s == NULL)  
5214                      return FALSE;                      return FALSE;
5215    
5216                      s = bfd_section_from_elf_index (abfd, isym->st_shndx);
5217                      if (s == NULL)
5218                        s = sec;
5219    
5220                    vpp = &elf_section_data (s)->local_dynrel;                    vpp = &elf_section_data (s)->local_dynrel;
5221                    head = (struct elf_sh_dyn_relocs **) vpp;                    head = (struct elf_sh_dyn_relocs **) vpp;
5222                  }                  }

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