aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorBrendan Kehoe <brendan@cygnus>1992-09-25 22:05:15 +0000
committerBrendan Kehoe <brendan@cygnus>1992-09-25 22:05:15 +0000
commit13ff13438b17902dde9bbc6e73a0b234769a9bd7 (patch)
tree2f636de0db0a5921857d1d02b8c0bf9091a4df27 /bfd/elf.c
parent4959cb7bf9bafb6b8db32f0013709874ddc85104 (diff)
downloadgdb-13ff13438b17902dde9bbc6e73a0b234769a9bd7.zip
gdb-13ff13438b17902dde9bbc6e73a0b234769a9bd7.tar.gz
gdb-13ff13438b17902dde9bbc6e73a0b234769a9bd7.tar.bz2
* elf.c (section_from_elf_index): Return bfd_abs_section, not 0,
since we should never have a NULL section. (elf_slurp_symbol_table): If st_shndx doesn't match any of our tests, set the section to bfd_abs_section.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index 2290f62..75bbb5b 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -425,7 +425,6 @@ DEFUN(bfd_section_from_shdr, (abfd, shindex),
return true;
case SHT_PROGBITS:
- case SHT_BEPROGBITS:
case SHT_NOBITS:
/* Bits that get saved. This one is real. */
if (! hdr->rawdata )
@@ -1861,14 +1860,13 @@ DEFUN (section_from_elf_index, (abfd, index),
{
/* ELF sections that map to BFD sections */
case SHT_PROGBITS:
- case SHT_BEPROGBITS:
case SHT_NOBITS:
if (! hdr->rawdata)
bfd_section_from_shdr (abfd, index);
return (struct sec *)hdr->rawdata;
break;
default:
- return 0;
+ return (struct sec *)&bfd_abs_section;
}
}
@@ -1889,7 +1887,6 @@ DEFUN (elf_section_from_bfd_section, (abfd, asect),
{
/* ELF sections that map to BFD sections */
case SHT_PROGBITS:
- case SHT_BEPROGBITS:
case SHT_NOBITS:
if (hdr->rawdata)
{
@@ -1993,6 +1990,8 @@ how Sun hacked stabs. -- gnu@cygnus.com */
{
sym -> section = &bfd_und_section;
}
+ else
+ sym -> section = &bfd_abs_section;
switch (ELF_ST_BIND (i_sym.st_info))
{