This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [gold patch] Decompress sections in Read_symbols task
- From: Cary Coutant <ccoutant at google dot com>
- To: Cary Coutant <ccoutant at google dot com>, Ian Lance Taylor <iant at google dot com>, Binutils <binutils at sourceware dot org>
- Date: Wed, 29 Feb 2012 23:22:27 -0800
- Subject: Re: [gold patch] Decompress sections in Read_symbols task
- Authentication-results: mr.google.com; spf=pass (google.com: domain of ccoutant@google.com designates 10.236.184.8 as permitted sender) smtp.mail=ccoutant@google.com; dkim=pass header.i=ccoutant@google.com
- References: <CAHACq4pLLaBbqeDVNa-RkBPRUJOwgQX_rXrYB1+P383D0wiOyQ@mail.gmail.com> <mcrty29mljk.fsf@dhcp-172-18-216-180.mtv.corp.google.com> <CAHACq4q6ncp8bBX--oQd3595Yw8kXfuzFejJbWbvVti3iMyn9Q@mail.gmail.com> <20120301025849.GD26055@bubble.grove.modra.org>
> Lacking ENABLE_THREADS leads to
> gold/object.cc:557:1: error: ‘bool gold::need_decompressed_section(const char*)’ defined but not used [-Werror=unused-function]
> cc1plus: all warnings being treated as errors
Arg, sorry. Fixed with the following patch...
-cary
* object.cc (need_decompressed_section): Add #ifdef ENABLE_THREADS.
Index: object.cc
===================================================================
RCS file: /cvs/src/src/gold/object.cc,v
retrieving revision 1.152
diff -u -p -r1.152 object.cc
--- object.cc 29 Feb 2012 21:22:29 -0000 1.152
+++ object.cc 1 Mar 2012 07:20:23 -0000
@@ -550,6 +550,8 @@ Sized_relobj_file<size, big_endian>::fin
return false;
}
+#ifdef ENABLE_THREADS
+
// Return TRUE if this is a section whose contents will be needed in the
// Add_symbols task.
@@ -564,6 +566,8 @@ need_decompressed_section(const char* na
return false;
}
+#endif
+
// Build a table for any compressed debug sections, mapping each section index
// to the uncompressed size and (if needed) the decompressed contents.