| 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. */ |
| 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 |
} |
} |
| 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 |
|
|
| 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; |