From caa83f8b08be81c0f5a93fd8beee392eeac826bc Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Mon, 28 Sep 2009 09:45:33 +0000 Subject: PR 10478 * elf.c (bfd_section_from_shdr): Allow SHN_BEFORE and SHN_AFTER section link values in x86 binaries. * elfcode.h (elf_object_p): Likewise. * readelf.c (get_elf_section_flags): Allow SHN_BEFORE and SHN_AFTER section link values in x86 binaries. (process_section_headers): Likewise. --- bfd/elfcode.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'bfd/elfcode.h') diff --git a/bfd/elfcode.h b/bfd/elfcode.h index f539119..ecdc2de 100644 --- a/bfd/elfcode.h +++ b/bfd/elfcode.h @@ -761,10 +761,13 @@ elf_object_p (bfd *abfd) /* Sanity check sh_link and sh_info. */ if (i_shdrp[shindex].sh_link >= num_sec) { - /* PR 10478: Accept sparc binaries with a sh_link + /* PR 10478: Accept Solaris binaries with a sh_link field set to SHN_BEFORE or SHN_AFTER. */ switch (ebd->elf_machine_code) { + case EM_386: + case EM_486: + case EM_X86_64: case EM_OLD_SPARCV9: case EM_SPARC32PLUS: case EM_SPARCV9: -- cgit v1.1