2009-12-28 Chris Demetriou <cgd@google.com>
authorChris Demetriou <cgd@google.com>
Tue, 29 Dec 2009 06:09:03 +0000 (06:09 +0000)
committerChris Demetriou <cgd@google.com>
Tue, 29 Dec 2009 06:09:03 +0000 (06:09 +0000)
        * attributes.cc (Output_attributes_section_data::do_write): Use
        std::vector::front rather than std::vector::data.

gold/ChangeLog
gold/attributes.cc

index ed7f31d7680987a70d0acceb78068fa33781e672..345ec626695af437b4c48606bb503738ea63646d 100644 (file)
@@ -1,3 +1,8 @@
+2009-12-28  Chris Demetriou  <cgd@google.com>
+
+       * attributes.cc (Output_attributes_section_data::do_write): Use
+       std::vector::front rather than std::vector::data.
+
 2009-12-28  Ian Lance Taylor  <iant@google.com>
 
        * symtab.h (class Symbol_table): Add enum Defined.
index 6b2260d7b94b164410cb034a2d19d875f78c893a..2024fda62966168e744d164ac1672e482c3f7cf0 100644 (file)
@@ -451,7 +451,7 @@ Output_attributes_section_data::do_write(Output_file* of)
   std::vector<unsigned char> buffer;
   this->attributes_section_data_.write(&buffer);
   gold_assert(convert_to_section_size_type(buffer.size()) == oview_size);
-  memcpy(oview, buffer.data(), buffer.size());
+  memcpy(oview, &buffer.front(), buffer.size());
   of->write_output_view(this->offset(), oview_size, oview);
 }