aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorZack Weinberg <zackw@panix.com>2005-03-02 04:47:25 +0000
committerZack Weinberg <zackw@panix.com>2005-03-02 04:47:25 +0000
commit8c1acd095d2f5046e963bccf45215e0f88383adc (patch)
tree8676eb418556ca0a763069ecddf855411a77dc4b /bfd/elf.c
parent71ba24a1eb676359ecb1331f7958a185f05bc8db (diff)
downloadgdb-8c1acd095d2f5046e963bccf45215e0f88383adc.zip
gdb-8c1acd095d2f5046e963bccf45215e0f88383adc.tar.gz
gdb-8c1acd095d2f5046e963bccf45215e0f88383adc.tar.bz2
* elf.c (bfd_section_from_shdr <default case>): Call
elf_backend_section_from_shdr hook unconditionally, and return what it returns. (bfd_section_from_phdr): Similarly, for elf_backend_section_from_phdr. * elfxx-target.h (elf_backend_section_from_shdr) (elf_backend_section_from_phdr): Default to _bfd_elf_make_section_from_shdr and _bfd_elf_make_section_from_phdr respectively.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index 504f735..75f42ed 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -2039,9 +2039,7 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex)
default:
/* Check for any processor-specific section types. */
- if (bed->elf_backend_section_from_shdr)
- (*bed->elf_backend_section_from_shdr) (abfd, hdr, name);
- break;
+ return bed->elf_backend_section_from_shdr (abfd, hdr, name);
}
return TRUE;
@@ -2379,13 +2377,9 @@ bfd_section_from_phdr (bfd *abfd, Elf_Internal_Phdr *hdr, int index)
return _bfd_elf_make_section_from_phdr (abfd, hdr, index, "relro");
default:
- /* Check for any processor-specific program segment types.
- If no handler for them, default to making "segment" sections. */
+ /* Check for any processor-specific program segment types. */
bed = get_elf_backend_data (abfd);
- if (bed->elf_backend_section_from_phdr)
- return (*bed->elf_backend_section_from_phdr) (abfd, hdr, index);
- else
- return _bfd_elf_make_section_from_phdr (abfd, hdr, index, "segment");
+ return bed->elf_backend_section_from_phdr (abfd, hdr, index);
}
}