aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfcode.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1994-06-06 23:59:27 +0000
committerIan Lance Taylor <ian@airs.com>1994-06-06 23:59:27 +0000
commite6667b2bc37c1df46d1f208abadedd01f3e56143 (patch)
tree2d98d359c3a2b9eb865a4c7a07230dd87baa88b6 /bfd/elfcode.h
parent0a7674cccb3ef9321346eea2ccd144c3e73283ce (diff)
downloadgdb-e6667b2bc37c1df46d1f208abadedd01f3e56143.zip
gdb-e6667b2bc37c1df46d1f208abadedd01f3e56143.tar.gz
gdb-e6667b2bc37c1df46d1f208abadedd01f3e56143.tar.bz2
* elfcode.h (bfd_section_from_shdr): Don't turn a reloc section
into a BFD section just because SHF_ALLOC is set; require that it not use the normal symbol table. (elf_section_from_bfd_section): Corresponding change.
Diffstat (limited to 'bfd/elfcode.h')
-rw-r--r--bfd/elfcode.h18
1 files changed, 7 insertions, 11 deletions
diff --git a/bfd/elfcode.h b/bfd/elfcode.h
index 28befbd..0181a55 100644
--- a/bfd/elfcode.h
+++ b/bfd/elfcode.h
@@ -616,13 +616,11 @@ bfd_section_from_shdr (abfd, shindex)
if (! bfd_section_from_shdr (abfd, hdr->sh_link))
return false;
- /* If this reloc section does not use the main symbol table,
- or if it is in the process image, we don't treat it as a
- reloc section. BFD can't adequately represent such a
- section, so at least for now, we don't try. We just
- present it as a normal section. */
- if ((hdr->sh_flags & SHF_ALLOC) != 0
- || hdr->sh_link != elf_onesymtab (abfd))
+ /* If this reloc section does not use the main symbol table we
+ don't treat it as a reloc section. BFD can't adequately
+ represent such a section, so at least for now, we don't
+ try. We just present it as a normal section. */
+ if (hdr->sh_link != elf_onesymtab (abfd))
return _bfd_elf_make_section_from_shdr (abfd, hdr, name);
/* Don't allow REL relocations on a machine that uses RELA and
@@ -1267,8 +1265,7 @@ elf_fake_sections (abfd, asect, ignore)
/* Assign all ELF section numbers. The dummy first section is handled here
too. The link/info pointers for the standard section types are filled
- in here too, while we're at it. (Link pointers for .stab sections are
- not filled in here.) */
+ in here too, while we're at it. */
static boolean
assign_section_numbers (abfd)
@@ -2581,8 +2578,7 @@ elf_section_from_bfd_section (abfd, asect)
case SHT_REL:
case SHT_RELA:
/* We sometimes map a reloc section to a BFD section. */
- if (((hdr->sh_flags & SHF_ALLOC) != 0
- || hdr->sh_link != elf_onesymtab (abfd))
+ if (hdr->sh_link != elf_onesymtab (abfd)
&& (asection *) hdr->rawdata == asect)
return index;
break;