aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2009-10-29 05:16:23 +0000
committerIan Lance Taylor <ian@airs.com>2009-10-29 05:16:23 +0000
commitad0f2072a6a647a9c209a8538bd994d7fc7033f5 (patch)
tree0e5f1660d92b994ad5344d75eb9f3e5bf3eae3e1
parent8ffa36676179f56936e273c26c63dd16f7a043ee (diff)
downloadgdb-ad0f2072a6a647a9c209a8538bd994d7fc7033f5.zip
gdb-ad0f2072a6a647a9c209a8538bd994d7fc7033f5.tar.gz
gdb-ad0f2072a6a647a9c209a8538bd994d7fc7033f5.tar.bz2
* object.h (class Relobj): Drop options parameter from
gc_process_relocs, scan_relocs, relocate, do_gc_process_relocs, do_scan_relocs, do_relocate. Change all callers. (class Sized_relobj): Drop options parameters from do_gc_process_relocs, do_scan_relocs, do_relocate, do_relocate_sections, relocate_sections, emit_relocs_scan, emit_relocs_scan_reltype. Change all callers. (struct Relocate_info): Remove options field and all references to it. * reloc.h (class Read_relocs): Remove options constructor parameter and options_ field. Change all callers. (class Gc_process_relocs, class Scan_relocs): Likewise. (class Relocate_task): Likewise. * target-reloc.h (scan_relocs): Remove options parameter. Change all callers. (scan_relocatable_relocs): Likewise. * target.h (class Sized_target): Remove options parameter from gc_process_relocs, scan_relocs, scan_relocatable_relocs. Change all callers. * gc.h (gc_process_relocs): Remove options parameter. Change all callers. * arm.cc: Update functions to remove options parameters. * i386.cc: Likewise. * powerpc.cc: Likewise. * sparc.cc: Likewise. * x86_64.cc: Likewise. * testsuite/testfile.cc: Likewise.
-rw-r--r--gold/ChangeLog30
-rw-r--r--gold/arm.cc32
-rw-r--r--gold/gc.h1
-rw-r--r--gold/gold.cc17
-rw-r--r--gold/i386.cc33
-rw-r--r--gold/object.h50
-rw-r--r--gold/powerpc.cc23
-rw-r--r--gold/reloc.cc107
-rw-r--r--gold/reloc.h39
-rw-r--r--gold/sparc.cc23
-rw-r--r--gold/target-reloc.h8
-rw-r--r--gold/target.h44
-rw-r--r--gold/testsuite/testfile.cc16
-rw-r--r--gold/x86_64.cc33
14 files changed, 182 insertions, 274 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog
index c342dd0..a8f4c98 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,33 @@
+2009-10-28 Ian Lance Taylor <iant@google.com>
+
+ * object.h (class Relobj): Drop options parameter from
+ gc_process_relocs, scan_relocs, relocate, do_gc_process_relocs,
+ do_scan_relocs, do_relocate. Change all callers.
+ (class Sized_relobj): Drop options parameters from
+ do_gc_process_relocs, do_scan_relocs, do_relocate,
+ do_relocate_sections, relocate_sections, emit_relocs_scan,
+ emit_relocs_scan_reltype. Change all callers.
+ (struct Relocate_info): Remove options field and all references to
+ it.
+ * reloc.h (class Read_relocs): Remove options constructor
+ parameter and options_ field. Change all callers.
+ (class Gc_process_relocs, class Scan_relocs): Likewise.
+ (class Relocate_task): Likewise.
+ * target-reloc.h (scan_relocs): Remove options parameter. Change
+ all callers.
+ (scan_relocatable_relocs): Likewise.
+ * target.h (class Sized_target): Remove options parameter from
+ gc_process_relocs, scan_relocs, scan_relocatable_relocs. Change
+ all callers.
+ * gc.h (gc_process_relocs): Remove options parameter. Change all
+ callers.
+ * arm.cc: Update functions to remove options parameters.
+ * i386.cc: Likewise.
+ * powerpc.cc: Likewise.
+ * sparc.cc: Likewise.
+ * x86_64.cc: Likewise.
+ * testsuite/testfile.cc: Likewise.
+
2009-10-28 Doug Kwan <dougkwan@google.com>
* arm.cc (Arm_relobj): New class definition.
diff --git a/gold/arm.cc b/gold/arm.cc
index a6b3e41..3626ab1 100644
--- a/gold/arm.cc
+++ b/gold/arm.cc
@@ -1092,8 +1092,7 @@ class Target_arm : public Sized_target<32, big_endian>
// Process the relocations to determine unreferenced sections for
// garbage collection.
void
- gc_process_relocs(const General_options& options,
- Symbol_table* symtab,
+ gc_process_relocs(Symbol_table* symtab,
Layout* layout,
Sized_relobj<32, big_endian>* object,
unsigned int data_shndx,
@@ -1107,8 +1106,7 @@ class Target_arm : public Sized_target<32, big_endian>
// Scan the relocations to look for symbol adjustments.
void
- scan_relocs(const General_options& options,
- Symbol_table* symtab,
+ scan_relocs(Symbol_table* symtab,
Layout* layout,
Sized_relobj<32, big_endian>* object,
unsigned int data_shndx,
@@ -1144,8 +1142,7 @@ class Target_arm : public Sized_target<32, big_endian>
// Scan the relocs during a relocatable link.
void
- scan_relocatable_relocs(const General_options& options,
- Symbol_table* symtab,
+ scan_relocatable_relocs(Symbol_table* symtab,
Layout* layout,
Sized_relobj<32, big_endian>* object,
unsigned int data_shndx,
@@ -1209,8 +1206,7 @@ class Target_arm : public Sized_target<32, big_endian>
{ }
inline void
- local(const General_options& options, Symbol_table* symtab,
- Layout* layout, Target_arm* target,
+ local(Symbol_table* symtab, Layout* layout, Target_arm* target,
Sized_relobj<32, big_endian>* object,
unsigned int data_shndx,
Output_section* output_section,
@@ -1218,8 +1214,7 @@ class Target_arm : public Sized_target<32, big_endian>
const elfcpp::Sym<32, big_endian>& lsym);
inline void
- global(const General_options& options, Symbol_table* symtab,
- Layout* layout, Target_arm* target,
+ global(Symbol_table* symtab, Layout* layout, Target_arm* target,
Sized_relobj<32, big_endian>* object,
unsigned int data_shndx,
Output_section* output_section,
@@ -3030,7 +3025,6 @@ Arm_relobj<big_endian>::scan_sections_for_stubs(
const Relobj::Output_sections& out_sections(this->output_sections());
Relocate_info<32, big_endian> relinfo;
- relinfo.options = &parameters->options();
relinfo.symtab = symtab;
relinfo.layout = layout;
relinfo.object = this;
@@ -3554,8 +3548,7 @@ Target_arm<big_endian>::Scan::check_non_pic(Relobj* object,
template<bool big_endian>
inline void
-Target_arm<big_endian>::Scan::local(const General_options&,
- Symbol_table* symtab,
+Target_arm<big_endian>::Scan::local(Symbol_table* symtab,
Layout* layout,
Target_arm* target,
Sized_relobj<32, big_endian>* object,
@@ -3682,8 +3675,7 @@ Target_arm<big_endian>::Scan::unsupported_reloc_global(
template<bool big_endian>
inline void
-Target_arm<big_endian>::Scan::global(const General_options&,
- Symbol_table* symtab,
+Target_arm<big_endian>::Scan::global(Symbol_table* symtab,
Layout* layout,
Target_arm* target,
Sized_relobj<32, big_endian>* object,
@@ -3887,8 +3879,7 @@ Target_arm<big_endian>::Scan::global(const General_options&,
template<bool big_endian>
void
-Target_arm<big_endian>::gc_process_relocs(const General_options& options,
- Symbol_table* symtab,
+Target_arm<big_endian>::gc_process_relocs(Symbol_table* symtab,
Layout* layout,
Sized_relobj<32, big_endian>* object,
unsigned int data_shndx,
@@ -3904,7 +3895,6 @@ Target_arm<big_endian>::gc_process_relocs(const General_options& options,
typedef typename Target_arm<big_endian>::Scan Scan;
gold::gc_process_relocs<32, big_endian, Arm, elfcpp::SHT_REL, Scan>(
- options,
symtab,
layout,
this,
@@ -3922,8 +3912,7 @@ Target_arm<big_endian>::gc_process_relocs(const General_options& options,
template<bool big_endian>
void
-Target_arm<big_endian>::scan_relocs(const General_options& options,
- Symbol_table* symtab,
+Target_arm<big_endian>::scan_relocs(Symbol_table* symtab,
Layout* layout,
Sized_relobj<32, big_endian>* object,
unsigned int data_shndx,
@@ -3944,7 +3933,6 @@ Target_arm<big_endian>::scan_relocs(const General_options& options,
}
gold::scan_relocs<32, big_endian, Target_arm, elfcpp::SHT_REL, Scan>(
- options,
symtab,
layout,
this,
@@ -4499,7 +4487,6 @@ Target_arm<big_endian>::Relocatable_size_for_reloc::get_size_for_reloc(
template<bool big_endian>
void
Target_arm<big_endian>::scan_relocatable_relocs(
- const General_options& options,
Symbol_table* symtab,
Layout* layout,
Sized_relobj<32, big_endian>* object,
@@ -4520,7 +4507,6 @@ Target_arm<big_endian>::scan_relocatable_relocs(
gold::scan_relocatable_relocs<32, big_endian, elfcpp::SHT_REL,
Scan_relocatable_relocs>(
- options,
symtab,
layout,
object,
diff --git a/gold/gc.h b/gold/gc.h
index 757a33d..18c09a6 100644
--- a/gold/gc.h
+++ b/gold/gc.h
@@ -138,7 +138,6 @@ template<int size, bool big_endian, typename Target_type, int sh_type,
typename Scan>
inline void
gc_process_relocs(
- const General_options& ,
Symbol_table* symtab,
Layout*,
Target_type* ,
diff --git a/gold/gold.cc b/gold/gold.cc
index 4ac1e3d..ddb05b5 100644
--- a/gold/gold.cc
+++ b/gold/gold.cc
@@ -229,7 +229,7 @@ queue_initial_tasks(const General_options& options,
|| parameters->options().icf_enabled())
{
workqueue->queue(new Task_function(new Gc_runner(options,
- input_objects,
+ input_objects,
symtab,
layout,
mapfile),
@@ -273,8 +273,8 @@ queue_middle_gc_tasks(const General_options& options,
{
// We can read and process the relocations in any order.
blocker->add_blocker();
- workqueue->queue(new Read_relocs(options, symtab, layout, *p,
- symtab_lock, blocker));
+ workqueue->queue(new Read_relocs(symtab, layout, *p, symtab_lock,
+ blocker));
}
Task_token* this_blocker = new Task_token(true);
@@ -485,8 +485,9 @@ queue_middle_tasks(const General_options& options,
++p)
{
blocker->add_blocker();
- workqueue->queue(new Scan_relocs(options, symtab, layout, *p,
- (*p)->get_relocs_data(),symtab_lock, blocker));
+ workqueue->queue(new Scan_relocs(symtab, layout, *p,
+ (*p)->get_relocs_data(),
+ symtab_lock, blocker));
}
}
else
@@ -512,8 +513,8 @@ queue_middle_tasks(const General_options& options,
// relocations. That task will in turn queue a task to wait
// until it can write to the symbol table.
blocker->add_blocker();
- workqueue->queue(new Read_relocs(options, symtab, layout, *p,
- symtab_lock, blocker));
+ workqueue->queue(new Read_relocs(symtab, layout, *p, symtab_lock,
+ blocker));
}
}
@@ -600,7 +601,7 @@ queue_final_tasks(const General_options& options,
if (input_sections_blocker != NULL)
input_sections_blocker->add_blocker();
final_blocker->add_blocker();
- workqueue->queue(new Relocate_task(options, symtab, layout, *p, of,
+ workqueue->queue(new Relocate_task(symtab, layout, *p, of,
input_sections_blocker,
output_sections_blocker,
final_blocker));
diff --git a/gold/i386.cc b/gold/i386.cc
index 445a7ac..0f270f4 100644
--- a/gold/i386.cc
+++ b/gold/i386.cc
@@ -67,8 +67,7 @@ class Target_i386 : public Target_freebsd<32, false>
// Process the relocations to determine unreferenced sections for
// garbage collection.
void
- gc_process_relocs(const General_options& options,
- Symbol_table* symtab,
+ gc_process_relocs(Symbol_table* symtab,
Layout* layout,
Sized_relobj<32, false>* object,
unsigned int data_shndx,
@@ -82,8 +81,7 @@ class Target_i386 : public Target_freebsd<32, false>
// Scan the relocations to look for symbol adjustments.
void
- scan_relocs(const General_options& options,
- Symbol_table* symtab,
+ scan_relocs(Symbol_table* symtab,
Layout* layout,
Sized_relobj<32, false>* object,
unsigned int data_shndx,
@@ -119,8 +117,7 @@ class Target_i386 : public Target_freebsd<32, false>
// Scan the relocs during a relocatable link.
void
- scan_relocatable_relocs(const General_options& options,
- Symbol_table* symtab,
+ scan_relocatable_relocs(Symbol_table* symtab,
Layout* layout,
Sized_relobj<32, false>* object,
unsigned int data_shndx,
@@ -190,8 +187,7 @@ class Target_i386 : public Target_freebsd<32, false>
struct Scan
{
inline void
- local(const General_options& options, Symbol_table* symtab,
- Layout* layout, Target_i386* target,
+ local(Symbol_table* symtab, Layout* layout, Target_i386* target,
Sized_relobj<32, false>* object,
unsigned int data_shndx,
Output_section* output_section,
@@ -199,8 +195,7 @@ class Target_i386 : public Target_freebsd<32, false>
const elfcpp::Sym<32, false>& lsym);
inline void
- global(const General_options& options, Symbol_table* symtab,
- Layout* layout, Target_i386* target,
+ global(Symbol_table* symtab, Layout* layout, Target_i386* target,
Sized_relobj<32, false>* object,
unsigned int data_shndx,
Output_section* output_section,
@@ -884,8 +879,7 @@ Target_i386::Scan::unsupported_reloc_local(Sized_relobj<32, false>* object,
// Scan a relocation for a local symbol.
inline void
-Target_i386::Scan::local(const General_options&,
- Symbol_table* symtab,
+Target_i386::Scan::local(Symbol_table* symtab,
Layout* layout,
Target_i386* target,
Sized_relobj<32, false>* object,
@@ -1175,8 +1169,7 @@ Target_i386::Scan::unsupported_reloc_global(Sized_relobj<32, false>* object,
// Scan a relocation for a global symbol.
inline void
-Target_i386::Scan::global(const General_options&,
- Symbol_table* symtab,
+Target_i386::Scan::global(Symbol_table* symtab,
Layout* layout,
Target_i386* target,
Sized_relobj<32, false>* object,
@@ -1492,8 +1485,7 @@ Target_i386::Scan::global(const General_options&,
// Process relocations for gc.
void
-Target_i386::gc_process_relocs(const General_options& options,
- Symbol_table* symtab,
+Target_i386::gc_process_relocs(Symbol_table* symtab,
Layout* layout,
Sized_relobj<32, false>* object,
unsigned int data_shndx,
@@ -1507,7 +1499,6 @@ Target_i386::gc_process_relocs(const General_options& options,
{
gold::gc_process_relocs<32, false, Target_i386, elfcpp::SHT_REL,
Target_i386::Scan>(
- options,
symtab,
layout,
this,
@@ -1524,8 +1515,7 @@ Target_i386::gc_process_relocs(const General_options& options,
// Scan relocations for a section.
void
-Target_i386::scan_relocs(const General_options& options,
- Symbol_table* symtab,
+Target_i386::scan_relocs(Symbol_table* symtab,
Layout* layout,
Sized_relobj<32, false>* object,
unsigned int data_shndx,
@@ -1546,7 +1536,6 @@ Target_i386::scan_relocs(const General_options& options,
gold::scan_relocs<32, false, Target_i386, elfcpp::SHT_REL,
Target_i386::Scan>(
- options,
symtab,
layout,
this,
@@ -2537,8 +2526,7 @@ Target_i386::Relocatable_size_for_reloc::get_size_for_reloc(
// Scan the relocs during a relocatable link.
void
-Target_i386::scan_relocatable_relocs(const General_options& options,
- Symbol_table* symtab,
+Target_i386::scan_relocatable_relocs(Symbol_table* symtab,
Layout* layout,
Sized_relobj<32, false>* object,
unsigned int data_shndx,
@@ -2558,7 +2546,6 @@ Target_i386::scan_relocatable_relocs(const General_options& options,
gold::scan_relocatable_relocs<32, false, elfcpp::SHT_REL,
Scan_relocatable_relocs>(
- options,
symtab,
layout,
object,
diff --git a/gold/object.h b/gold/object.h
index 0d40397..558e456 100644
--- a/gold/object.h
+++ b/gold/object.h
@@ -659,15 +659,13 @@ class Relobj : public Object
// Process the relocs, during garbage collection only.
void
- gc_process_relocs(const General_options& options, Symbol_table* symtab,
- Layout* layout, Read_relocs_data* rd)
- { return this->do_gc_process_relocs(options, symtab, layout, rd); }
+ gc_process_relocs(Symbol_table* symtab, Layout* layout, Read_relocs_data* rd)
+ { return this->do_gc_process_relocs(symtab, layout, rd); }
// Scan the relocs and adjust the symbol table.
void
- scan_relocs(const General_options& options, Symbol_table* symtab,
- Layout* layout, Read_relocs_data* rd)
- { return this->do_scan_relocs(options, symtab, layout, rd); }
+ scan_relocs(Symbol_table* symtab, Layout* layout, Read_relocs_data* rd)
+ { return this->do_scan_relocs(symtab, layout, rd); }
// The number of local symbols in the input symbol table.
virtual unsigned int
@@ -701,9 +699,8 @@ class Relobj : public Object
// Relocate the input sections and write out the local symbols.
void
- relocate(const General_options& options, const Symbol_table* symtab,
- const Layout* layout, Output_file* of)
- { return this->do_relocate(options, symtab, layout, of); }
+ relocate(const Symbol_table* symtab, const Layout* layout, Output_file* of)
+ { return this->do_relocate(symtab, layout, of); }
// Return whether an input section is being included in the link.
bool
@@ -790,13 +787,11 @@ class Relobj : public Object
// Process the relocs--implemented by child class.
virtual void
- do_gc_process_relocs(const General_options&, Symbol_table*, Layout*,
- Read_relocs_data*) = 0;
+ do_gc_process_relocs(Symbol_table*, Layout*, Read_relocs_data*) = 0;
// Scan the relocs--implemented by child class.
virtual void
- do_scan_relocs(const General_options&, Symbol_table*, Layout*,
- Read_relocs_data*) = 0;
+ do_scan_relocs(Symbol_table*, Layout*, Read_relocs_data*) = 0;
// Return the number of local symbols--implemented by child class.
virtual unsigned int
@@ -824,8 +819,7 @@ class Relobj : public Object
// Relocate the input sections and write out the local
// symbols--implemented by child class.
virtual void
- do_relocate(const General_options& options, const Symbol_table* symtab,
- const Layout*, Output_file* of) = 0;
+ do_relocate(const Symbol_table* symtab, const Layout*, Output_file* of) = 0;
// Get the offset of a section--implemented by child class.
virtual uint64_t
@@ -1502,13 +1496,11 @@ class Sized_relobj : public Relobj
// Process the relocs to find list of referenced sections. Used only
// during garbage collection.
void
- do_gc_process_relocs(const General_options&, Symbol_table*, Layout*,
- Read_relocs_data*);
+ do_gc_process_relocs(Symbol_table*, Layout*, Read_relocs_data*);
// Scan the relocs and adjust the symbol table.
void
- do_scan_relocs(const General_options&, Symbol_table*, Layout*,
- Read_relocs_data*);
+ do_scan_relocs(Symbol_table*, Layout*, Read_relocs_data*);
// Count the local symbols.
void
@@ -1529,8 +1521,7 @@ class Sized_relobj : public Relobj
// Relocate the input sections and write out the local symbols.
void
- do_relocate(const General_options& options, const Symbol_table* symtab,
- const Layout*, Output_file* of);
+ do_relocate(const Symbol_table* symtab, const Layout*, Output_file* of);
// Get the size of a section.
uint64_t
@@ -1663,8 +1654,7 @@ class Sized_relobj : public Relobj
// This may be overriden by a child class.
virtual void
- do_relocate_sections(const General_options& options,
- const Symbol_table* symtab, const Layout* layout,
+ do_relocate_sections(const Symbol_table* symtab, const Layout* layout,
const unsigned char* pshdrs, Views* pviews);
private:
@@ -1728,22 +1718,20 @@ class Sized_relobj : public Relobj
// Relocate the sections in the output file.
void
- relocate_sections(const General_options& options, const Symbol_table* symtab,
- const Layout* layout, const unsigned char* pshdrs,
- Views* pviews)
- { this->do_relocate_sections(options, symtab, layout, pshdrs, pviews); }
+ relocate_sections(const Symbol_table* symtab, const Layout* layout,
+ const unsigned char* pshdrs, Views* pviews)
+ { this->do_relocate_sections(symtab, layout, pshdrs, pviews); }
// Scan the input relocations for --emit-relocs.
void
- emit_relocs_scan(const General_options&, Symbol_table*, Layout*,
- const unsigned char* plocal_syms,
+ emit_relocs_scan(Symbol_table*, Layout*, const unsigned char* plocal_syms,
const Read_relocs_data::Relocs_list::iterator&);
// Scan the input relocations for --emit-relocs, templatized on the
// type of the relocation section.
template<int sh_type>
void
- emit_relocs_scan_reltype(const General_options&, Symbol_table*, Layout*,
+ emit_relocs_scan_reltype(Symbol_table*, Layout*,
const unsigned char* plocal_syms,
const Read_relocs_data::Relocs_list::iterator&,
Relocatable_relocs*);
@@ -2005,8 +1993,6 @@ class Input_objects
template<int size, bool big_endian>
struct Relocate_info
{
- // Command line options.
- const General_options* options;
// Symbol table.
const Symbol_table* symtab;
// Layout.
diff --git a/gold/powerpc.cc b/gold/powerpc.cc
index 71f2ae4..a93e895 100644
--- a/gold/powerpc.cc
+++ b/gold/powerpc.cc
@@ -65,8 +65,7 @@ class Target_powerpc : public Sized_target<size, big_endian>
// Process the relocations to determine unreferenced sections for
// garbage collection.
void
- gc_process_relocs(const General_options& options,
- Symbol_table* symtab,
+ gc_process_relocs(Symbol_table* symtab,
Layout* layout,
Sized_relobj<size, big_endian>* object,
unsigned int data_shndx,
@@ -80,8 +79,7 @@ class Target_powerpc : public Sized_target<size, big_endian>
// Scan the relocations to look for symbol adjustments.
void
- scan_relocs(const General_options& options,
- Symbol_table* symtab,
+ scan_relocs(Symbol_table* symtab,
Layout* layout,
Sized_relobj<size, big_endian>* object,
unsigned int data_shndx,
@@ -116,8 +114,7 @@ class Target_powerpc : public Sized_target<size, big_endian>
// Scan the relocs during a relocatable link.
void
- scan_relocatable_relocs(const General_options& options,
- Symbol_table* symtab,
+ scan_relocatable_relocs(Symbol_table* symtab,
Layout* layout,
Sized_relobj<size, big_endian>* object,
unsigned int data_shndx,
@@ -171,8 +168,7 @@ class Target_powerpc : public Sized_target<size, big_endian>
{ }
inline void
- local(const General_options& options, Symbol_table* symtab,
- Layout* layout, Target_powerpc* target,
+ local(Symbol_table* symtab, Layout* layout, Target_powerpc* target,
Sized_relobj<size, big_endian>* object,
unsigned int data_shndx,
Output_section* output_section,
@@ -180,8 +176,7 @@ class Target_powerpc : public Sized_target<size, big_endian>
const elfcpp::Sym<size, big_endian>& lsym);
inline void
- global(const General_options& options, Symbol_table* symtab,
- Layout* layout, Target_powerpc* target,
+ global(Symbol_table* symtab, Layout* layout, Target_powerpc* target,
Sized_relobj<size, big_endian>* object,
unsigned int data_shndx,
Output_section* output_section,
@@ -1113,7 +1108,6 @@ Target_powerpc<size, big_endian>::Scan::check_non_pic(Relobj* object,
template<int size, bool big_endian>
inline void
Target_powerpc<size, big_endian>::Scan::local(
- const General_options&,
Symbol_table* symtab,
Layout* layout,
Target_powerpc<size, big_endian>* target,
@@ -1248,7 +1242,6 @@ Target_powerpc<size, big_endian>::Scan::unsupported_reloc_global(
template<int size, bool big_endian>
inline void
Target_powerpc<size, big_endian>::Scan::global(
- const General_options&,
Symbol_table* symtab,
Layout* layout,
Target_powerpc<size, big_endian>* target,
@@ -1444,7 +1437,6 @@ Target_powerpc<size, big_endian>::Scan::global(
template<int size, bool big_endian>
void
Target_powerpc<size, big_endian>::gc_process_relocs(
- const General_options& options,
Symbol_table* symtab,
Layout* layout,
Sized_relobj<size, big_endian>* object,
@@ -1461,7 +1453,6 @@ Target_powerpc<size, big_endian>::gc_process_relocs(
typedef typename Target_powerpc<size, big_endian>::Scan Scan;
gold::gc_process_relocs<size, big_endian, Powerpc, elfcpp::SHT_RELA, Scan>(
- options,
symtab,
layout,
this,
@@ -1480,7 +1471,6 @@ Target_powerpc<size, big_endian>::gc_process_relocs(
template<int size, bool big_endian>
void
Target_powerpc<size, big_endian>::scan_relocs(
- const General_options& options,
Symbol_table* symtab,
Layout* layout,
Sized_relobj<size, big_endian>* object,
@@ -1523,7 +1513,6 @@ Target_powerpc<size, big_endian>::scan_relocs(
}
gold::scan_relocs<size, big_endian, Powerpc, elfcpp::SHT_RELA, Scan>(
- options,
symtab,
layout,
this,
@@ -1897,7 +1886,6 @@ Target_powerpc<size, big_endian>::Relocatable_size_for_reloc::get_size_for_reloc
template<int size, bool big_endian>
void
Target_powerpc<size, big_endian>::scan_relocatable_relocs(
- const General_options& options,
Symbol_table* symtab,
Layout* layout,
Sized_relobj<size, big_endian>* object,
@@ -1918,7 +1906,6 @@ Target_powerpc<size, big_endian>::scan_relocatable_relocs(
gold::scan_relocatable_relocs<size, big_endian, elfcpp::SHT_RELA,
Scan_relocatable_relocs>(
- options,
symtab,
layout,
object,
diff --git a/gold/reloc.cc b/gold/reloc.cc
index 0d4f069..0231268 100644
--- a/gold/reloc.cc
+++ b/gold/reloc.cc
@@ -72,8 +72,7 @@ Read_relocs::run(Workqueue* workqueue)
if (parameters->options().gc_sections()
|| parameters->options().icf_enabled())
{
- workqueue->queue_next(new Gc_process_relocs(this->options_,
- this->symtab_,
+ workqueue->queue_next(new Gc_process_relocs(this->symtab_,
this->layout_,
this->object_, rd,
this->symtab_lock_,
@@ -81,8 +80,8 @@ Read_relocs::run(Workqueue* workqueue)
}
else
{
- workqueue->queue_next(new Scan_relocs(this->options_, this->symtab_,
- this->layout_, this->object_, rd,
+ workqueue->queue_next(new Scan_relocs(this->symtab_, this->layout_,
+ this->object_, rd,
this->symtab_lock_,
this->blocker_));
}
@@ -120,8 +119,7 @@ Gc_process_relocs::locks(Task_locker* tl)
void
Gc_process_relocs::run(Workqueue*)
{
- this->object_->gc_process_relocs(this->options_, this->symtab_, this->layout_,
- this->rd_);
+ this->object_->gc_process_relocs(this->symtab_, this->layout_, this->rd_);
this->object_->release();
}
@@ -166,8 +164,7 @@ Scan_relocs::locks(Task_locker* tl)
void
Scan_relocs::run(Workqueue*)
{
- this->object_->scan_relocs(this->options_, this->symtab_, this->layout_,
- this->rd_);
+ this->object_->scan_relocs(this->symtab_, this->layout_, this->rd_);
this->object_->release();
delete this->rd_;
this->rd_ = NULL;
@@ -216,8 +213,7 @@ Relocate_task::locks(Task_locker* tl)
void
Relocate_task::run(Workqueue*)
{
- this->object_->relocate(this->options_, this->symtab_, this->layout_,
- this->of_);
+ this->object_->relocate(this->symtab_, this->layout_, this->of_);
// This is normally the last thing we will do with an object, so
// uncache all views.
@@ -360,10 +356,9 @@ Sized_relobj<size, big_endian>::do_read_relocs(Read_relocs_data* rd)
template<int size, bool big_endian>
void
-Sized_relobj<size, big_endian>::do_gc_process_relocs(const General_options& options,
- Symbol_table* symtab,
- Layout* layout,
- Read_relocs_data* rd)
+Sized_relobj<size, big_endian>::do_gc_process_relocs(Symbol_table* symtab,
+ Layout* layout,
+ Read_relocs_data* rd)
{
Sized_target<size, big_endian>* target =
parameters->sized_target<size, big_endian>();
@@ -384,7 +379,7 @@ Sized_relobj<size, big_endian>::do_gc_process_relocs(const General_options& opti
// only scan allocated sections. We may see a non-allocated
// section here if we are emitting relocs.
if (p->is_data_section_allocated)
- target->gc_process_relocs(options, symtab, layout, this,
+ target->gc_process_relocs(symtab, layout, this,
p->data_shndx, p->sh_type,
p->contents->data(), p->reloc_count,
p->output_section,
@@ -401,8 +396,7 @@ Sized_relobj<size, big_endian>::do_gc_process_relocs(const General_options& opti
template<int size, bool big_endian>
void
-Sized_relobj<size, big_endian>::do_scan_relocs(const General_options& options,
- Symbol_table* symtab,
+Sized_relobj<size, big_endian>::do_scan_relocs(Symbol_table* symtab,
Layout* layout,
Read_relocs_data* rd)
{
@@ -434,21 +428,21 @@ Sized_relobj<size, big_endian>::do_scan_relocs(const General_options& options,
// only scan allocated sections. We may see a non-allocated
// section here if we are emitting relocs.
if (p->is_data_section_allocated)
- target->scan_relocs(options, symtab, layout, this, p->data_shndx,
+ target->scan_relocs(symtab, layout, this, p->data_shndx,
p->sh_type, p->contents->data(),
p->reloc_count, p->output_section,
p->needs_special_offset_handling,
this->local_symbol_count_,
local_symbols);
if (parameters->options().emit_relocs())
- this->emit_relocs_scan(options, symtab, layout, local_symbols, p);
+ this->emit_relocs_scan(symtab, layout, local_symbols, p);
}
else
{
Relocatable_relocs* rr = this->relocatable_relocs(p->reloc_shndx);
gold_assert(rr != NULL);
rr->set_reloc_count(p->reloc_count);
- target->scan_relocatable_relocs(options, symtab, layout, this,
+ target->scan_relocatable_relocs(symtab, layout, this,
p->data_shndx, p->sh_type,
p->contents->data(),
p->reloc_count,
@@ -510,7 +504,6 @@ class Emit_relocs_strategy
template<int size, bool big_endian>
void
Sized_relobj<size, big_endian>::emit_relocs_scan(
- const General_options& options,
Symbol_table* symtab,
Layout* layout,
const unsigned char* plocal_syms,
@@ -521,14 +514,13 @@ Sized_relobj<size, big_endian>::emit_relocs_scan(
rr->set_reloc_count(p->reloc_count);
if (p->sh_type == elfcpp::SHT_REL)
- this->emit_relocs_scan_reltype<elfcpp::SHT_REL>(options, symtab, layout,
+ this->emit_relocs_scan_reltype<elfcpp::SHT_REL>(symtab, layout,
plocal_syms, p, rr);
else
{
gold_assert(p->sh_type == elfcpp::SHT_RELA);
- this->emit_relocs_scan_reltype<elfcpp::SHT_RELA>(options, symtab,
- layout, plocal_syms, p,
- rr);
+ this->emit_relocs_scan_reltype<elfcpp::SHT_RELA>(symtab, layout,
+ plocal_syms, p, rr);
}
}
@@ -539,7 +531,6 @@ template<int size, bool big_endian>
template<int sh_type>
void
Sized_relobj<size, big_endian>::emit_relocs_scan_reltype(
- const General_options& options,
Symbol_table* symtab,
Layout* layout,
const unsigned char* plocal_syms,
@@ -548,7 +539,6 @@ Sized_relobj<size, big_endian>::emit_relocs_scan_reltype(
{
scan_relocatable_relocs<size, big_endian, sh_type,
Emit_relocs_strategy<sh_type> >(
- options,
symtab,
layout,
this,
@@ -566,8 +556,7 @@ Sized_relobj<size, big_endian>::emit_relocs_scan_reltype(
template<int size, bool big_endian>
void
-Sized_relobj<size, big_endian>::do_relocate(const General_options& options,
- const Symbol_table* symtab,
+Sized_relobj<size, big_endian>::do_relocate(const Symbol_table* symtab,
const Layout* layout,
Output_file* of)
{
@@ -593,7 +582,7 @@ Sized_relobj<size, big_endian>::do_relocate(const General_options& options,
// Apply relocations.
- this->relocate_sections(options, symtab, layout, pshdrs, &views);
+ this->relocate_sections(symtab, layout, pshdrs, &views);
// After we've done the relocations, we release the hash tables,
// since we no longer need them.
@@ -800,7 +789,6 @@ Sized_relobj<size, big_endian>::write_sections(const unsigned char* pshdrs,
template<int size, bool big_endian>
void
Sized_relobj<size, big_endian>::do_relocate_sections(
- const General_options& options,
const Symbol_table* symtab,
const Layout* layout,
const unsigned char* pshdrs,
@@ -814,7 +802,6 @@ Sized_relobj<size, big_endian>::do_relocate_sections(
const std::vector<Address>& out_offsets(this->section_offsets_);
Relocate_info<size, big_endian> relinfo;
- relinfo.options = &options;
relinfo.symtab = symtab;
relinfo.layout = layout;
relinfo.object = this;
@@ -1431,44 +1418,39 @@ Sized_relobj<64, true>::do_read_relocs(Read_relocs_data* rd);
#ifdef HAVE_TARGET_32_LITTLE
template
void
-Sized_relobj<32, false>::do_gc_process_relocs(const General_options& options,
- Symbol_table* symtab,
- Layout* layout,
- Read_relocs_data* rd);
+Sized_relobj<32, false>::do_gc_process_relocs(Symbol_table* symtab,
+ Layout* layout,
+ Read_relocs_data* rd);
#endif
#ifdef HAVE_TARGET_32_BIG
template
void
-Sized_relobj<32, true>::do_gc_process_relocs(const General_options& options,
- Symbol_table* symtab,
- Layout* layout,
- Read_relocs_data* rd);
+Sized_relobj<32, true>::do_gc_process_relocs(Symbol_table* symtab,
+ Layout* layout,
+ Read_relocs_data* rd);
#endif
#ifdef HAVE_TARGET_64_LITTLE
template
void
-Sized_relobj<64, false>::do_gc_process_relocs(const General_options& options,
- Symbol_table* symtab,
- Layout* layout,
- Read_relocs_data* rd);
+Sized_relobj<64, false>::do_gc_process_relocs(Symbol_table* symtab,
+ Layout* layout,
+ Read_relocs_data* rd);
#endif
#ifdef HAVE_TARGET_64_BIG
template
void
-Sized_relobj<64, true>::do_gc_process_relocs(const General_options& options,
- Symbol_table* symtab,
- Layout* layout,
- Read_relocs_data* rd);
+Sized_relobj<64, true>::do_gc_process_relocs(Symbol_table* symtab,
+ Layout* layout,
+ Read_relocs_data* rd);
#endif
#ifdef HAVE_TARGET_32_LITTLE
template
void
-Sized_relobj<32, false>::do_scan_relocs(const General_options& options,
- Symbol_table* symtab,
+Sized_relobj<32, false>::do_scan_relocs(Symbol_table* symtab,
Layout* layout,
Read_relocs_data* rd);
#endif
@@ -1476,8 +1458,7 @@ Sized_relobj<32, false>::do_scan_relocs(const General_options& options,
#ifdef HAVE_TARGET_32_BIG
template
void
-Sized_relobj<32, true>::do_scan_relocs(const General_options& options,
- Symbol_table* symtab,
+Sized_relobj<32, true>::do_scan_relocs(Symbol_table* symtab,
Layout* layout,
Read_relocs_data* rd);
#endif
@@ -1485,8 +1466,7 @@ Sized_relobj<32, true>::do_scan_relocs(const General_options& options,
#ifdef HAVE_TARGET_64_LITTLE
template
void
-Sized_relobj<64, false>::do_scan_relocs(const General_options& options,
- Symbol_table* symtab,
+Sized_relobj<64, false>::do_scan_relocs(Symbol_table* symtab,
Layout* layout,
Read_relocs_data* rd);
#endif
@@ -1494,8 +1474,7 @@ Sized_relobj<64, false>::do_scan_relocs(const General_options& options,
#ifdef HAVE_TARGET_64_BIG
template
void
-Sized_relobj<64, true>::do_scan_relocs(const General_options& options,
- Symbol_table* symtab,
+Sized_relobj<64, true>::do_scan_relocs(Symbol_table* symtab,
Layout* layout,
Read_relocs_data* rd);
#endif
@@ -1503,8 +1482,7 @@ Sized_relobj<64, true>::do_scan_relocs(const General_options& options,
#ifdef HAVE_TARGET_32_LITTLE
template
void
-Sized_relobj<32, false>::do_relocate(const General_options& options,
- const Symbol_table* symtab,
+Sized_relobj<32, false>::do_relocate(const Symbol_table* symtab,
const Layout* layout,
Output_file* of);
#endif
@@ -1512,8 +1490,7 @@ Sized_relobj<32, false>::do_relocate(const General_options& options,
#ifdef HAVE_TARGET_32_BIG
template
void
-Sized_relobj<32, true>::do_relocate(const General_options& options,
- const Symbol_table* symtab,
+Sized_relobj<32, true>::do_relocate(const Symbol_table* symtab,
const Layout* layout,
Output_file* of);
#endif
@@ -1521,8 +1498,7 @@ Sized_relobj<32, true>::do_relocate(const General_options& options,
#ifdef HAVE_TARGET_64_LITTLE
template
void
-Sized_relobj<64, false>::do_relocate(const General_options& options,
- const Symbol_table* symtab,
+Sized_relobj<64, false>::do_relocate(const Symbol_table* symtab,
const Layout* layout,
Output_file* of);
#endif
@@ -1530,8 +1506,7 @@ Sized_relobj<64, false>::do_relocate(const General_options& options,
#ifdef HAVE_TARGET_64_BIG
template
void
-Sized_relobj<64, true>::do_relocate(const General_options& options,
- const Symbol_table* symtab,
+Sized_relobj<64, true>::do_relocate(const Symbol_table* symtab,
const Layout* layout,
Output_file* of);
#endif
@@ -1540,7 +1515,6 @@ Sized_relobj<64, true>::do_relocate(const General_options& options,
template
void
Sized_relobj<32, false>::do_relocate_sections(
- const General_options& options,
const Symbol_table* symtab,
const Layout* layout,
const unsigned char* pshdrs,
@@ -1551,7 +1525,6 @@ Sized_relobj<32, false>::do_relocate_sections(
template
void
Sized_relobj<32, true>::do_relocate_sections(
- const General_options& options,
const Symbol_table* symtab,
const Layout* layout,
const unsigned char* pshdrs,
@@ -1562,7 +1535,6 @@ Sized_relobj<32, true>::do_relocate_sections(
template
void
Sized_relobj<64, false>::do_relocate_sections(
- const General_options& options,
const Symbol_table* symtab,
const Layout* layout,
const unsigned char* pshdrs,
@@ -1573,7 +1545,6 @@ Sized_relobj<64, false>::do_relocate_sections(
template
void
Sized_relobj<64, true>::do_relocate_sections(
- const General_options& options,
const Symbol_table* symtab,
const Layout* layout,
const unsigned char* pshdrs,
diff --git a/gold/reloc.h b/gold/reloc.h
index 2229421..5dd4c85 100644
--- a/gold/reloc.h
+++ b/gold/reloc.h
@@ -64,10 +64,9 @@ class Read_relocs : public Task
public:
// SYMTAB_LOCK is used to lock the symbol table. BLOCKER should be
// unblocked when the Scan_relocs task completes.
- Read_relocs(const General_options& options, Symbol_table* symtab,
- Layout* layout, Relobj* object, Task_token* symtab_lock,
- Task_token* blocker)
- : options_(options), symtab_(symtab), layout_(layout), object_(object),
+ Read_relocs(Symbol_table* symtab, Layout* layout, Relobj* object,
+ Task_token* symtab_lock, Task_token* blocker)
+ : symtab_(symtab), layout_(layout), object_(object),
symtab_lock_(symtab_lock), blocker_(blocker)
{ }
@@ -86,7 +85,6 @@ class Read_relocs : public Task
get_name() const;
private:
- const General_options& options_;
Symbol_table* symtab_;
Layout* layout_;
Relobj* object_;
@@ -102,11 +100,11 @@ class Gc_process_relocs : public Task
public:
// SYMTAB_LOCK is used to lock the symbol table. BLOCKER should be
// unblocked when the task completes.
- Gc_process_relocs(const General_options& options, Symbol_table* symtab,
- Layout* layout, Relobj* object, Read_relocs_data* rd,
- Task_token* symtab_lock, Task_token* blocker)
- : options_(options), symtab_(symtab), layout_(layout), object_(object),
- rd_(rd), symtab_lock_(symtab_lock), blocker_(blocker)
+ Gc_process_relocs(Symbol_table* symtab, Layout* layout, Relobj* object,
+ Read_relocs_data* rd, Task_token* symtab_lock,
+ Task_token* blocker)
+ : symtab_(symtab), layout_(layout), object_(object), rd_(rd),
+ symtab_lock_(symtab_lock), blocker_(blocker)
{ }
// The standard Task methods.
@@ -124,7 +122,6 @@ class Gc_process_relocs : public Task
get_name() const;
private:
- const General_options& options_;
Symbol_table* symtab_;
Layout* layout_;
Relobj* object_;
@@ -141,11 +138,11 @@ class Scan_relocs : public Task
public:
// SYMTAB_LOCK is used to lock the symbol table. BLOCKER should be
// unblocked when the task completes.
- Scan_relocs(const General_options& options, Symbol_table* symtab,
- Layout* layout, Relobj* object, Read_relocs_data* rd,
- Task_token* symtab_lock, Task_token* blocker)
- : options_(options), symtab_(symtab), layout_(layout), object_(object),
- rd_(rd), symtab_lock_(symtab_lock), blocker_(blocker)
+ Scan_relocs(Symbol_table* symtab, Layout* layout, Relobj* object,
+ Read_relocs_data* rd, Task_token* symtab_lock,
+ Task_token* blocker)
+ : symtab_(symtab), layout_(layout), object_(object), rd_(rd),
+ symtab_lock_(symtab_lock), blocker_(blocker)
{ }
// The standard Task methods.
@@ -163,7 +160,6 @@ class Scan_relocs : public Task
get_name() const;
private:
- const General_options& options_;
Symbol_table* symtab_;
Layout* layout_;
Relobj* object_;
@@ -177,12 +173,12 @@ class Scan_relocs : public Task
class Relocate_task : public Task
{
public:
- Relocate_task(const General_options& options, const Symbol_table* symtab,
- const Layout* layout, Relobj* object, Output_file* of,
+ Relocate_task(const Symbol_table* symtab, const Layout* layout,
+ Relobj* object, Output_file* of,
Task_token* input_sections_blocker,
Task_token* output_sections_blocker, Task_token* final_blocker)
- : options_(options), symtab_(symtab), layout_(layout), object_(object),
- of_(of), input_sections_blocker_(input_sections_blocker),
+ : symtab_(symtab), layout_(layout), object_(object), of_(of),
+ input_sections_blocker_(input_sections_blocker),
output_sections_blocker_(output_sections_blocker),
final_blocker_(final_blocker)
{ }
@@ -202,7 +198,6 @@ class Relocate_task : public Task
get_name() const;
private:
- const General_options& options_;
const Symbol_table* symtab_;
const Layout* layout_;
Relobj* object_;
diff --git a/gold/sparc.cc b/gold/sparc.cc
index eac983f..74a91e9 100644
--- a/gold/sparc.cc
+++ b/gold/sparc.cc
@@ -67,8 +67,7 @@ class Target_sparc : public Sized_target<size, big_endian>
// Process the relocations to determine unreferenced sections for
// garbage collection.
void
- gc_process_relocs(const General_options& options,
- Symbol_table* symtab,
+ gc_process_relocs(Symbol_table* symtab,
Layout* layout,
Sized_relobj<size, big_endian>* object,
unsigned int data_shndx,
@@ -82,8 +81,7 @@ class Target_sparc : public Sized_target<size, big_endian>
// Scan the relocations to look for symbol adjustments.
void
- scan_relocs(const General_options& options,
- Symbol_table* symtab,
+ scan_relocs(Symbol_table* symtab,
Layout* layout,
Sized_relobj<size, big_endian>* object,
unsigned int data_shndx,
@@ -118,8 +116,7 @@ class Target_sparc : public Sized_target<size, big_endian>
// Scan the relocs during a relocatable link.
void
- scan_relocatable_relocs(const General_options& options,
- Symbol_table* symtab,
+ scan_relocatable_relocs(Symbol_table* symtab,
Layout* layout,
Sized_relobj<size, big_endian>* object,
unsigned int data_shndx,
@@ -181,8 +178,7 @@ class Target_sparc : public Sized_target<size, big_endian>
{ }
inline void
- local(const General_options& options, Symbol_table* symtab,
- Layout* layout, Target_sparc* target,
+ local(Symbol_table* symtab, Layout* layout, Target_sparc* target,
Sized_relobj<size, big_endian>* object,
unsigned int data_shndx,
Output_section* output_section,
@@ -190,8 +186,7 @@ class Target_sparc : public Sized_target<size, big_endian>
const elfcpp::Sym<size, big_endian>& lsym);
inline void
- global(const General_options& options, Symbol_table* symtab,
- Layout* layout, Target_sparc* target,
+ global(Symbol_table* symtab, Layout* layout, Target_sparc* target,
Sized_relobj<size, big_endian>* object,
unsigned int data_shndx,
Output_section* output_section,
@@ -1600,7 +1595,6 @@ Target_sparc<size, big_endian>::Scan::check_non_pic(Relobj* object, unsigned int
template<int size, bool big_endian>
inline void
Target_sparc<size, big_endian>::Scan::local(
- const General_options&,
Symbol_table* symtab,
Layout* layout,
Target_sparc<size, big_endian>* target,
@@ -1902,7 +1896,6 @@ Target_sparc<size, big_endian>::Scan::unsupported_reloc_global(
template<int size, bool big_endian>
inline void
Target_sparc<size, big_endian>::Scan::global(
- const General_options&,
Symbol_table* symtab,
Layout* layout,
Target_sparc<size, big_endian>* target,
@@ -2250,7 +2243,6 @@ Target_sparc<size, big_endian>::Scan::global(
template<int size, bool big_endian>
void
Target_sparc<size, big_endian>::gc_process_relocs(
- const General_options& options,
Symbol_table* symtab,
Layout* layout,
Sized_relobj<size, big_endian>* object,
@@ -2267,7 +2259,6 @@ Target_sparc<size, big_endian>::gc_process_relocs(
typedef typename Target_sparc<size, big_endian>::Scan Scan;
gold::gc_process_relocs<size, big_endian, Sparc, elfcpp::SHT_RELA, Scan>(
- options,
symtab,
layout,
this,
@@ -2286,7 +2277,6 @@ Target_sparc<size, big_endian>::gc_process_relocs(
template<int size, bool big_endian>
void
Target_sparc<size, big_endian>::scan_relocs(
- const General_options& options,
Symbol_table* symtab,
Layout* layout,
Sized_relobj<size, big_endian>* object,
@@ -2310,7 +2300,6 @@ Target_sparc<size, big_endian>::scan_relocs(
}
gold::scan_relocs<size, big_endian, Sparc, elfcpp::SHT_RELA, Scan>(
- options,
symtab,
layout,
this,
@@ -3149,7 +3138,6 @@ Target_sparc<size, big_endian>::Relocatable_size_for_reloc::get_size_for_reloc(
template<int size, bool big_endian>
void
Target_sparc<size, big_endian>::scan_relocatable_relocs(
- const General_options& options,
Symbol_table* symtab,
Layout* layout,
Sized_relobj<size, big_endian>* object,
@@ -3170,7 +3158,6 @@ Target_sparc<size, big_endian>::scan_relocatable_relocs(
gold::scan_relocatable_relocs<size, big_endian, elfcpp::SHT_RELA,
Scan_relocatable_relocs>(
- options,
symtab,
layout,
object,
diff --git a/gold/target-reloc.h b/gold/target-reloc.h
index bc00123..bc4d1ba 100644
--- a/gold/target-reloc.h
+++ b/gold/target-reloc.h
@@ -1,6 +1,6 @@
// target-reloc.h -- target specific relocation support -*- C++ -*-
-// Copyright 2006, 2007, 2008 Free Software Foundation, Inc.
+// Copyright 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
// This file is part of gold.
@@ -43,7 +43,6 @@ template<int size, bool big_endian, typename Target_type, int sh_type,
typename Scan>
inline void
scan_relocs(
- const General_options& options,
Symbol_table* symtab,
Layout* layout,
Target_type* target,
@@ -104,7 +103,7 @@ scan_relocs(
continue;
}
- scan.local(options, symtab, layout, target, object, data_shndx,
+ scan.local(symtab, layout, target, object, data_shndx,
output_section, reloc, r_type, lsym);
}
else
@@ -114,7 +113,7 @@ scan_relocs(
if (gsym->is_forwarder())
gsym = symtab->resolve_forwards(gsym);
- scan.global(options, symtab, layout, target, object, data_shndx,
+ scan.global(symtab, layout, target, object, data_shndx,
output_section, reloc, r_type, gsym);
}
}
@@ -384,7 +383,6 @@ template<int size, bool big_endian, int sh_type,
typename Scan_relocatable_reloc>
void
scan_relocatable_relocs(
- const General_options&,
Symbol_table*,
Layout*,
Sized_relobj<size, big_endian>* object,
diff --git a/gold/target.h b/gold/target.h
index 67397c3..bbe06ad 100644
--- a/gold/target.h
+++ b/gold/target.h
@@ -41,7 +41,6 @@
namespace gold
{
-class General_options;
class Object;
class Relobj;
template<int size, bool big_endian>
@@ -467,34 +466,32 @@ class Sized_target : public Target
// used to determine unreferenced garbage sections. This procedure is
// only called during garbage collection.
virtual void
- gc_process_relocs(const General_options& options,
- Symbol_table* symtab,
- Layout* layout,
- Sized_relobj<size, big_endian>* object,
- unsigned int data_shndx,
- unsigned int sh_type,
- const unsigned char* prelocs,
- size_t reloc_count,
- Output_section* output_section,
- bool needs_special_offset_handling,
- size_t local_symbol_count,
- const unsigned char* plocal_symbols) = 0;
+ gc_process_relocs(Symbol_table* symtab,
+ Layout* layout,
+ Sized_relobj<size, big_endian>* object,
+ unsigned int data_shndx,
+ unsigned int sh_type,
+ const unsigned char* prelocs,
+ size_t reloc_count,
+ Output_section* output_section,
+ bool needs_special_offset_handling,
+ size_t local_symbol_count,
+ const unsigned char* plocal_symbols) = 0;
// Scan the relocs for a section, and record any information
- // required for the symbol. OPTIONS is the command line options.
- // SYMTAB is the symbol table. OBJECT is the object in which the
- // section appears. DATA_SHNDX is the section index that these
- // relocs apply to. SH_TYPE is the type of the relocation section,
- // SHT_REL or SHT_RELA. PRELOCS points to the relocation data.
- // RELOC_COUNT is the number of relocs. LOCAL_SYMBOL_COUNT is the
- // number of local symbols. OUTPUT_SECTION is the output section.
+ // required for the symbol. SYMTAB is the symbol table. OBJECT is
+ // the object in which the section appears. DATA_SHNDX is the
+ // section index that these relocs apply to. SH_TYPE is the type of
+ // the relocation section, SHT_REL or SHT_RELA. PRELOCS points to
+ // the relocation data. RELOC_COUNT is the number of relocs.
+ // LOCAL_SYMBOL_COUNT is the number of local symbols.
+ // OUTPUT_SECTION is the output section.
// NEEDS_SPECIAL_OFFSET_HANDLING is true if offsets to the output
// sections are not mapped as usual. PLOCAL_SYMBOLS points to the
// local symbol data from OBJECT. GLOBAL_SYMBOLS is the array of
// pointers to the global symbol table from OBJECT.
virtual void
- scan_relocs(const General_options& options,
- Symbol_table* symtab,
+ scan_relocs(Symbol_table* symtab,
Layout* layout,
Sized_relobj<size, big_endian>* object,
unsigned int data_shndx,
@@ -533,8 +530,7 @@ class Sized_target : public Target
// like scan_relocs, with an additional Relocatable_relocs
// parameter, used to record the disposition of the relocs.
virtual void
- scan_relocatable_relocs(const General_options& options,
- Symbol_table* symtab,
+ scan_relocatable_relocs(Symbol_table* symtab,
Layout* layout,
Sized_relobj<size, big_endian>* object,
unsigned int data_shndx,
diff --git a/gold/testsuite/testfile.cc b/gold/testsuite/testfile.cc
index d66189a..88e5b81 100644
--- a/gold/testsuite/testfile.cc
+++ b/gold/testsuite/testfile.cc
@@ -44,17 +44,15 @@ class Target_test : public Sized_target<size, big_endian>
{ }
void
- gc_process_relocs(const General_options&, Symbol_table*, Layout*,
- Sized_relobj<size, big_endian>*, unsigned int,
- unsigned int, const unsigned char*, size_t, Output_section*,
- bool, size_t, const unsigned char*)
+ gc_process_relocs(Symbol_table*, Layout*, Sized_relobj<size, big_endian>*,
+ unsigned int, unsigned int, const unsigned char*, size_t,
+ Output_section*, bool, size_t, const unsigned char*)
{ ERROR("call to Target_test::gc_process_relocs"); }
void
- scan_relocs(const General_options&, Symbol_table*, Layout*,
- Sized_relobj<size, big_endian>*, unsigned int,
- unsigned int, const unsigned char*, size_t, Output_section*,
- bool, size_t, const unsigned char*)
+ scan_relocs(Symbol_table*, Layout*, Sized_relobj<size, big_endian>*,
+ unsigned int, unsigned int, const unsigned char*, size_t,
+ Output_section*, bool, size_t, const unsigned char*)
{ ERROR("call to Target_test::scan_relocs"); }
void
@@ -65,7 +63,7 @@ class Target_test : public Sized_target<size, big_endian>
{ ERROR("call to Target_test::relocate_section"); }
void
- scan_relocatable_relocs(const General_options&, Symbol_table*, Layout*,
+ scan_relocatable_relocs(Symbol_table*, Layout*,
Sized_relobj<size, big_endian>*, unsigned int,
unsigned int, const unsigned char*,
size_t, Output_section*, bool, size_t,
diff --git a/gold/x86_64.cc b/gold/x86_64.cc
index 3562065..ea8915c 100644
--- a/gold/x86_64.cc
+++ b/gold/x86_64.cc
@@ -74,8 +74,7 @@ class Target_x86_64 : public Target_freebsd<64, false>
// Scan the relocations to look for symbol adjustments.
void
- gc_process_relocs(const General_options& options,
- Symbol_table* symtab,
+ gc_process_relocs(Symbol_table* symtab,
Layout* layout,
Sized_relobj<64, false>* object,
unsigned int data_shndx,
@@ -89,8 +88,7 @@ class Target_x86_64 : public Target_freebsd<64, false>
// Scan the relocations to look for symbol adjustments.
void
- scan_relocs(const General_options& options,
- Symbol_table* symtab,
+ scan_relocs(Symbol_table* symtab,
Layout* layout,
Sized_relobj<64, false>* object,
unsigned int data_shndx,
@@ -126,8 +124,7 @@ class Target_x86_64 : public Target_freebsd<64, false>
// Scan the relocs during a relocatable link.
void
- scan_relocatable_relocs(const General_options& options,
- Symbol_table* symtab,
+ scan_relocatable_relocs(Symbol_table* symtab,
Layout* layout,
Sized_relobj<64, false>* object,
unsigned int data_shndx,
@@ -189,8 +186,7 @@ class Target_x86_64 : public Target_freebsd<64, false>
{ }
inline void
- local(const General_options& options, Symbol_table* symtab,
- Layout* layout, Target_x86_64* target,
+ local(Symbol_table* symtab, Layout* layout, Target_x86_64* target,
Sized_relobj<64, false>* object,
unsigned int data_shndx,
Output_section* output_section,
@@ -198,8 +194,7 @@ class Target_x86_64 : public Target_freebsd<64, false>
const elfcpp::Sym<64, false>& lsym);
inline void
- global(const General_options& options, Symbol_table* symtab,
- Layout* layout, Target_x86_64* target,
+ global(Symbol_table* symtab, Layout* layout, Target_x86_64* target,
Sized_relobj<64, false>* object,
unsigned int data_shndx,
Output_section* output_section,
@@ -1002,8 +997,7 @@ Target_x86_64::Scan::check_non_pic(Relobj* object, unsigned int r_type)
// Scan a relocation for a local symbol.
inline void
-Target_x86_64::Scan::local(const General_options&,
- Symbol_table* symtab,
+Target_x86_64::Scan::local(Symbol_table* symtab,
Layout* layout,
Target_x86_64* target,
Sized_relobj<64, false>* object,
@@ -1283,8 +1277,7 @@ Target_x86_64::Scan::unsupported_reloc_global(Sized_relobj<64, false>* object,
// Scan a relocation for a global symbol.
inline void
-Target_x86_64::Scan::global(const General_options&,
- Symbol_table* symtab,
+Target_x86_64::Scan::global(Symbol_table* symtab,
Layout* layout,
Target_x86_64* target,
Sized_relobj<64, false>* object,
@@ -1576,8 +1569,7 @@ Target_x86_64::Scan::global(const General_options&,
}
void
-Target_x86_64::gc_process_relocs(const General_options& options,
- Symbol_table* symtab,
+Target_x86_64::gc_process_relocs(Symbol_table* symtab,
Layout* layout,
Sized_relobj<64, false>* object,
unsigned int data_shndx,
@@ -1597,7 +1589,6 @@ Target_x86_64::gc_process_relocs(const General_options& options,
gold::gc_process_relocs<64, false, Target_x86_64, elfcpp::SHT_RELA,
Target_x86_64::Scan>(
- options,
symtab,
layout,
this,
@@ -1614,8 +1605,7 @@ Target_x86_64::gc_process_relocs(const General_options& options,
// Scan relocations for a section.
void
-Target_x86_64::scan_relocs(const General_options& options,
- Symbol_table* symtab,
+Target_x86_64::scan_relocs(Symbol_table* symtab,
Layout* layout,
Sized_relobj<64, false>* object,
unsigned int data_shndx,
@@ -1636,7 +1626,6 @@ Target_x86_64::scan_relocs(const General_options& options,
gold::scan_relocs<64, false, Target_x86_64, elfcpp::SHT_RELA,
Target_x86_64::Scan>(
- options,
symtab,
layout,
this,
@@ -2526,8 +2515,7 @@ Target_x86_64::Relocatable_size_for_reloc::get_size_for_reloc(
// Scan the relocs during a relocatable link.
void
-Target_x86_64::scan_relocatable_relocs(const General_options& options,
- Symbol_table* symtab,
+Target_x86_64::scan_relocatable_relocs(Symbol_table* symtab,
Layout* layout,
Sized_relobj<64, false>* object,
unsigned int data_shndx,
@@ -2547,7 +2535,6 @@ Target_x86_64::scan_relocatable_relocs(const General_options& options,
gold::scan_relocatable_relocs<64, false, elfcpp::SHT_RELA,
Scan_relocatable_relocs>(
- options,
symtab,
layout,
object,