summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2010-11-03 14:07:49 +0000
committerIan Lance Taylor <ian@airs.com>2010-11-03 14:07:49 +0000
commit3f9a327892c097ae5504004c6a11f7468df16c08 (patch)
tree90091128476f84bab9a10334e87feb1dc9aaca14
parent120bd36024971107c9f5dce6882e343c836a6402 (diff)
downloadbinutils-gdb-3f9a327892c097ae5504004c6a11f7468df16c08.tar.gz
* script-sections.cc (Script_sections::find_memory_region): Check
for a NULL output section pointer.
-rw-r--r--gold/ChangeLog5
-rw-r--r--gold/script-sections.cc1
2 files changed, 6 insertions, 0 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog
index ad1bd1972b8..caae10c3e20 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -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
diff --git a/gold/script-sections.cc b/gold/script-sections.cc
index 57e5279dd2a..487cc24bc98 100644
--- a/gold/script-sections.cc
+++ b/gold/script-sections.cc
@@ -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;