This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
bfd: let errors in elf_backend_fake_sections through
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: binutils at sources dot redhat dot com
- Date: 08 Jan 2002 14:42:33 -0200
- Subject: bfd: let errors in elf_backend_fake_sections through
- Organization: GCC Team, Red Hat
Errors in elf_backend_fake_sections wouldn't be propagated back to the
upper levels, so the linker might terminate successfully in spite of
errors reported in it. This patch fixes this problem. It was
approved in private by Nick Clifton, so I'm checking it in.
Index: bfd/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* elf.c (elf_fake_sections): Propagate errors from
elf_backend_fake_section.
Index: bfd/elf.c
===================================================================
RCS file: /cvs/src/src/bfd/elf.c,v
retrieving revision 1.117
diff -u -p -r1.117 elf.c
--- bfd/elf.c 2001/12/19 05:16:47 1.117
+++ bfd/elf.c 2002/01/08 16:42:12
@@ -1,5 +1,5 @@
/* ELF executable support for BFD.
- Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -2213,8 +2213,9 @@ elf_fake_sections (abfd, asect, failedpt
this_hdr->sh_flags |= SHF_GROUP;
/* Check for processor-specific section types. */
- if (bed->elf_backend_fake_sections)
- (*bed->elf_backend_fake_sections) (abfd, this_hdr, asect);
+ if (bed->elf_backend_fake_sections
+ && !(*bed->elf_backend_fake_sections) (abfd, this_hdr, asect))
+ *failedptr = true;
/* If the section has relocs, set up a section header for the
SHT_REL[A] section. If two relocation sections are required for
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me