diff options
author | Jie Zhang <jie.zhang@analog.com> | 2009-09-04 03:35:32 +0000 |
---|---|---|
committer | Jie Zhang <jie.zhang@analog.com> | 2009-09-04 03:35:32 +0000 |
commit | 153d38f6576d465f160f9e6262a631274ff5cdd8 (patch) | |
tree | ca79f40878d8402bb7273045795dd73903ec73d8 /bfd/elf32-bfin.c | |
parent | b43ab92ef193e5a53ec195cbfa85252ecc47a43e (diff) | |
download | gdb-153d38f6576d465f160f9e6262a631274ff5cdd8.zip gdb-153d38f6576d465f160f9e6262a631274ff5cdd8.tar.gz gdb-153d38f6576d465f160f9e6262a631274ff5cdd8.tar.bz2 |
* elf32-bfin.c (elf32_bfinfdpic_create_dynamic_sections): Always
create .rela.bss.
(elf32_bfinfdpic_size_dynamic_sections): Set SEC_EXCLUDE flag
for empty .rela.bss and .rel.plt sections.
Diffstat (limited to 'bfd/elf32-bfin.c')
-rw-r--r-- | bfd/elf32-bfin.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/bfd/elf32-bfin.c b/bfd/elf32-bfin.c index 7a415de..f8e4c19 100644 --- a/bfd/elf32-bfin.c +++ b/bfd/elf32-bfin.c @@ -3559,8 +3559,7 @@ elf32_bfinfdpic_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) if (! info->shared) { s = bfd_make_section_with_flags (abfd, - (bed->default_use_rela_p - ? ".rela.bss" : ".rel.bss"), + ".rela.bss", flags | SEC_READONLY); if (s == NULL || ! bfd_set_section_alignment (abfd, s, bed->s->log_file_align)) @@ -4299,6 +4298,15 @@ elf32_bfinfdpic_size_dynamic_sections (bfd *output_bfd, return FALSE; } + + s = bfd_get_section_by_name (dynobj, ".rela.bss"); + if (s && s->size == 0) + s->flags |= SEC_EXCLUDE; + + s = bfd_get_section_by_name (dynobj, ".rel.plt"); + if (s && s->size == 0) + s->flags |= SEC_EXCLUDE; + return TRUE; } |