aboutsummaryrefslogtreecommitdiff
path: root/gold
diff options
context:
space:
mode:
Diffstat (limited to 'gold')
-rw-r--r--gold/ChangeLog21
-rw-r--r--gold/archive.cc5
-rw-r--r--gold/archive.h2
-rw-r--r--gold/arm.cc6
-rw-r--r--gold/dwarf_reader.h11
-rw-r--r--gold/i386.cc4
-rw-r--r--gold/icf.h9
-rw-r--r--gold/incremental.h14
-rw-r--r--gold/layout.h5
-rw-r--r--gold/plugin.h9
-rw-r--r--gold/powerpc.cc6
-rw-r--r--gold/readsyms.h27
-rw-r--r--gold/sparc.cc4
-rw-r--r--gold/tilegx.cc4
-rw-r--r--gold/x86_64.cc4
15 files changed, 60 insertions, 71 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog
index ecb2bd5..e79588d 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,5 +1,26 @@
2013-10-11 Roland McGrath <mcgrathr@google.com>
+ * i386.cc (Target_i386): Remove unused member dynbss_.
+ * arm.cc (Target_arm): Likewise.
+ * powerpc.cc (Target_powerpc): Likewise.
+ * sparc.cc (Target_sparc): Likewise.
+ * tilegx.cc (Target_tilegx): Likewise.
+ * x86_64.cc (Target_x86_64): Likewise.
+ * dwarf_reader.h (Dwarf_info_reader): Remove unused members
+ type_signature_, type_offset_.
+ * plugin.h (Plugin_hook): Remove unused member layout_.
+ * readsyms.h (Add_symbols): Remove unused members dirpath_, dirindex_,
+ mapfile_.
+ (Read_member): Remove unused members input_objects_, symtab_,
+ mapfile_, layout_.
+ (Check_library): Remove unused member symtab_.
+ * archive.h (Lib_group): Remove unused member lib_.
+ * archive.cc (Lib_group::Lib_group): Update initializer.
+ * incremental.h (Incremental_binary): Remove unused member target_.
+ (Incremental_script_entry): Removed unused member script_.
+ * layout.h (Write_symbols_task): Remove unused member input_objects_.
+ * icf.h (Icf): Remove unused member num_tracked_relocs.
+
* gold-threads.h (Once): Conditionalize member was_run_lock_ on
[ENABLE_THREADS && __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4], matching
its only use.
diff --git a/gold/archive.cc b/gold/archive.cc
index f2cd848..53d88a2 100644
--- a/gold/archive.cc
+++ b/gold/archive.cc
@@ -1,6 +1,7 @@
// archive.cc -- archive support for gold
-// Copyright 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+// Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2013
+// Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
// This file is part of gold.
@@ -1130,7 +1131,7 @@ unsigned int Lib_group::total_members;
unsigned int Lib_group::total_members_loaded;
Lib_group::Lib_group(const Input_file_lib* lib, Task* task)
- : Library_base(task), lib_(lib), members_()
+ : Library_base(task), members_()
{
this->members_.resize(lib->size());
}
diff --git a/gold/archive.h b/gold/archive.h
index a47b423..3d75de6 100644
--- a/gold/archive.h
+++ b/gold/archive.h
@@ -511,8 +511,6 @@ class Lib_group : public Library_base
void
do_for_all_unused_symbols(Symbol_visitor_base*) const;
- // For reading the files.
- const Input_file_lib* lib_;
// Table of the objects in the group.
std::vector<Archive_member> members_;
};
diff --git a/gold/arm.cc b/gold/arm.cc
index ddf928b..560f380 100644
--- a/gold/arm.cc
+++ b/gold/arm.cc
@@ -2120,7 +2120,7 @@ class Target_arm : public Sized_target<32, big_endian>
Target_arm(const Target::Target_info* info = &arm_info)
: Sized_target<32, big_endian>(info),
got_(NULL), plt_(NULL), got_plt_(NULL), rel_dyn_(NULL),
- copy_relocs_(elfcpp::R_ARM_COPY), dynbss_(NULL),
+ copy_relocs_(elfcpp::R_ARM_COPY),
got_mod_index_offset_(-1U), tls_base_symbol_defined_(false),
stub_tables_(), stub_factory_(Stub_factory::get_instance()),
should_force_pic_veneer_(false),
@@ -2907,8 +2907,6 @@ class Target_arm : public Sized_target<32, big_endian>
Reloc_section* rel_dyn_;
// Relocs saved to avoid a COPY reloc.
Copy_relocs<elfcpp::SHT_REL, 32, big_endian> copy_relocs_;
- // Space for variables copied with a COPY reloc.
- Output_data_space* dynbss_;
// Offset of the GOT entry for the TLS module index.
unsigned int got_mod_index_offset_;
// True if the _TLS_MODULE_BASE_ symbol has been defined.
@@ -10829,7 +10827,7 @@ Target_arm<big_endian>::merge_object_attributes(
// Do nothing.
}
else if (attributes_forbid_div(&in_attr[i])
- && !attributes_accept_div(arch, profile, &out_attr[i]))
+ && !attributes_accept_div(arch, profile, &out_attr[i]))
out_attr[i].set_int_value(1);
else if (attributes_forbid_div(&out_attr[i])
&& attributes_accept_div(arch, profile, &in_attr[i]))
diff --git a/gold/dwarf_reader.h b/gold/dwarf_reader.h
index a2cd374..86d80bb 100644
--- a/gold/dwarf_reader.h
+++ b/gold/dwarf_reader.h
@@ -1,6 +1,7 @@
// dwarf_reader.h -- parse dwarf2/3 debug information for gold -*- C++ -*-
-// Copyright 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+// Copyright 2007, 2008, 2009, 2010, 2011, 2012, 2013
+// Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
// This file is part of gold.
@@ -697,8 +698,8 @@ class Dwarf_info_reader
symtab_size_(symtab_size), shndx_(shndx), reloc_shndx_(reloc_shndx),
reloc_type_(reloc_type), abbrev_shndx_(0), string_shndx_(0),
buffer_(NULL), buffer_end_(NULL), cu_offset_(0), cu_length_(0),
- offset_size_(0), address_size_(0), cu_version_(0), type_signature_(0),
- type_offset_(0), abbrev_table_(), ranges_table_(this),
+ offset_size_(0), address_size_(0), cu_version_(0),
+ abbrev_table_(), ranges_table_(this),
reloc_mapper_(NULL), string_buffer_(NULL), string_buffer_end_(NULL),
owns_string_buffer_(false), string_output_section_offset_(0)
{ }
@@ -895,10 +896,6 @@ class Dwarf_info_reader
unsigned int address_size_;
// Compilation unit version number.
unsigned int cu_version_;
- // Type signature (for a type unit).
- uint64_t type_signature_;
- // Offset from the type unit header to the type DIE (for a type unit).
- off_t type_offset_;
// Abbreviations table for current compilation unit.
Dwarf_abbrev_table abbrev_table_;
// Ranges table for the current compilation unit.
diff --git a/gold/i386.cc b/gold/i386.cc
index 6dceca5..6a3280d 100644
--- a/gold/i386.cc
+++ b/gold/i386.cc
@@ -337,7 +337,7 @@ class Target_i386 : public Sized_target<32, false>
: Sized_target<32, false>(info),
got_(NULL), plt_(NULL), got_plt_(NULL), got_irelative_(NULL),
got_tlsdesc_(NULL), global_offset_table_(NULL), rel_dyn_(NULL),
- rel_irelative_(NULL), copy_relocs_(elfcpp::R_386_COPY), dynbss_(NULL),
+ rel_irelative_(NULL), copy_relocs_(elfcpp::R_386_COPY),
got_mod_index_offset_(-1U), tls_base_symbol_defined_(false)
{ }
@@ -827,8 +827,6 @@ class Target_i386 : public Sized_target<32, false>
Reloc_section* rel_irelative_;
// Relocs saved to avoid a COPY reloc.
Copy_relocs<elfcpp::SHT_REL, 32, false> copy_relocs_;
- // Space for variables copied with a COPY reloc.
- Output_data_space* dynbss_;
// Offset of the GOT entry for the TLS module index.
unsigned int got_mod_index_offset_;
// True if the _TLS_MODULE_BASE_ symbol has been defined.
diff --git a/gold/icf.h b/gold/icf.h
index f158137..df6bc01 100644
--- a/gold/icf.h
+++ b/gold/icf.h
@@ -1,6 +1,6 @@
// icf.h -- Identical Code Folding
-// Copyright 2009, 2010 Free Software Foundation, Inc.
+// Copyright 2009, 2010, 2013 Free Software Foundation, Inc.
// Written by Sriraman Tallam <tmsriram@google.com>.
// This file is part of gold.
@@ -67,7 +67,7 @@ class Icf
Icf()
: id_section_(), section_id_(), kept_section_id_(),
fptr_section_id_(),
- num_tracked_relocs(NULL), icf_ready_(false),
+ icf_ready_(false),
reloc_info_list_()
{ }
@@ -97,7 +97,7 @@ class Icf
void
unfold_section(Object* obj, unsigned int shndx);
- // Returns the kept section corresponding to the
+ // Returns the kept section corresponding to the
// given section.
bool
is_section_folded(Object* obj, unsigned int shndx);
@@ -136,7 +136,7 @@ class Icf
Reloc_info_list&
reloc_info_list()
{ return this->reloc_info_list_; }
-
+
// Returns a mapping of each section to a unique integer.
Uniq_secn_id_map&
section_to_int_map()
@@ -156,7 +156,6 @@ class Icf
// function is taken in which case it is dangerous to fold
// this function.
Secn_fptr_taken_set fptr_section_id_;
- unsigned int* num_tracked_relocs;
// Flag to indicate if ICF has been run.
bool icf_ready_;
// This list is populated by gc_process_relocs in gc.h.
diff --git a/gold/incremental.h b/gold/incremental.h
index 76d05af..77803fc 100644
--- a/gold/incremental.h
+++ b/gold/incremental.h
@@ -1,6 +1,6 @@
// inremental.h -- incremental linking support for gold -*- C++ -*-
-// Copyright 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+// Copyright 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
// Written by Mikolaj Zalewski <mikolajz@google.com>.
// This file is part of gold.
@@ -304,10 +304,10 @@ class Incremental_script_entry : public Incremental_input_entry
{
public:
Incremental_script_entry(Stringpool::Key filename_key,
- unsigned int arg_serial, Script_info* script,
+ unsigned int arg_serial, Script_info* /*script*/,
Timespec mtime)
: Incremental_input_entry(filename_key, arg_serial, mtime),
- script_(script), objects_()
+ objects_()
{ }
// Add a member object to the archive.
@@ -341,8 +341,6 @@ class Incremental_script_entry : public Incremental_input_entry
{ return this; }
private:
- // Information about the script file.
- Script_info* script_;
// Objects that have been included by this script.
std::vector<Incremental_input_entry*> objects_;
};
@@ -1342,9 +1340,9 @@ class Incremental_got_plt_reader
class Incremental_binary
{
public:
- Incremental_binary(Output_file* output, Target* target)
+ Incremental_binary(Output_file* output, Target* /*target*/)
: input_args_map_(), library_map_(), script_map_(),
- output_(output), target_(target)
+ output_(output)
{ }
virtual
@@ -1582,8 +1580,6 @@ class Incremental_binary
private:
// Edited output file object.
Output_file* output_;
- // Target of the output file.
- Target* target_;
};
template<int size, bool big_endian>
diff --git a/gold/layout.h b/gold/layout.h
index f49ae24..792b748 100644
--- a/gold/layout.h
+++ b/gold/layout.h
@@ -1524,10 +1524,10 @@ class Write_symbols_task : public Task
{
public:
Write_symbols_task(const Layout* layout, const Symbol_table* symtab,
- const Input_objects* input_objects,
+ const Input_objects* /*input_objects*/,
const Stringpool* sympool, const Stringpool* dynpool,
Output_file* of, Task_token* final_blocker)
- : layout_(layout), symtab_(symtab), input_objects_(input_objects),
+ : layout_(layout), symtab_(symtab),
sympool_(sympool), dynpool_(dynpool), of_(of),
final_blocker_(final_blocker)
{ }
@@ -1550,7 +1550,6 @@ class Write_symbols_task : public Task
private:
const Layout* layout_;
const Symbol_table* symtab_;
- const Input_objects* input_objects_;
const Stringpool* sympool_;
const Stringpool* dynpool_;
Output_file* of_;
diff --git a/gold/plugin.h b/gold/plugin.h
index 1891d6b..e4289ff 100644
--- a/gold/plugin.h
+++ b/gold/plugin.h
@@ -1,6 +1,6 @@
// plugin.h -- plugin manager for gold -*- C++ -*-
-// Copyright 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+// Copyright 2008, 2009, 2010, 2011, 2013 Free Software Foundation, Inc.
// Written by Cary Coutant <ccoutant@google.com>.
// This file is part of gold.
@@ -433,7 +433,7 @@ class Pluginobj : public Object
// The number of symbols provided by the plugin.
int nsyms_;
-
+
// The symbols provided by the plugin.
const struct ld_plugin_symbol* syms_;
@@ -554,11 +554,11 @@ class Plugin_hook : public Task
{
public:
Plugin_hook(const General_options& options, Input_objects* input_objects,
- Symbol_table* symtab, Layout* layout, Dirsearch* dirpath,
+ Symbol_table* symtab, Layout* /*layout*/, Dirsearch* dirpath,
Mapfile* mapfile, Task_token* this_blocker,
Task_token* next_blocker)
: options_(options), input_objects_(input_objects), symtab_(symtab),
- layout_(layout), dirpath_(dirpath), mapfile_(mapfile),
+ dirpath_(dirpath), mapfile_(mapfile),
this_blocker_(this_blocker), next_blocker_(next_blocker)
{ }
@@ -583,7 +583,6 @@ class Plugin_hook : public Task
const General_options& options_;
Input_objects* input_objects_;
Symbol_table* symtab_;
- Layout* layout_;
Dirsearch* dirpath_;
Mapfile* mapfile_;
Task_token* this_blocker_;
diff --git a/gold/powerpc.cc b/gold/powerpc.cc
index 1afe01c..9d12787 100644
--- a/gold/powerpc.cc
+++ b/gold/powerpc.cc
@@ -443,7 +443,7 @@ class Target_powerpc : public Sized_target<size, big_endian>
: Sized_target<size, big_endian>(&powerpc_info),
got_(NULL), plt_(NULL), iplt_(NULL), brlt_section_(NULL),
glink_(NULL), rela_dyn_(NULL), copy_relocs_(elfcpp::R_POWERPC_COPY),
- dynbss_(NULL), tlsld_got_offset_(-1U),
+ tlsld_got_offset_(-1U),
stub_tables_(), branch_lookup_table_(), branch_info_(),
plt_thread_safe_(false)
{
@@ -1181,8 +1181,6 @@ class Target_powerpc : public Sized_target<size, big_endian>
Reloc_section* rela_dyn_;
// Relocs saved to avoid a COPY reloc.
Copy_relocs<elfcpp::SHT_RELA, size, big_endian> copy_relocs_;
- // Space for variables copied with a COPY reloc.
- Output_data_space* dynbss_;
// Offset of the GOT entry for local dynamic __tls_get_addr calls.
unsigned int tlsld_got_offset_;
@@ -2510,7 +2508,7 @@ Target_powerpc<size, big_endian>::do_relax(int pass,
"GOMP_parallel_loop_dynamic_start",
"GOMP_parallel_loop_guided_start",
"GOMP_parallel_loop_runtime_start",
- "GOMP_parallel_sections_start",
+ "GOMP_parallel_sections_start",
};
if (parameters->options().shared())
diff --git a/gold/readsyms.h b/gold/readsyms.h
index c1e908c..99b2b16 100644
--- a/gold/readsyms.h
+++ b/gold/readsyms.h
@@ -1,6 +1,7 @@
// readsyms.h -- read input file symbols for gold -*- C++ -*-
-// Copyright 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+// Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2013
+// Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
// This file is part of gold.
@@ -137,13 +138,12 @@ class Add_symbols : public Task
// one for the previous input file. NEXT_BLOCKER is used to prevent
// the next task from running.
Add_symbols(Input_objects* input_objects, Symbol_table* symtab,
- Layout* layout, Dirsearch* dirpath, int dirindex,
- Mapfile* mapfile, const Input_argument* input_argument,
+ Layout* layout, Dirsearch* /*dirpath*/, int /*dirindex*/,
+ Mapfile* /*mapfile*/, const Input_argument* input_argument,
Object* object, Incremental_library* library,
Read_symbols_data* sd, Task_token* this_blocker,
Task_token* next_blocker)
: input_objects_(input_objects), symtab_(symtab), layout_(layout),
- dirpath_(dirpath), dirindex_(dirindex), mapfile_(mapfile),
input_argument_(input_argument), object_(object), library_(library),
sd_(sd), this_blocker_(this_blocker), next_blocker_(next_blocker)
{ }
@@ -169,9 +169,6 @@ private:
Input_objects* input_objects_;
Symbol_table* symtab_;
Layout* layout_;
- Dirsearch* dirpath_;
- int dirindex_;
- Mapfile* mapfile_;
const Input_argument* input_argument_;
Object* object_;
Incremental_library* library_;
@@ -192,12 +189,11 @@ class Read_member : public Task
// one has completed; it will be NULL for the first task.
// NEXT_BLOCKER is used to block the next input file from adding
// symbols.
- Read_member(Input_objects* input_objects, Symbol_table* symtab,
- Layout* layout, Mapfile* mapfile,
+ Read_member(Input_objects* /*input_objects*/, Symbol_table* /*symtab*/,
+ Layout* /*layout*/, Mapfile* /*mapfile*/,
const Incremental_binary::Input_reader* input_reader,
Task_token* this_blocker, Task_token* next_blocker)
- : input_objects_(input_objects), symtab_(symtab), layout_(layout),
- mapfile_(mapfile), input_reader_(input_reader),
+ : input_reader_(input_reader),
this_blocker_(this_blocker), next_blocker_(next_blocker)
{ }
@@ -221,10 +217,6 @@ class Read_member : public Task
}
private:
- Input_objects* input_objects_;
- Symbol_table* symtab_;
- Layout* layout_;
- Mapfile* mapfile_;
const Incremental_binary::Input_reader* input_reader_;
Task_token* this_blocker_;
Task_token* next_blocker_;
@@ -282,12 +274,12 @@ class Check_script : public Task
class Check_library : public Task
{
public:
- Check_library(Symbol_table* symtab, Layout* layout,
+ Check_library(Symbol_table* /*symtab*/, Layout* layout,
Incremental_binary* ibase,
unsigned int input_file_index,
const Incremental_binary::Input_reader* input_reader,
Task_token* this_blocker, Task_token* next_blocker)
- : layout_(layout), symtab_(symtab), ibase_(ibase),
+ : layout_(layout), ibase_(ibase),
input_file_index_(input_file_index), input_reader_(input_reader),
this_blocker_(this_blocker), next_blocker_(next_blocker)
{ }
@@ -313,7 +305,6 @@ class Check_library : public Task
private:
Layout* layout_;
- Symbol_table* symtab_;
Incremental_binary* ibase_;
unsigned int input_file_index_;
const Incremental_binary::Input_reader* input_reader_;
diff --git a/gold/sparc.cc b/gold/sparc.cc
index 2af09ae..57659cc 100644
--- a/gold/sparc.cc
+++ b/gold/sparc.cc
@@ -59,7 +59,7 @@ class Target_sparc : public Sized_target<size, big_endian>
Target_sparc()
: Sized_target<size, big_endian>(&sparc_info),
got_(NULL), plt_(NULL), rela_dyn_(NULL), rela_ifunc_(NULL),
- copy_relocs_(elfcpp::R_SPARC_COPY), dynbss_(NULL),
+ copy_relocs_(elfcpp::R_SPARC_COPY),
got_mod_index_offset_(-1U), tls_get_addr_sym_(NULL),
elf_machine_(sparc_info.machine_code), elf_flags_(0),
elf_flags_set_(false)
@@ -446,8 +446,6 @@ class Target_sparc : public Sized_target<size, big_endian>
Reloc_section* rela_ifunc_;
// Relocs saved to avoid a COPY reloc.
Copy_relocs<elfcpp::SHT_RELA, size, big_endian> copy_relocs_;
- // Space for variables copied with a COPY reloc.
- Output_data_space* dynbss_;
// Offset of the GOT entry for the TLS module index;
unsigned int got_mod_index_offset_;
// Cached pointer to __tls_get_addr symbol
diff --git a/gold/tilegx.cc b/gold/tilegx.cc
index c3918b9..576a28c 100644
--- a/gold/tilegx.cc
+++ b/gold/tilegx.cc
@@ -239,7 +239,7 @@ class Target_tilegx : public Sized_target<size, big_endian>
got_(NULL), plt_(NULL), got_plt_(NULL), got_irelative_(NULL),
global_offset_table_(NULL), tilegx_dynamic_(NULL), rela_dyn_(NULL),
rela_irelative_(NULL), copy_relocs_(elfcpp::R_TILEGX_COPY),
- dynbss_(NULL), got_mod_index_offset_(-1U),
+ got_mod_index_offset_(-1U),
tls_get_addr_sym_defined_(false)
{ }
@@ -650,8 +650,6 @@ class Target_tilegx : public Sized_target<size, big_endian>
Reloc_section* rela_irelative_;
// Relocs saved to avoid a COPY reloc.
Copy_relocs<elfcpp::SHT_RELA, size, big_endian> copy_relocs_;
- // Space for variables copied with a COPY reloc.
- Output_data_space* dynbss_;
// Offset of the GOT entry for the TLS module index.
unsigned int got_mod_index_offset_;
// True if the _tls_get_addr symbol has been defined.
diff --git a/gold/x86_64.cc b/gold/x86_64.cc
index 5bf78fd..b95d2ed 100644
--- a/gold/x86_64.cc
+++ b/gold/x86_64.cc
@@ -396,7 +396,7 @@ class Target_x86_64 : public Sized_target<size, false>
got_(NULL), plt_(NULL), got_plt_(NULL), got_irelative_(NULL),
got_tlsdesc_(NULL), global_offset_table_(NULL), rela_dyn_(NULL),
rela_irelative_(NULL), copy_relocs_(elfcpp::R_X86_64_COPY),
- dynbss_(NULL), got_mod_index_offset_(-1U), tlsdesc_reloc_info_(),
+ got_mod_index_offset_(-1U), tlsdesc_reloc_info_(),
tls_base_symbol_defined_(false)
{ }
@@ -972,8 +972,6 @@ class Target_x86_64 : public Sized_target<size, false>
Reloc_section* rela_irelative_;
// Relocs saved to avoid a COPY reloc.
Copy_relocs<elfcpp::SHT_RELA, size, false> copy_relocs_;
- // Space for variables copied with a COPY reloc.
- Output_data_space* dynbss_;
// Offset of the GOT entry for the TLS module index.
unsigned int got_mod_index_offset_;
// We handle R_X86_64_TLSDESC against a local symbol as a target