* script-sections.cc (Script_sections::find_memory_region): Check
authorIan Lance Taylor <ian@airs.com>
Wed, 3 Nov 2010 14:07:49 +0000 (14:07 +0000)
committerIan Lance Taylor <ian@airs.com>
Wed, 3 Nov 2010 14:07:49 +0000 (14:07 +0000)
for a NULL output section pointer.

gold/ChangeLog
gold/script-sections.cc

index ad1bd1972b82a69adc1e8b78cafa2ef68830620b..caae10c3e20332ad50c647a4663a6e112de6ee04 100644 (file)
@@ -1,3 +1,8 @@
+2010-11-03  Ryan Mansfield  <rmansfield@qnx.com>
+
+       * script-sections.cc (Script_sections::find_memory_region): Check
+       for a NULL output section pointer.
+
 2010-10-29  Doug Kwan  <dougkwan@google.com>
 
        * arm.cc (Arm_outout_section::fix_exidx_coverage): Adjust call to
index 57e5279dd2a1bb4c73e8f4be8ea742ca8bc3e56f..487cc24bc98b0d18ce783b7fb1d9f1b7c94b50af 100644 (file)
@@ -2238,6 +2238,7 @@ Script_sections::find_memory_region(
       // explicit region assignment, then we will return this region.
       Output_section* out_sec = section->get_output_section();
       if (first_match == NULL
+         && out_sec != NULL
          && (*mr)->attributes_compatible(out_sec->flags(),
                                          out_sec->type()))
        first_match = *mr;