diff options
-rw-r--r-- | bfd/ChangeLog | 9 | ||||
-rw-r--r-- | bfd/elf32-cris.c | 13 | ||||
-rw-r--r-- | bfd/elf32-vax.c | 11 |
3 files changed, 21 insertions, 12 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 110f28a..1334f1e 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,10 @@ +2004-01-11 Kazu Hirata <kazu@cs.umass.edu> + + * elf32-cris.c (cris_elf_gc_sweep_hook): Return early if no + dynamic object is present. Declare r_symndx and h in an inner + scope. + * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise. + 2004-01-09 Daniel Jacobowitz <drow@mvista.com> * elf32-arm.h (struct elf32_arm_relocs_copied): Remove pc_count. @@ -32,7 +39,7 @@ 2004-01-08 Kazu Hirata <kazu@cs.umass.edu> - * elf32-m68k.c (elf_m68k_gc_sweep_hook): Terminate early + * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return early if no dynamic object is present. Declare r_symndx and h in an inner scope. diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c index 2c63474..e2a51f6 100644 --- a/bfd/elf32-cris.c +++ b/bfd/elf32-cris.c @@ -1770,26 +1770,27 @@ cris_elf_gc_sweep_hook (abfd, info, sec, relocs) struct elf_link_hash_entry **sym_hashes; bfd_signed_vma *local_got_refcounts; const Elf_Internal_Rela *rel, *relend; - unsigned long r_symndx; - struct elf_link_hash_entry *h; bfd *dynobj; asection *sgot; asection *srelgot; - symtab_hdr = &elf_tdata (abfd)->symtab_hdr; - sym_hashes = elf_sym_hashes (abfd); - local_got_refcounts = elf_local_got_refcounts (abfd); - dynobj = elf_hash_table (info)->dynobj; if (dynobj == NULL) return TRUE; + symtab_hdr = &elf_tdata (abfd)->symtab_hdr; + sym_hashes = elf_sym_hashes (abfd); + local_got_refcounts = elf_local_got_refcounts (abfd); + sgot = bfd_get_section_by_name (dynobj, ".got"); srelgot = bfd_get_section_by_name (dynobj, ".rela.got"); relend = relocs + sec->reloc_count; for (rel = relocs; rel < relend; rel++) { + unsigned long r_symndx; + struct elf_link_hash_entry *h; + switch (ELF32_R_TYPE (rel->r_info)) { case R_CRIS_16_GOT: diff --git a/bfd/elf32-vax.c b/bfd/elf32-vax.c index c37ca00..e085e35 100644 --- a/bfd/elf32-vax.c +++ b/bfd/elf32-vax.c @@ -892,20 +892,21 @@ elf_vax_gc_sweep_hook (abfd, info, sec, relocs) Elf_Internal_Shdr *symtab_hdr; struct elf_link_hash_entry **sym_hashes; const Elf_Internal_Rela *rel, *relend; - unsigned long r_symndx; - struct elf_link_hash_entry *h; bfd *dynobj; - symtab_hdr = &elf_tdata (abfd)->symtab_hdr; - sym_hashes = elf_sym_hashes (abfd); - dynobj = elf_hash_table (info)->dynobj; if (dynobj == NULL) return TRUE; + symtab_hdr = &elf_tdata (abfd)->symtab_hdr; + sym_hashes = elf_sym_hashes (abfd); + relend = relocs + sec->reloc_count; for (rel = relocs; rel < relend; rel++) { + unsigned long r_symndx; + struct elf_link_hash_entry *h; + switch (ELF32_R_TYPE (rel->r_info)) { case R_VAX_GOT32: |