aboutsummaryrefslogtreecommitdiff
path: root/gold/target.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2013-03-10 23:08:18 +0000
committerAlan Modra <amodra@gmail.com>2013-03-10 23:08:18 +0000
commitdc3714f31f5b15f9c078dcf7ddaa705dacd313c0 (patch)
tree29717f9ed43f8fa606369975acac03a8e719c056 /gold/target.h
parent3bcc5422890014bfa8f8602d3c680c29a3384c29 (diff)
downloadgdb-dc3714f31f5b15f9c078dcf7ddaa705dacd313c0.zip
gdb-dc3714f31f5b15f9c078dcf7ddaa705dacd313c0.tar.gz
gdb-dc3714f31f5b15f9c078dcf7ddaa705dacd313c0.tar.bz2
* gold.cc (queue_middle_tasks): Move detect_odr_violations..
* layout.cc (Layout_task_runner::run): ..to here. * symtab.h (struct Symbol_location): Extract from.. (class Symbol_table): ..here. * symtab.cc (Symbol_table::linenos_from_loc): Invoke function_location. * target.h (class Target): Add function_location and do_function_location functions. (class Sized_target): Add do_function_location. * object.h (class Sized_relobj_file): Move find_shdr.. (class Object): ..to here. * object.cc: Likewise. Update to suit. Instantiate. (Sized_relobj_file::find_eh_frame): Update find_shdr call. * powerpc.cc (class Powerpc_dynobj): New. (Target_powerpc::do_function_location): New function. (Powerpc_relobj::do_find_special_sections): Update find_shdr call. (Powerpc_dynobj::do_read_symbols): New function. (Target_powerpc::do_make_elf_object): Make a Powerpc_dynobj.
Diffstat (limited to 'gold/target.h')
-rw-r--r--gold/target.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/gold/target.h b/gold/target.h
index d75711e..6523c04 100644
--- a/gold/target.h
+++ b/gold/target.h
@@ -61,6 +61,7 @@ class Output_data_got_base;
class Output_section;
class Input_objects;
class Task;
+struct Symbol_location;
// The abstract class for target specific handling.
@@ -286,6 +287,12 @@ class Target
tls_offset_for_global(Symbol* gsym, unsigned int got_indx) const
{ return do_tls_offset_for_global(gsym, got_indx); }
+ // For targets that use function descriptors, if LOC is the location
+ // of a function, modify it to point at the function entry location.
+ void
+ function_location(Symbol_location* loc) const
+ { return do_function_location(loc); }
+
// Return whether this target can use relocation types to determine
// if a function's address is taken.
bool
@@ -575,6 +582,9 @@ class Target
do_tls_offset_for_global(Symbol*, unsigned int) const
{ gold_unreachable(); }
+ virtual void
+ do_function_location(Symbol_location*) const = 0;
+
// Virtual function which may be overriden by the child class.
virtual bool
do_can_check_for_function_pointers() const
@@ -1009,6 +1019,10 @@ class Sized_target : public Target
Object*, unsigned int,
typename elfcpp::Elf_types<size>::Elf_Addr) const
{ }
+
+ virtual void
+ do_function_location(Symbol_location*) const
+ { }
};
} // End namespace gold.