mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-25 04:49:54 +08:00
* elf64-alpha.c (elf64_alpha_relax_section): Use the proper section
for calculating a local symbol's address. (elf64_alpha_calc_got_offsets): Skip entries with 0 use count. Set the .got's cooked size as well as the raw size.
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
Sat Apr 25 14:07:29 1998 Richard Henderson <rth@cygnus.com>
|
||||||
|
|
||||||
|
* elf64-alpha.c (elf64_alpha_relax_section): Use the proper section
|
||||||
|
for calculating a local symbol's address.
|
||||||
|
(elf64_alpha_calc_got_offsets): Skip entries with 0 use count.
|
||||||
|
Set the .got's cooked size as well as the raw size.
|
||||||
|
|
||||||
Fri Apr 24 09:16:00 1998 Nick Clifton <nickc@cygnus.com>
|
Fri Apr 24 09:16:00 1998 Nick Clifton <nickc@cygnus.com>
|
||||||
|
|
||||||
* elf32-v850.c (v850_elf_print_private_bfd_data): Add
|
* elf32-v850.c (v850_elf_print_private_bfd_data): Add
|
||||||
|
@ -1462,17 +1462,28 @@ elf64_alpha_relax_section (abfd, sec, link_info, again)
|
|||||||
if (ELF64_R_SYM (irel->r_info) < symtab_hdr->sh_info)
|
if (ELF64_R_SYM (irel->r_info) < symtab_hdr->sh_info)
|
||||||
{
|
{
|
||||||
Elf_Internal_Sym isym;
|
Elf_Internal_Sym isym;
|
||||||
|
asection *lsec;
|
||||||
|
|
||||||
/* A local symbol. */
|
/* A local symbol. */
|
||||||
bfd_elf64_swap_symbol_in (abfd,
|
bfd_elf64_swap_symbol_in (abfd,
|
||||||
extsyms + ELF64_R_SYM (irel->r_info),
|
extsyms + ELF64_R_SYM (irel->r_info),
|
||||||
&isym);
|
&isym);
|
||||||
|
if (isym.st_shndx == SHN_UNDEF)
|
||||||
|
lsec = bfd_und_section_ptr;
|
||||||
|
else if (isym.st_shndx > 0 && isym.st_shndx < SHN_LORESERVE)
|
||||||
|
lsec = bfd_section_from_elf_index (abfd, isym.st_shndx);
|
||||||
|
else if (isym.st_shndx == SHN_ABS)
|
||||||
|
lsec = bfd_abs_section_ptr;
|
||||||
|
else if (isym.st_shndx == SHN_COMMON)
|
||||||
|
lsec = bfd_com_section_ptr;
|
||||||
|
else
|
||||||
|
continue; /* who knows. */
|
||||||
|
|
||||||
info.h = NULL;
|
info.h = NULL;
|
||||||
info.gotent = local_got_entries[ELF64_R_SYM(irel->r_info)];
|
info.gotent = local_got_entries[ELF64_R_SYM(irel->r_info)];
|
||||||
symval = (isym.st_value
|
symval = (isym.st_value
|
||||||
+ sec->output_section->vma
|
+ lsec->output_section->vma
|
||||||
+ sec->output_offset);
|
+ lsec->output_offset);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2892,6 +2903,7 @@ elf64_alpha_calc_got_offsets (info)
|
|||||||
|
|
||||||
for (k = 0, n = elf_tdata(j)->symtab_hdr.sh_info; k < n; ++k)
|
for (k = 0, n = elf_tdata(j)->symtab_hdr.sh_info; k < n; ++k)
|
||||||
for (gotent = local_got_entries[k]; gotent; gotent = gotent->next)
|
for (gotent = local_got_entries[k]; gotent; gotent = gotent->next)
|
||||||
|
if (gotent->use_count > 0)
|
||||||
{
|
{
|
||||||
gotent->got_offset = got_offset;
|
gotent->got_offset = got_offset;
|
||||||
got_offset += 8;
|
got_offset += 8;
|
||||||
@ -2899,6 +2911,7 @@ elf64_alpha_calc_got_offsets (info)
|
|||||||
}
|
}
|
||||||
|
|
||||||
alpha_elf_tdata(i)->got->_raw_size = got_offset;
|
alpha_elf_tdata(i)->got->_raw_size = got_offset;
|
||||||
|
alpha_elf_tdata(i)->got->_cooked_size = got_offset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user