diff options
author | Ian Lance Taylor <ian@airs.com> | 2010-01-08 22:34:34 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 2010-01-08 22:34:34 +0000 |
commit | 339d40a3d9fe82620382abe4a4b3565d681aea11 (patch) | |
tree | da608006ec63c29b7788ef8981e83297fae76669 | |
parent | abecea76bce25362c9b81d40df7d2f58ee9dc76b (diff) | |
download | gdb-339d40a3d9fe82620382abe4a4b3565d681aea11.zip gdb-339d40a3d9fe82620382abe4a4b3565d681aea11.tar.gz gdb-339d40a3d9fe82620382abe4a4b3565d681aea11.tar.bz2 |
* object.cc (Sized_relobj::do_layout): Don't get confused if
layout_eh_frame returns NULL.
-rw-r--r-- | gold/ChangeLog | 5 | ||||
-rw-r--r-- | gold/object.cc | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog index cf0707d..c14bcfb 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,5 +1,10 @@ 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 * dynobj.cc (Sized_dynobj::find_dynsym_sections): If there is no dynamic symbol table, use the normal symbol table. diff --git a/gold/object.cc b/gold/object.cc index a6ec76f..1b90336 100644 --- a/gold/object.cc +++ b/gold/object.cc @@ -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(); } |