We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attempting to build the asan runtime with lld as the linker on FreeBSD fails with:
[3/4] Linking CXX shared library lib/c...lib/freebsd/libclang_rt.asan-x86_64.so FAILED: : && /usr/bin/CC -fPIC -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wdelete-non-virtual-dtor -std=c++11 -fcolor-diagnostics -fdata-sections -Wall -std=c++11 -fuse-ld=lld -Wl,-z,origin -m64 -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fvisibility=hidden -fvisibility-inlines-hidden -fno-lto -O3 -gline-tables-only -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -Wno-non-virtual-dtor -fno-rtti -ftls-model=initial-exec -Wl,--version-script,/tank/emaste/src/llvm/build-lld-selfhost2/projects/compiler-rt/lib/asan/clang_rt.asan-dynamic-x86_64.vers -shared -Wl,-soname,libclang_rt.asan-x86_64.so -o lib/clang/3.9.0/lib/freebsd/libclang_rt.asan-x86_64.so projects/compiler-rt/lib/interception/CMakeFiles/RTInterception.x86_64.dir/interception_linux.cc.o [...] projects/compiler-rt/lib/ubsan/CMakeFiles/RTUbsan_cxx.x86_64.dir/ubsan_type_hash_win.cc.o -L/usr/local/lib -lc -lrt -lm -lpthread -lstdc++ -Wl,-rpath,"$ORIGIN/../lib" && : unrecognized reloc 22
The text was updated successfully, but these errors were encountered:
This reduces to
bar: movq %fs:0, %rax addq foo@GOTTPOFF(%rip), %rax retq
.section .tbss,"awT",@nobits
being linked into a shared library.
Sorry, something went wrong.
It turns out one can just use symbol 0 as bfd ld does.
Given
addq foo@GOTTPOFF(%rip), %rax addq bar@GOTTPOFF(%rip), %rax .section .tbss,"awT",@nobits
foo: .long 0 bar: .long 0
it produces
Relocation section '.rela.dyn' at offset 0x1c8 contains 2 entries: Offset Info Type Sym. Value Sym. Name + Addend 0000002002f8 000000000012 R_X86_64_TPOFF64 4 000000200300 000000000012 R_X86_64_TPOFF64 0
I will implement that.
Fixed in r26878.
No branches or pull requests
Extended Description
Attempting to build the asan runtime with lld as the linker on FreeBSD fails with:
[3/4] Linking CXX shared library lib/c...lib/freebsd/libclang_rt.asan-x86_64.so
FAILED: : && /usr/bin/CC -fPIC -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wdelete-non-virtual-dtor -std=c++11 -fcolor-diagnostics -fdata-sections -Wall -std=c++11 -fuse-ld=lld -Wl,-z,origin -m64 -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fvisibility=hidden -fvisibility-inlines-hidden -fno-lto -O3 -gline-tables-only -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -Wno-non-virtual-dtor -fno-rtti -ftls-model=initial-exec -Wl,--version-script,/tank/emaste/src/llvm/build-lld-selfhost2/projects/compiler-rt/lib/asan/clang_rt.asan-dynamic-x86_64.vers -shared -Wl,-soname,libclang_rt.asan-x86_64.so -o lib/clang/3.9.0/lib/freebsd/libclang_rt.asan-x86_64.so projects/compiler-rt/lib/interception/CMakeFiles/RTInterception.x86_64.dir/interception_linux.cc.o [...] projects/compiler-rt/lib/ubsan/CMakeFiles/RTUbsan_cxx.x86_64.dir/ubsan_type_hash_win.cc.o -L/usr/local/lib -lc -lrt -lm -lpthread -lstdc++ -Wl,-rpath,"$ORIGIN/../lib" && :
unrecognized reloc 22
The text was updated successfully, but these errors were encountered: