This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[gold patch obvious] Re: gold in current master doesn't build
- From: Cary Coutant <ccoutant at google dot com>
- To: Andi Kleen <andi at firstfloor dot org>
- Cc: binutils at sourceware dot org
- Date: Thu, 16 Sep 2010 08:49:44 -0700
- Subject: [gold patch obvious] Re: gold in current master doesn't build
- References: <87bp7yq8di.fsf@basil.nowhere.org>
> ../../binutils/gold/script-sections.cc:59:25: error: passing NULL to non-pointer argument 1 of ?std::vector<_Tp, _Alloc>::vector(std::vector::size_type, const value_type&, const allocator_type&) [with _Tp = gold::Output_section_definition*, _Alloc = std::allocator<gold::Output_section_definition*>, std::vector::size_type = long unsigned int, value_type = gold::Output_section_definition*, allocator_type = std::allocator<gold::Output_section_definition*>]
> ../../binutils/gold/script-sections.cc:59:25: error: passing NULL to non-pointer argument 1 of ?std::vector<_Tp, _Alloc>::vector(std::vector::size_type, const value_type&, const allocator_type&) [with _Tp = gold::Output_section_definition*, _Alloc = std::allocator<gold::Output_section_definition*>, std::vector::size_type = long unsigned int, value_type = gold::Output_section_definition*, allocator_type = std::allocator<gold::Output_section_definition*>]
Checking in the following patch as obvious...
-cary
* script_sections.cc (class Memory_region): Remove "NULL" from
vector initializations.
Index: script-sections.cc
===================================================================
RCS file: /cvs/src/src/gold/script-sections.cc,v
retrieving revision 1.41
diff -u -p -r1.41 script-sections.cc
--- script-sections.cc 8 Sep 2010 20:08:14 -0000 1.41
+++ script-sections.cc 16 Sep 2010 15:47:27 -0000
@@ -55,8 +55,8 @@ class Memory_region
length_(length),
current_vma_offset_(0),
current_lma_offset_(0),
- vma_sections_(NULL),
- lma_sections_(NULL)
+ vma_sections_(),
+ lma_sections_()
{ }
// Return the name of this region.