Closed ramosian-glider closed 9 years ago
When linking shared libraries you should not force asan symbols into .so
-- symbols like __asan_* should be left undefined so that at the dynamic-link time
they are taken from the main binary.
My guess is that if you remove -Wl,-z,defs from the command line, it will work.
Folks who wrote https://developer.mozilla.org/en-US/docs/Building_Firefox_with_Address_Sanitizer
had the same issue and solved it somehow.
Reported by konstantin.s.serebryany
on 2012-09-13 05:12:37
Invalid
Thank you - that did work. I have squashed several more issues but I have
found another that is preventing me from finishing this Firefox build. I am
hoping you might have some insight please?
Excerpt from make -f client.mk
[...]
make[5]: Nothing to be done for `all'.
make[5]: Leaving directory
`/opt/192src/objdir-ff-asan/js/ctypes/libffi/include'
Making all in testsuite
make[5]: Entering directory
`/opt/192src/objdir-ff-asan/js/ctypes/libffi/testsuite'
make[5]: Nothing to be done for `all'.
make[5]: Leaving directory
`/opt/192src/objdir-ff-asan/js/ctypes/libffi/testsuite'
Making all in man
make[5]: Entering directory
`/opt/192src/objdir-ff-asan/js/ctypes/libffi/man'
make[5]: Nothing to be done for `all'.
make[5]: Leaving directory `/opt/192src/objdir-ff-asan/js/ctypes/libffi/man'
make[5]: Entering directory `/opt/192src/objdir-ff-asan/js/ctypes/libffi'
depbase=`echo src/x86/sysv.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/bash ./libtool --mode=compile
/opt/build/Debug+Asserts/bin/clang -DHAVE_CONFIG_H -I.
-I/opt/192src/js/ctypes/libffi -I. -I/opt/192src/js/ctypes/libffi/include
-Iinclude -I/opt/192src/js/ctypes/libffi/src -I.
-I/opt/192src/js/ctypes/libffi/include -Iinclude
-I/opt/192src/js/ctypes/libffi/src -faddress-sanitizer -Dxmalloc=myxmalloc
-MT src/x86/sysv.lo -MD -MP -MF $depbase.Tpo -c -o src/x86/sysv.lo
/opt/192src/js/ctypes/libffi/src/x86/sysv.S &&\
mv -f $depbase.Tpo $depbase.Plo
/opt/build/Debug+Asserts/bin/clang -DHAVE_CONFIG_H -I.
-I/opt/192src/js/ctypes/libffi -I. -I/opt/192src/js/ctypes/libffi/include
-Iinclude -I/opt/192src/js/ctypes/libffi/src -I.
-I/opt/192src/js/ctypes/libffi/include -Iinclude
-I/opt/192src/js/ctypes/libffi/src -faddress-sanitizer -Dxmalloc=myxmalloc
-MT src/x86/sysv.lo -MD -MP -MF src/x86/.deps/sysv.Tpo -c
/opt/192src/js/ctypes/libffi/src/x86/sysv.S -fPIC -DPIC -o src/x86/sysv.o
/opt/192src/js/ctypes/libffi/src/x86/sysv.S:360:17: error: invalid variant
'rel'
.long .LFB1@rel
^
/opt/192src/js/ctypes/libffi/src/x86/sysv.S:387:17: error: invalid variant
'rel'
.long .LFB2@rel
^
make[5]: *** [src/x86/sysv.lo] Error 1
make[5]: Leaving directory `/opt/192src/objdir-ff-asan/js/ctypes/libffi'
I have once again search high and low for simple problems/fixes and have
not found anything.
Reported by drtfrazier
on 2012-09-16 13:53:37
Haven't see this. You better ask the ff folks first.
Also, check it this builds with pure clang (i.e. w/o -faddress-sanitizer)
asan does not instrument .S files, so it is hardly involved here.
Reported by konstantin.s.serebryany
on 2012-09-17 08:51:27
Adding Project:AddressSanitizer as part of GitHub migration.
Reported by ramosian.glider
on 2015-07-30 09:13:00
Originally reported on Google Code with ID 111
Reported by
drtfrazier
on 2012-09-12 20:50:29