0f7c0701ba
to File_read::claim_for_plugin. * descriptors.cc (Descriptors::open): Remove reference to is_claimed. (Descriptors::claim_for_plugin): Remove. * descriptors.h (Descriptors::claim_for_plugin): Remove. (Descriptors::is_claimed): Remove. (claim_descriptor_for_plugin): Remove. * fileread.cc (File_read::claim_for_plugin): Remove. * fileread.h (File_read::claim_for_plugin): Remove. (File_read::descriptor): Reopen descriptor if necessary. * plugin.cc (Plugin::load): Add two new APIs to transfer vector. (Plugin_manager::all_symbols_read): Add task parameter. Change all callers. (Plugin_manager::get_input_file): New function. (Plugin_manager::release_input_file): New function. (Pluginobj::Pluginobj): Add filesize parameter and initialize corresponding data member. (Sized_pluginobj::Sized_pluginobj): Add filesize parameter and pass to base constructor. Change all callers. (get_input_file, release_input_file): New functions. (make_sized_plugin_object): Add filesize parameter. Change all callers. * plugin.h (Plugin_manager::Plugin_manager): Initialize task_ member. (Plugin_manager::all_symbols_read): Add task parameter. (Plugin_manager::get_input_file): New function. (Plugin_manager::release_input_file): New function. (Plugin_manager::task_): New data member. (Pluginobj::Pluginobj): Add filesize parameter. (Pluginobj::filename): New function. (Pluginobj::descriptor): New function. (Pluginobj::filesize): New function. (Pluginobj::filesize_): New data member. (Sized_pluginobj::Sized_pluginobj): Add filesize parameter. * readsyms.cc (Read_symbols::do_read_symbols): Remove call to File_read::claim_for_plugin; use Object::unlock to unlock the file. * testsuite/Makefile.am (plugin_test_4): New test case for plugins with archive libraries. * testsuite/Makefile.in: Regenerate. * testsuite/plugin_test.c (struct sym_info): New type. (get_input_file, release_input_file): New static variables. (onload): Capture new transfer vector entries. (claim_file_hook): Stop reading at end of file according to filesize. Factor out parsing of readelf output into separate function. (all_symbols_read_hook): Exercise get_input_file and release_input_file APIs and get the source file name from the symbol table. Convert source file name to corresponding object file name. Print info message when adding new input files. (parse_readelf_line): New function. * testsuite/plugin_test_1.sh: Add checks for new info messages. * testsuite/plugin_test_2.sh: Likewise. * testsuite/plugin_test_3.sh: Likewise. * testsuite/plugin_test_4.sh: New test case. |
||
---|---|---|
.. | ||
basic_test.cc | ||
binary_test.cc | ||
binary_unittest.cc | ||
binary.in | ||
common_test_1.c | ||
constructor_test.cc | ||
copy_test_1.cc | ||
copy_test_2.cc | ||
copy_test.cc | ||
debug_msg.cc | ||
debug_msg.sh | ||
dynamic_list.sh | ||
dynamic_list.t | ||
exception_test_1.cc | ||
exception_test_2.cc | ||
exception_test_main.cc | ||
exception_test.h | ||
initpri1.c | ||
justsyms_1.cc | ||
justsyms_2.cc | ||
justsyms.t | ||
Makefile.am | ||
Makefile.in | ||
many_sections_test.cc | ||
object_unittest.cc | ||
odr_violation1.cc | ||
odr_violation2.cc | ||
plugin_test_1.sh | ||
plugin_test_2.sh | ||
plugin_test_3.sh | ||
plugin_test_4.sh | ||
plugin_test.c | ||
protected_1.cc | ||
protected_2.cc | ||
protected_3.cc | ||
protected_main_1.cc | ||
protected_main_2.cc | ||
protected_main_3.cc | ||
relro_script_test.t | ||
relro_test_main.cc | ||
relro_test.cc | ||
script_test_1.cc | ||
script_test_1.t | ||
script_test_2.cc | ||
script_test_2.t | ||
script_test_2a.cc | ||
script_test_2b.cc | ||
script_test_3.sh | ||
script_test_3.t | ||
script_test_4.sh | ||
script_test_4.t | ||
test.cc | ||
test.h | ||
testfile.cc | ||
testfile.h | ||
testmain.cc | ||
thin_archive_main.cc | ||
thin_archive_test_1.cc | ||
thin_archive_test_2.cc | ||
thin_archive_test_3.cc | ||
thin_archive_test_4.cc | ||
tls_test_c.c | ||
tls_test_file2.cc | ||
tls_test_main.cc | ||
tls_test.cc | ||
tls_test.h | ||
two_file_test_1.cc | ||
two_file_test_1b.cc | ||
two_file_test_2.cc | ||
two_file_test_main.cc | ||
two_file_test.h | ||
undef_symbol_main.cc | ||
undef_symbol.cc | ||
undef_symbol.sh | ||
ver_matching_def.cc | ||
ver_matching_test.sh | ||
ver_test_1.cc | ||
ver_test_2.cc | ||
ver_test_2.script | ||
ver_test_2.sh | ||
ver_test_3.cc | ||
ver_test_4.cc | ||
ver_test_4.script | ||
ver_test_4.sh | ||
ver_test_5.cc | ||
ver_test_5.script | ||
ver_test_5.sh | ||
ver_test_6.c | ||
ver_test_7.cc | ||
ver_test_7.sh | ||
ver_test_8.script | ||
ver_test_9.cc | ||
ver_test_10.script | ||
ver_test_10.sh | ||
ver_test_main_2.cc | ||
ver_test_main.cc | ||
ver_test.h | ||
version_script.map | ||
weak_alias_test_1.cc | ||
weak_alias_test_2.cc | ||
weak_alias_test_3.cc | ||
weak_alias_test_4.cc | ||
weak_alias_test_main.cc | ||
weak_plt_main.cc | ||
weak_plt_shared.cc | ||
weak_plt.sh | ||
weak_test.cc | ||
weak_undef_file1.cc | ||
weak_undef_file2.cc | ||
weak_undef_test.cc | ||
weak_undef.h |