diff options
Diffstat (limited to 'gold/target.h')
-rw-r--r-- | gold/target.h | 14 |
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. |