OSDN Git Service

2009-05-19 Doug Kwan <dougkwan@google.com>
authorCary Coutant <ccoutant@google.com>
Tue, 19 May 2009 22:14:17 +0000 (22:14 +0000)
committerCary Coutant <ccoutant@google.com>
Tue, 19 May 2009 22:14:17 +0000 (22:14 +0000)
commit8d6f9c3d26c26fa4420b23cdb58e0edd8cb89e05
treeb47bb8aafa4cfa164153289cf53f506ddaa29d9c
parent0aa31775320139f5b8ce133995cc7be8cb46a31b
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.
13 files changed:
gold/ChangeLog
gold/archive.cc
gold/archive.h
gold/object.h
gold/options.cc
gold/options.h
gold/symtab.cc
gold/testsuite/Makefile.am
gold/testsuite/Makefile.in
gold/testsuite/exclude_libs_test.c [new file with mode: 0644]
gold/testsuite/exclude_libs_test.sh [new file with mode: 0755]
gold/testsuite/exclude_libs_test_1.c [new file with mode: 0644]
gold/testsuite/exclude_libs_test_2.c [new file with mode: 0644]