search for: tlsdriverentrypoint

Displaying 5 results from an estimated 5 matches for "tlsdriverentrypoint".

2019 Jul 15
2
lld-link crash when build openssl with LTO
Hi Rui, We met a lld-link crash problem when build 32bits openssl1.0 with LTO in uefi firmware. We narrow down and figure out a simple test case to reproduce this problem as blow. Please advise. Thank you! $ cat main.c void TlsDriverEntryPoint () { unsigned char *ret = 0; const unsigned char cryptopro_ext[17] = {0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01}; int length =17; const char *Source; Source = (void*)cryptopro_ext; while (length--) { *(ret++) = *(Source++); } } $ cat m...
2019 Jul 16
2
lld-link crash when build openssl with LTO
...ct/releaseinstall/bin/llvm-lib" > /OUT:main.lib main.obj > > "/home/jshi19/llvm/llvm-project/releaseinstall/bin/llvm-lib" > /OUT:memcpy.lib memcpy.obj > > "/home/jshi19/llvm/llvm-project/releaseinstall/bin/lld-link" /OUT:f.dll > /MACHINE:X86 /DLL /ENTRY:TlsDriverEntryPoint main.lib memcpy.lib > > Stack dump: > > 0. Program arguments: > /home/jshi19/llvm/llvm-project/releaseinstall/bin/lld-link /OUT:f.dll > /MACHINE:X86 /DLL /ENTRY:TlsDriverEntryPoint main.lib memcpy.lib > > #0 0x000056348d5c185a llvm::sys::PrintStackTrace(llvm::raw_ostr...
2019 Jul 16
2
lld-link crash when build openssl with LTO
...ct/releaseinstall/bin/llvm-lib" > /OUT:main.lib main.obj > > "/home/jshi19/llvm/llvm-project/releaseinstall/bin/llvm-lib" > /OUT:memcpy.lib memcpy.obj > > "/home/jshi19/llvm/llvm-project/releaseinstall/bin/lld-link" /OUT:f.dll > /MACHINE:X86 /DLL /ENTRY:TlsDriverEntryPoint main.lib memcpy.lib > > lld-link: error: undefined symbol: _memcpy > > >>> referenced by lto.tmp:(_TlsDriverEntryPoint) > > makefile:9: recipe for target 'build' failed > > make: *** [build] Error 1 > > > > Thanks > > Steven > > &gt...
2019 Jul 16
2
lld-link crash when build openssl with LTO
...h LTO > > > > Hi Rui, > > We met a lld-link crash problem when build 32bits openssl1.0 with LTO in > uefi firmware. We narrow down and figure out a simple test case to > reproduce this problem as blow. Please advise. Thank you! > > > > $ cat main.c > > void TlsDriverEntryPoint () > > { > > unsigned char *ret = 0; > > const unsigned char cryptopro_ext[17] = {0x00,0x00,0x00,0x00, > 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01}; > > int length =17; > > const char *Source; > > Source = (void*)cryptopro_ext...
2019 Jul 16
3
lld-link crash when build openssl with LTO
Usage of the builtin appears independent of LTO, see below. With any of -fno-builtin, -fno-builtin-memcpy, and -ffreestanding, which are all typically used to prevent usage of memcpy calls, we still always get a memcpy builtin in TlsDriverEntryPoint(). I see this even without -flto (e.g. try with just -emit-llvm). I guess it is because this memcpy is not coming from the original source, but rather from the initialization code created by clang for the cryptopro_ext local variable. The code that generates that must not honor -fno-builtin. I see...