| OLD | NEW |
| 1 // dynobj.h -- dynamic object support for gold -*- C++ -*- | 1 // dynobj.h -- dynamic object support for gold -*- C++ -*- |
| 2 | 2 |
| 3 // Copyright 2006, 2007, 2008 Free Software Foundation, Inc. | 3 // Copyright 2006, 2007, 2008 Free Software Foundation, Inc. |
| 4 // Written by Ian Lance Taylor <iant@google.com>. | 4 // Written by Ian Lance Taylor <iant@google.com>. |
| 5 | 5 |
| 6 // This file is part of gold. | 6 // This file is part of gold. |
| 7 | 7 |
| 8 // This program is free software; you can redistribute it and/or modify | 8 // This program is free software; you can redistribute it and/or modify |
| 9 // it under the terms of the GNU General Public License as published by | 9 // it under the terms of the GNU General Public License as published by |
| 10 // the Free Software Foundation; either version 3 of the License, or | 10 // the Free Software Foundation; either version 3 of the License, or |
| (...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 577 | 577 |
| 578 // Get the dynamic object to use for SYM. | 578 // Get the dynamic object to use for SYM. |
| 579 Dynobj* | 579 Dynobj* |
| 580 get_dynobj_for_sym(const Symbol_table*, const Symbol* sym) const; | 580 get_dynobj_for_sym(const Symbol_table*, const Symbol* sym) const; |
| 581 | 581 |
| 582 // Return the version index to use for SYM. | 582 // Return the version index to use for SYM. |
| 583 unsigned int | 583 unsigned int |
| 584 version_index(const Symbol_table*, const Stringpool*, | 584 version_index(const Symbol_table*, const Stringpool*, |
| 585 const Symbol* sym) const; | 585 const Symbol* sym) const; |
| 586 | 586 |
| 587 // Define the base version of a shared library. |
| 588 void |
| 589 define_base_version(Stringpool* dynpool); |
| 590 |
| 587 // We keep a hash table mapping canonicalized name/version pairs to | 591 // We keep a hash table mapping canonicalized name/version pairs to |
| 588 // a version base. | 592 // a version base. |
| 589 typedef std::pair<Stringpool::Key, Stringpool::Key> Key; | 593 typedef std::pair<Stringpool::Key, Stringpool::Key> Key; |
| 590 | 594 |
| 591 struct Version_table_hash | 595 struct Version_table_hash |
| 592 { | 596 { |
| 593 size_t | 597 size_t |
| 594 operator()(const Key& k) const | 598 operator()(const Key& k) const |
| 595 { return k.first + k.second; } | 599 { return k.first + k.second; } |
| 596 }; | 600 }; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 609 Defs defs_; | 613 Defs defs_; |
| 610 // The version references. | 614 // The version references. |
| 611 Needs needs_; | 615 Needs needs_; |
| 612 // The mapping from a canonicalized version/filename pair to a | 616 // The mapping from a canonicalized version/filename pair to a |
| 613 // version index. The filename may be NULL. | 617 // version index. The filename may be NULL. |
| 614 Version_table version_table_; | 618 Version_table version_table_; |
| 615 // Whether the version indexes have been set. | 619 // Whether the version indexes have been set. |
| 616 bool is_finalized_; | 620 bool is_finalized_; |
| 617 // Contents of --version-script, if passed, or NULL. | 621 // Contents of --version-script, if passed, or NULL. |
| 618 const Version_script_info& version_script_; | 622 const Version_script_info& version_script_; |
| 623 // Whether we need to insert a base version. This is only used for |
| 624 // shared libaries and is cleared when the base version is defined. |
| 625 bool needs_base_version_; |
| 619 }; | 626 }; |
| 620 | 627 |
| 621 } // End namespace gold. | 628 } // End namespace gold. |
| 622 | 629 |
| 623 #endif // !defined(GOLD_DYNOBJ_H) | 630 #endif // !defined(GOLD_DYNOBJ_H) |
| OLD | NEW |