* object.cc (Sized_relobj::do_layout): Don't get confused if
authorIan Lance Taylor <ian@airs.com>
Fri, 8 Jan 2010 22:34:34 +0000 (22:34 +0000)
committerIan Lance Taylor <ian@airs.com>
Fri, 8 Jan 2010 22:34:34 +0000 (22:34 +0000)
layout_eh_frame returns NULL.

gold/ChangeLog
gold/object.cc

index cf0707d4b10109dac086daf2970ffc57707e9a6f..c14bcfb22a09d78ab1fc05bc4f16fcbef8020ca3 100644 (file)
@@ -1,3 +1,8 @@
+2010-01-08  Ian Lance Taylor  <iant@google.com>
+
+       * object.cc (Sized_relobj::do_layout): Don't get confused if
+       layout_eh_frame returns NULL.
+
 2010-01-08  Ian Lance Taylor  <iant@google.com>
 
        PR 11084
index a6ec76f08d001a321ee3a18fa29bd1fd4f7062e6..1b903368f308bd83e7c157cd5aea1710983c4b09 100644 (file)
@@ -1390,7 +1390,7 @@ Sized_relobj<size, big_endian>::do_layout(Symbol_table* symtab,
                                                   reloc_type[i],
                                                   &offset);
       out_sections[i] = os;
-      if (offset == -1)
+      if (os == NULL || offset == -1)
        {
          // An object can contain at most one section holding exception
          // frame information.
@@ -1404,7 +1404,7 @@ Sized_relobj<size, big_endian>::do_layout(Symbol_table* symtab,
       // If this section requires special handling, and if there are
       // relocs that apply to it, then we must do the special handling
       // before we apply the relocs.
-      if (offset == -1 && reloc_shndx[i] != 0)
+      if (os != NULL && offset == -1 && reloc_shndx[i] != 0)
        this->set_relocs_must_follow_section_writes();
     }
 
This page took 0.031051 seconds and 4 git commands to generate.