* arm.cc (Target_arm::do_finalize_sections): Create attribute
section if it does not already exist. * attributes.cc (Attributes_section_data::Attributes_section_data): Don't crash if size is zero.
This commit is contained in:
parent
135b9c78b2
commit
ca419a6f33
@ -1,3 +1,10 @@
|
|||||||
|
2010-02-23 Viktor Kutuzov <vkutuzov@accesssoftek.com>
|
||||||
|
|
||||||
|
* arm.cc (Target_arm::do_finalize_sections): Create attribute
|
||||||
|
section if it does not already exist.
|
||||||
|
* attributes.cc (Attributes_section_data::Attributes_section_data):
|
||||||
|
Don't crash if size is zero.
|
||||||
|
|
||||||
2010-02-23 Viktor Kutuzov <vkutuzov@accesssoftek.com>
|
2010-02-23 Viktor Kutuzov <vkutuzov@accesssoftek.com>
|
||||||
Ian Lance Taylor <iant@google.com>
|
Ian Lance Taylor <iant@google.com>
|
||||||
|
|
||||||
|
@ -7554,6 +7554,11 @@ Target_arm<big_endian>::do_finalize_sections(
|
|||||||
const Input_objects* input_objects,
|
const Input_objects* input_objects,
|
||||||
Symbol_table* symtab)
|
Symbol_table* symtab)
|
||||||
{
|
{
|
||||||
|
// Create an empty uninitialized attribute section if we still don't have it
|
||||||
|
// at this moment.
|
||||||
|
if (this->attributes_section_data_ == NULL)
|
||||||
|
this->attributes_section_data_ = new Attributes_section_data(NULL, 0);
|
||||||
|
|
||||||
// Merge processor-specific flags.
|
// Merge processor-specific flags.
|
||||||
for (Input_objects::Relobj_iterator p = input_objects->relobj_begin();
|
for (Input_objects::Relobj_iterator p = input_objects->relobj_begin();
|
||||||
p != input_objects->relobj_end();
|
p != input_objects->relobj_end();
|
||||||
|
@ -278,7 +278,7 @@ Attributes_section_data::Attributes_section_data(
|
|||||||
|
|
||||||
const unsigned char *p = view;
|
const unsigned char *p = view;
|
||||||
p = view;
|
p = view;
|
||||||
if (*(p++) == 'A')
|
if (size > 0 && p != NULL && *(p++) == 'A')
|
||||||
{
|
{
|
||||||
size--;
|
size--;
|
||||||
while (size > 0)
|
while (size > 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user