summaryrefslogtreecommitdiff
path: root/bfd/elf-m10300.c
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2002-02-12 09:25:39 +0000
committerAlexandre Oliva <aoliva@redhat.com>2002-02-12 09:25:39 +0000
commit0a87a3c34fd1ee596683b5e94a9982759676f920 (patch)
treef2978a405aea6bdc66b583ca3a624bc3c6ac487e /bfd/elf-m10300.c
parentaa958895d9e7ca4a33e0bbf740a6f4b753e596c1 (diff)
downloadgdb-0a87a3c34fd1ee596683b5e94a9982759676f920.tar.gz
* elf-m10300.c (mn10300_elf_relax_section): Skip section before
loading its contents if there's nothing to do in it.
Diffstat (limited to 'bfd/elf-m10300.c')
-rw-r--r--bfd/elf-m10300.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/bfd/elf-m10300.c b/bfd/elf-m10300.c
index fb94c5127ad..e006ac2581b 100644
--- a/bfd/elf-m10300.c
+++ b/bfd/elf-m10300.c
@@ -1,5 +1,5 @@
/* Matsushita 10300 specific support for 32-bit ELF
- Copyright 1996, 1997, 1998, 1999, 2000, 2001
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -874,6 +874,12 @@ mn10300_elf_relax_section (abfd, sec, link_info, again)
const char *sym_name;
char *new_name;
+ /* If there's nothing to do in this section, skip it. */
+ if (! (((section->flags & SEC_RELOC) != 0
+ && section->reloc_count != 0)
+ || (section->flags & SEC_CODE) != 0))
+ continue;
+
/* Get cached copy of section contents if it exists. */
if (elf_section_data (section)->this_hdr.contents != NULL)
contents = elf_section_data (section)->this_hdr.contents;