[llvm-commits] patch: teach deadargelim to work on externally visible functions!
Rafael Espindola
espindola at google.com
Mon Jan 11 10:56:21 PST 2010
> for -m64:
> - movq g at GOTPCREL(%rip), %rax
> + leaq g(%rip), %rax
This is very odd. Since a protected function can be used from another
library this would create the need to patch the text segment in the
dynamic linker.
Trying to put the resulting .o in a shared library fails when using gnu ld:
gcc -shared -o test.so test.c
/usr/bin/ld: /tmp/ccqwpSKK.o: relocation R_X86_64_32S against `g' can
not be used when making a shared object; recompile with -fPIC
/tmp/ccqwpSKK.o: could not read symbols: Bad value
My take is that protected is broken enough that we can implement a
best effort :-)
>
> BTW I also found this in gcc manpage:
> "Note that due to ISO C++ specification requirements, operator new and
> operator delete must
> always be of default visibility."
>
> Best regards,
> --Edwin
>
Cheers,
--
Rafael Ávila de Espíndola
More information about the llvm-commits
mailing list