diff options
author | Jim Meyering <meyering@redhat.com> | 2009-10-08 08:50:51 +0000 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2009-10-08 08:58:19 +0000 |
commit | 79b5a82e464c9ec7731ed6f80580ceb13f745168 (patch) | |
tree | e258911599426e00b8bc17b4e491a583c9d88027 /bfd/elf32-bfin.c | |
parent | f699d949b3eb15dfba4284d326934d5163fc444b (diff) | |
download | gdb-79b5a82e464c9ec7731ed6f80580ceb13f745168.tar.gz |
manually sync from the CVS repository
Diffstat (limited to 'bfd/elf32-bfin.c')
-rw-r--r-- | bfd/elf32-bfin.c | 46 |
1 files changed, 20 insertions, 26 deletions
diff --git a/bfd/elf32-bfin.c b/bfd/elf32-bfin.c index d4e3bbb9424..a767749012f 100644 --- a/bfd/elf32-bfin.c +++ b/bfd/elf32-bfin.c @@ -4166,19 +4166,17 @@ _bfinfdpic_size_got_plt (bfd *output_bfd, } if (elf_hash_table (info)->dynamic_sections_created) + bfinfdpic_pltrel_section (info)->size = + gpinfop->g.lzplt / LZPLT_NORMAL_SIZE * get_elf_backend_data (output_bfd)->s->sizeof_rel; + if (bfinfdpic_pltrel_section (info)->size == 0) + bfinfdpic_pltrel_section (info)->flags |= SEC_EXCLUDE; + else { - bfinfdpic_pltrel_section (info)->size = - gpinfop->g.lzplt / LZPLT_NORMAL_SIZE * get_elf_backend_data (output_bfd)->s->sizeof_rel; - if (bfinfdpic_pltrel_section (info)->size == 0) - bfinfdpic_pltrel_section (info)->flags |= SEC_EXCLUDE; - else - { - bfinfdpic_pltrel_section (info)->contents = - (bfd_byte *) bfd_zalloc (dynobj, - bfinfdpic_pltrel_section (info)->size); - if (bfinfdpic_pltrel_section (info)->contents == NULL) - return FALSE; - } + bfinfdpic_pltrel_section (info)->contents = + (bfd_byte *) bfd_zalloc (dynobj, + bfinfdpic_pltrel_section (info)->size); + if (bfinfdpic_pltrel_section (info)->contents == NULL) + return FALSE; } /* Add 4 bytes for every block of at most 65535 lazy PLT entries, @@ -4215,18 +4213,15 @@ _bfinfdpic_size_got_plt (bfd *output_bfd, /* Allocate the PLT section contents only after _bfinfdpic_assign_plt_entries has a chance to add the size of the non-lazy PLT entries. */ - if (elf_hash_table (info)->dynamic_sections_created) + if (bfinfdpic_plt_section (info)->size == 0) + bfinfdpic_plt_section (info)->flags |= SEC_EXCLUDE; + else { - if (bfinfdpic_plt_section (info)->size == 0) - bfinfdpic_plt_section (info)->flags |= SEC_EXCLUDE; - else - { - bfinfdpic_plt_section (info)->contents = - (bfd_byte *) bfd_zalloc (dynobj, - bfinfdpic_plt_section (info)->size); - if (bfinfdpic_plt_section (info)->contents == NULL) - return FALSE; - } + bfinfdpic_plt_section (info)->contents = + (bfd_byte *) bfd_zalloc (dynobj, + bfinfdpic_plt_section (info)->size); + if (bfinfdpic_plt_section (info)->contents == NULL) + return FALSE; } return TRUE; @@ -4302,12 +4297,11 @@ elf32_bfinfdpic_size_dynamic_sections (bfd *output_bfd, return FALSE; } - - s = bfd_get_section_by_name (dynobj, ".rela.bss"); + s = bfd_get_section_by_name (dynobj, ".dynbss"); if (s && s->size == 0) s->flags |= SEC_EXCLUDE; - s = bfd_get_section_by_name (dynobj, ".rel.plt"); + s = bfd_get_section_by_name (dynobj, ".rela.bss"); if (s && s->size == 0) s->flags |= SEC_EXCLUDE; |