| 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 |
| 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); |
| 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 |
|
|
| 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 |
} |
} |