LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 26693 - lld does not implement --dynamic-list (used by sanitizers)
Summary: lld does not implement --dynamic-list (used by sanitizers)
Status: RESOLVED FIXED
Alias: None
Product: lld
Classification: Unclassified
Component: All Bugs (show other bugs)
Version: unspecified
Hardware: PC FreeBSD
: P normal
Assignee: Unassigned LLVM Bugs
URL:
Keywords:
Depends on:
Blocks: 23214
  Show dependency tree
 
Reported: 2016-02-22 08:56 PST by emaste
Modified: 2016-04-18 13:37 PDT (History)
4 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description emaste 2016-02-22 08:56:13 PST
In clang/lib/Driver/Tools.cpp addSanitizerDynamicList(), clang uses the --dynamic-list option, and my so check-asan in my self-hosted llvm/clang/lld test fails.

FAILED: cd /tank/emaste/src/llvm/build-nodebug/projects/compiler-rt/lib/asan/tests && /tank/emaste/src/llvm/build-nodebug/./bin/clang ASAN_INST_TEST_OBJECTS.gtest-all.cc.x86_64-inline.o ASAN_INST_TEST_OBJECTS.asan_asm_test.cc.x86_64-inline.o ASAN_INST_TEST_OBJECTS.asan_globals_test.cc.x86_64-inline.o ASAN_INST_TEST_OBJECTS.asan_interface_test.cc.x86_64-inline.o ASAN_INST_TEST_OBJECTS.asan_test.cc.x86_64-inline.o ASAN_INST_TEST_OBJECTS.asan_oob_test.cc.x86_64-inline.o ASAN_INST_TEST_OBJECTS.asan_mem_test.cc.x86_64-inline.o ASAN_INST_TEST_OBJECTS.asan_str_test.cc.x86_64-inline.o ASAN_INST_TEST_OBJECTS.asan_test_main.cc.x86_64-inline.o -o /tank/emaste/src/llvm/build-nodebug/projects/compiler-rt/lib/asan/tests/default/Asan-x86_64-inline-Test -Wl,-z,origin -Wl,-allow-shlib-undefined --driver-mode=g++ -fsanitize=address -m64
warning: unknown argument: --dynamic-list=/tank/emaste/src/llvm/build-nodebug/bin/../lib/clang/3.9.0/lib/freebsd/libclang_rt.asan-x86_64.a.syms

From the ld man page --dynamic-list is documented as:

       --dynamic-list=dynamic-list-file
           Specify the name of a dynamic list file to the linker.  This is
           typically used when creating shared libraries to specify a list of
           global symbols whose references shouldn't be bound to the
           definition within the shared library, or creating dynamically
           linked executables to specify a list of symbols which should be
           added to the symbol table in the executable.  This option is only
           meaningful on ELF platforms which support shared libraries.
Comment 1 emaste 2016-04-13 15:46:30 PDT
r266227
Comment 2 George Rimar 2016-04-18 09:08:17 PDT
(In reply to comment #1)
> r266227

So, can this be closed ?
Comment 3 Rui Ueyama 2016-04-18 11:32:55 PDT
Ed, can you test it again?
Comment 4 emaste 2016-04-18 13:17:03 PDT
(In reply to comment #3)
> Ed, can you test it again?

Yes, 'ninja check-asan' builds and all expected tests pass.
Comment 5 Rui Ueyama 2016-04-18 13:26:37 PDT
Cool. Let's call it done. If the existing feature is not enough, please open a new bug.
Comment 6 emaste 2016-04-18 13:37:03 PDT
(In reply to comment #5)
> Cool. Let's call it done. If the existing feature is not enough, please open
> a new bug.

Agreed -- I closed this PR earlier today.