]> git.pld-linux.org Git - packages/binutils.git/blob - binutils-pr437.patch
- ld core dumps on bad flags from gcc fixed (PR453/437).
[packages/binutils.git] / binutils-pr437.patch
1 ===================================================================
2 RCS file: /cvs/src/src/bfd/elflink.c,v
3 retrieving revision 1.105
4 retrieving revision 1.106
5 diff -u -r1.105 -r1.106
6 --- src/bfd/elflink.c   2004/10/07 14:45:24     1.105
7 +++ src/bfd/elflink.c   2004/10/11 01:13:10     1.106
8 @@ -629,8 +629,7 @@
9           bfd *dynobj = elf_hash_table (info)->dynobj;
10  
11           if (dynobj != NULL
12 -             && (ip = bfd_get_section_by_name (dynobj, p->name))
13 -             != NULL
14 +             && (ip = bfd_get_section_by_name (dynobj, p->name)) != NULL
15               && (ip->flags & SEC_LINKER_CREATED)
16               && ip->output_section == p)
17             return TRUE;
18 @@ -5712,6 +5711,14 @@
19         bfd_byte *erel, *erelend;
20         asection *o = lo->u.indirect.section;
21  
22 +       if (o->contents == NULL && o->size != 0)
23 +         {
24 +           /* This is a reloc section that is being handled as a normal
25 +              section.  See bfd_section_from_shdr.  We can't combine
26 +              relocs in this case.  */
27 +           free (sort);
28 +           return 0;
29 +         }
30         erel = o->contents;
31         erelend = o->contents + o->size;
32         p = sort + o->output_offset / ext_size * sort_elt;
This page took 0.028747 seconds and 3 git commands to generate.