diff options
author | Ian Lance Taylor <iant@google.com> | 2007-09-19 06:02:29 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2007-09-19 06:02:29 +0000 |
commit | 86f2e683461018af5274634f0b119b39576b17e0 (patch) | |
tree | 7c396540d3d7b2a9c1804ab484dc4ce21513d1e0 /gold/symtab.h | |
parent | 8ae3da9046f6ef7b39eaf19cc85ee05f5c002c07 (diff) | |
download | gdb-86f2e683461018af5274634f0b119b39576b17e0.zip gdb-86f2e683461018af5274634f0b119b39576b17e0.tar.gz gdb-86f2e683461018af5274634f0b119b39576b17e0.tar.bz2 |
Let special symbols override existing symbols rather than
reinitializing them.
Diffstat (limited to 'gold/symtab.h')
-rw-r--r-- | gold/symtab.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/gold/symtab.h b/gold/symtab.h index 816afb3..534ee0d 100644 --- a/gold/symtab.h +++ b/gold/symtab.h @@ -404,6 +404,10 @@ class Symbol override_base(const elfcpp::Sym<size, big_endian>&, Object* object, const char* version); + // Override existing symbol with a special symbol. + void + override_base_with_special(const Symbol* from); + private: Symbol(const Symbol&); Symbol& operator=(const Symbol&); @@ -549,6 +553,10 @@ class Sized_symbol : public Symbol override(const elfcpp::Sym<size, big_endian>&, Object* object, const char* version); + // Override existing symbol with a special symbol. + void + override_with_special(const Sized_symbol<size>*); + // Return the symbol's value. Value_type value() const @@ -905,12 +913,22 @@ class Symbol_table resolve(Sized_symbol<size>* to, const Sized_symbol<size>* from, const char* version ACCEPT_SIZE_ENDIAN); + // Whether we should override a symbol, based on flags in + // resolve.cc. + static bool + should_override(const Symbol*, unsigned int, bool*); + + // Whether we should override a symbol with a special symbol which + // is automatically defined by the linker. + static bool + should_override_with_special(const Symbol*); + // Define a special symbol. template<int size, bool big_endian> Sized_symbol<size>* define_special_symbol(const Target* target, const char* name, - const char* version, bool only_if_ref - ACCEPT_SIZE_ENDIAN); + const char* version, bool only_if_ref, + Sized_symbol<size>** poldsym ACCEPT_SIZE_ENDIAN); // Define a symbol in an Output_data, sized version. template<int size> |