diff options
Diffstat (limited to 'src/common/module.h')
-rw-r--r-- | src/common/module.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/common/module.h b/src/common/module.h index 7b1a0db0..db8dabd5 100644 --- a/src/common/module.h +++ b/src/common/module.h @@ -205,6 +205,14 @@ class Module { // Write is used. void SetLoadAddress(Address load_address); + // Sets address filtering on elements added to the module. This allows + // libraries with extraneous debug symbols to generate symbol files containing + // only relevant symbols. For example, an LLD-generated partition library may + // contain debug information pertaining to all partitions derived from a + // single "combined" library. Filtering applies only to elements added after + // this method is called. + void SetAddressRanges(const vector<Range>& ranges); + // Add FUNCTION to the module. FUNCTION's name must not be empty. // This module owns all Function objects added with this function: // destroying the module destroys them as well. @@ -302,6 +310,10 @@ class Module { // if an error occurs, return false, and leave errno set. static bool WriteRuleMap(const RuleMap &rule_map, std::ostream &stream); + // Returns true of the specified address resides with an specified address + // range, or if no ranges have been specified. + bool AddressIsInModule(Address address) const; + // Module header entries. string name_, os_, architecture_, id_, code_id_; @@ -310,6 +322,10 @@ class Module { // address. Address load_address_; + // The set of valid address ranges of the module. If specified, attempts to + // add elements residing outside these ranges will be silently filtered. + vector<Range> address_ranges_; + // Relation for maps whose keys are strings shared with some other // structure. struct CompareStringPtrs { |