android_bionic/tests/libs
Ryan Prichard 8f639a4096 Allow invoking the linker on an executable.
The executable can be inside a zip file using the same syntax used for
shared objects: path.zip!/libentry.so.

The linker currently requires an absolute path. This restriction could be
loosened, but it didn't seem important? If it allowed non-absolute paths,
we'd need to decide how to handle:
 - foo/bar      (relative to CWD?)
 - foo          (search PATH / LD_LIBRARY_PATH, or also relative to CWD?)
 - foo.zip!/bar (normalize_path() requires an absolute path)

The linker adjusts the argc/argv passed to main() and to constructor
functions to hide the initial linker argument, but doesn't adjust the auxv
vector or files like /proc/self/{exe,cmdline,auxv,stat}. Those files will
report that the kernel loaded the linker as an executable.

I think the linker_logger.cpp change guarding against (g_argv == NULL)
isn't actually necessary, but it seemed like a good idea given that I'm
delaying initialization of g_argv until after C++ constructors have run.

Bug: http://b/112050209
Test: bionic unit tests
Change-Id: I846faf98b16fd34218946f6167e8b451897debe5
2018-10-10 14:31:06 -07:00
..
Android.bp Allow invoking the linker on an executable. 2018-10-10 14:31:06 -07:00
Android.build.dlext_testzip.mk Allow invoking the linker on an executable. 2018-10-10 14:31:06 -07:00
Android.build.dlopen_2_parents_reloc.mk
Android.build.dlopen_check_order_dlsym.mk
Android.build.dlopen_check_order_reloc_main_executable.mk
Android.build.dlopen_check_order_reloc_siblings.mk
Android.build.dt_runpath.mk
Android.build.linker_namespaces.mk Fix logic in loading dependencies crossing namespace boundaries 2017-12-10 22:04:55 +01:00
Android.build.pthread_atfork.mk
Android.build.testlib.host.mk
Android.build.testlib.internal.mk
Android.build.testlib.mk
Android.build.testlib.target.mk
Android.build.versioned_lib.mk
Android.mk Use -Werror in bionic/tests 2017-11-16 13:51:17 -08:00
atexit_testlib.cpp
bionic_tests_zipalign.cpp
cfi_test_bad_lib.cpp
cfi_test_helper.cpp
cfi_test_helper2.cpp
cfi_test_lib.cpp
check_rtld_next_from_library.cpp Fix for dlfcn.rtld_next_from_library. 2017-11-03 15:00:09 -07:00
dl_df_1_global.cpp
dl_df_1_global_dummy.cpp
dl_df_1_use_global.cpp
dl_preempt_library_1.cpp
dl_preempt_library_2.cpp
dlext_test_library.cpp
dlopen_2_parents_reloc_answer.cpp
dlopen_b.cpp
dlopen_check_init_fini_child.cpp
dlopen_check_init_fini_grand_child.cpp
dlopen_check_init_fini_root.cpp
dlopen_check_order_dlsym_answer.cpp
dlopen_check_order_reloc_answer.cpp
dlopen_check_order_reloc_answer_impl.cpp
dlopen_check_order_reloc_grandchild_answer.cpp
dlopen_check_order_reloc_grandchild_answer_impl.cpp
dlopen_check_order_reloc_nephew_answer.cpp
dlopen_check_order_reloc_root_answer.cpp
dlopen_check_order_reloc_root_answer_impl.cpp
dlopen_nodelete_1.cpp
dlopen_nodelete_2.cpp
dlopen_nodelete_dt_flags_1.cpp
dlopen_testlib_dlopen_from_ctor.cpp
dlopen_testlib_ifunc.cpp Modernize codebase by replacing NULL with nullptr 2018-08-02 18:09:44 -07:00
dlopen_testlib_ifunc_variable.cpp
dlopen_testlib_ifunc_variable_impl.cpp Modernize codebase by replacing NULL with nullptr 2018-08-02 18:09:44 -07:00
dlopen_testlib_loopy_a.cpp
dlopen_testlib_loopy_b.cpp
dlopen_testlib_loopy_c.cpp
dlopen_testlib_loopy_invalid.cpp
dlopen_testlib_loopy_root.cpp
dlopen_testlib_missing_symbol.cpp Fix logic in loading dependencies crossing namespace boundaries 2017-12-10 22:04:55 +01:00
dlopen_testlib_relo_check_dt_needed_order.cpp
dlopen_testlib_relo_check_dt_needed_order_1.cpp
dlopen_testlib_relo_check_dt_needed_order_2.cpp
dlopen_testlib_simple.cpp
dlopen_weak_undefined.cpp
dlsym_from_this_functions.cpp
dlsym_from_this_symbol.cpp
dlsym_from_this_symbol2.cpp
dlsym_weak_function.cpp
elf_tls_test_library.cpp Reject .so files using ELF TLS. 2018-03-23 18:46:07 -07:00
empty.cpp
exec_linker_helper.cpp Allow invoking the linker on an executable. 2018-10-10 14:31:06 -07:00
exec_linker_helper_lib.cpp Allow invoking the linker on an executable. 2018-10-10 14:31:06 -07:00
ld_config_test_helper.cpp vdso should be available in all namespaces 2018-05-12 10:58:00 +02:00
ld_config_test_helper_lib1.cpp
ld_config_test_helper_lib2.cpp
ld_config_test_helper_lib3.cpp
ld_preload_test_helper.cpp
ld_preload_test_helper_lib1.cpp
ld_preload_test_helper_lib2.cpp
libnstest_ns_a_public1.cpp linker: Allow link namespaces without name filters 2018-01-25 14:45:29 +08:00
libnstest_ns_a_public1_internal.cpp linker: Allow link namespaces without name filters 2018-01-25 14:45:29 +08:00
libnstest_ns_b_public2.cpp linker: Allow link namespaces without name filters 2018-01-25 14:45:29 +08:00
libnstest_ns_b_public3.cpp linker: Allow link namespaces without name filters 2018-01-25 14:45:29 +08:00
libs_utils.h
namespaces_dlopened.cpp
namespaces_private.cpp
namespaces_public.cpp
namespaces_public_internal.cpp
namespaces_root.cpp
preinit_getauxval_test_helper.cpp
preinit_syscall_test_helper.cpp
pthread_atfork.cpp
thread_local_dtor.cpp Fix dlclose for libraries with thread_local dtors 2018-01-10 10:24:06 +01:00
thread_local_dtor2.cpp Add secondary counter in place of tls_nodelete flag 2018-05-30 10:56:59 +02:00
versioned_lib_other.cpp
versioned_lib_other.map
versioned_lib_v1.cpp
versioned_lib_v1.map
versioned_lib_v2.cpp
versioned_lib_v2.map
versioned_lib_v3.cpp
versioned_lib_v3.map
versioned_uselib.cpp
versioned_uselib.map