diff options
author | Cary Coutant <ccoutant@google.com> | 2009-05-19 22:14:17 +0000 |
---|---|---|
committer | Cary Coutant <ccoutant@google.com> | 2009-05-19 22:14:17 +0000 |
commit | 6551490093fe8f141c073324b2c4387ce93fa712 (patch) | |
tree | c35b9675ce37ee8303e3c60cc04b57b78beed857 /gold/archive.h | |
parent | c1711530e652a14bc0df9b603c73e350b5dfe5ec (diff) | |
download | gdb-6551490093fe8f141c073324b2c4387ce93fa712.zip gdb-6551490093fe8f141c073324b2c4387ce93fa712.tar.gz gdb-6551490093fe8f141c073324b2c4387ce93fa712.tar.bz2 |
2009-05-19 Doug Kwan <dougkwan@google.com>
* archive.cc (Archive::Archive): Move constructor from archive.h
to here. Initialize no_export_.
(Archive::get_elf_object_for_member): Set no_export flag of object.
* archive.h (Archive::Archive): Move constructor body to
archive.cc.
(Archive::no_export): New method.
(Archive::no_export_): New field.
* object.h (Object::Object): Initialize no_export_ to false.
(Object::no_export, Object::set_no_export): New methods.
(Object::no_export_): New field.
* options.cc (General_options::parse_exclude_libs): New method.
(General_options::check_excluded_libs) Same.
* options.h (exclude_libs): New option.
(General_options::check_excluded_libs): New method declaration.
(General_options::excluded_libs_): New field.
* symtab.cc (Symbol_table::add_from_relobj): Hide symbols with
default or protected visibility if an object has no-export flag set.
testsuite/Makefile.am (check_PROGRAMS): Add exclude_libs_test.
(check_SCRIPTS): Add exclude_libs_test.sh.
(check_DATA): Add exclude_libs_test.syms.
(MOSTLYCLEANFILES): Add exclude_libs_test.syms,
libexclude_libs_test_1.a and libexclude_libs_test_2.a.
(exclude_libs_test_SOURCES, exclude_libs_test_DEPENDENCIES,
exclude_libs_test_LDFLAGS and exclude_libs_test_LDADD): Define.
(exclude_libs_test.syms, libexclude_libs_test_1.a,
libexclude_libs_test_2.a): New rules.
* testsuite/Makefile.in: Regenerate.
* testsuite/exclude_libs_test.c: New file.
* testsuite/exclude_libs_test.sh: Ditto.
* testsuite/exclude_libs_test_1.c: Ditto.
* testsuite/exclude_libs_test_2.c: Ditto.
Diffstat (limited to 'gold/archive.h')
-rw-r--r-- | gold/archive.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gold/archive.h b/gold/archive.h index e1d0262..7f567b7 100644 --- a/gold/archive.h +++ b/gold/archive.h @@ -49,12 +49,7 @@ class Archive { public: Archive(const std::string& name, Input_file* input_file, - bool is_thin_archive, Dirsearch* dirpath, Task* task) - : name_(name), input_file_(input_file), armap_(), armap_names_(), - extended_names_(), armap_checked_(), seen_offsets_(), members_(), - is_thin_archive_(is_thin_archive), included_member_(false), - nested_archives_(), dirpath_(dirpath), task_(task), num_members_(0) - { } + bool is_thin_archive, Dirsearch* dirpath, Task* task); // The length of the magic string at the start of an archive. static const int sarmag = 8; @@ -148,6 +143,11 @@ class Archive size_t count_members(); + // Return the no-export flag. + bool + no_export() + { return this->no_export_; } + private: Archive(const Archive&); Archive& operator=(const Archive&); @@ -293,6 +293,8 @@ class Archive Task *task_; // Number of members in this archive; unsigned int num_members_; + // True if we exclude this library archive from automatic export. + bool no_export_; }; // This class is used to read an archive and pick out the desired |