This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: link script updates for .jcr
On Mon, Aug 13, 2001 at 08:17:38PM +0930, Alan Modra wrote:
>
> * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Return
> `true' for SEC_EXCLUDE sections so that the generic code doesn't
> needlessly create an output_section_statement. Treat a correctly
> named output_section_statement with NULL bfd_section as compatible.
Oops, better do this too, otherwise we get segfaults.
* emultempl/elf32.em: For SEC_EXCLUDE sections, ensure that
output_section is set non-NULL.
--
Alan Modra
Index: ld/emultempl/elf32.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/elf32.em,v
retrieving revision 1.54
diff -u -p -r1.54 elf32.em
--- elf32.em 2001/08/13 10:56:21 1.54
+++ elf32.em 2001/08/13 14:25:40
@@ -1113,7 +1113,11 @@ gld${EMULATION_NAME}_place_orphan (file,
(hold.os != NULL || (hold.os = lang_output_section_find (name)) != NULL)
if (s->flags & SEC_EXCLUDE)
- return true;
+ {
+ if (s->output_section == NULL)
+ s->output_section = bfd_abs_section_ptr;
+ return true;
+ }
place = NULL;
if ((s->flags & SEC_ALLOC) == 0)