search for: jshi19

Displaying 20 results from an estimated 24 matches for "jshi19".

2019 Jul 16
2
lld-link crash when build openssl with LTO
...in my previous email, if I change the `memcpy` to > `foobar` in memcpy.c, the lld-link report linking error that it cannot find > the _memcpy symbol as below. In uefi firmware, we have to explicitly > implement these compiler intrinsic functions by ourselves. > > > > > > jshi19 at ub2-uefi-b01:~/llvm/wrongcode/lld-link3$ make > > "/home/jshi19/llvm/llvm-project/releaseinstall/bin/clang" -Oz -flto > -target i686-unknown-windows -c -o main.obj main.c > > "/home/jshi19/llvm/llvm-project/releaseinstall/bin/clang" -Oz -flto > -target i686...
2019 Jul 16
2
lld-link crash when build openssl with LTO
...cally. Let me see what is going on. On Tue, Jul 16, 2019 at 9:00 PM Shi, Steven <steven.shi at intel.com> wrote: > In my previous test case, after add the `-fno-builtin` to clang then > build, the lld-link still has same crash as below: > > > > $ make > > "/home/jshi19/llvm/llvm-project/releaseinstall/bin/clang" -Oz -flto > -target i686-unknown-windows -fno-builtin -c -o main.obj main.c > > "/home/jshi19/llvm/llvm-project/releaseinstall/bin/clang" -Oz -flto > -target i686-unknown-windows -fno-builtin -c -o memcpy.obj memcpy.c > &gt...
2019 Jul 15
2
lld-link crash when build openssl with LTO
...const char *Source; Source = (void*)cryptopro_ext; while (length--) { *(ret++) = *(Source++); } } $ cat memcpy.c typedef unsigned int size_t; void *memcpy(void *dest, const void *src, size_t n) { return 0; } $ cat makefile CC_FLAGS= -Oz -flto -target i686-unknown-windows CC = /home/jshi19/llvm/llvm-project/releaseinstall/bin/clang DLINK_FLAGS = /MACHINE:X86 /DLL /ENTRY:TlsDriverEntryPoint DLINK = /home/jshi19/llvm/llvm-project/releaseinstall/bin/lld-link SLINK_FLAGS = SLINK = /home/jshi19/llvm/llvm-project/releaseinstall/bin/llvm-lib build: "$(CC)" $(CC_FLAGS) -c...
2019 Jul 16
2
lld-link crash when build openssl with LTO
...} > > > > $ cat memcpy.c > > typedef unsigned int size_t; > > void *memcpy(void *dest, const void *src, size_t n) > > { > > return 0; > > } > > > > $ cat makefile > > CC_FLAGS= -Oz -flto -target i686-unknown-windows > > CC = /home/jshi19/llvm/llvm-project/releaseinstall/bin/clang > > DLINK_FLAGS = /MACHINE:X86 /DLL /ENTRY:TlsDriverEntryPoint > > DLINK = /home/jshi19/llvm/llvm-project/releaseinstall/bin/lld-link > > SLINK_FLAGS = > > SLINK = /home/jshi19/llvm/llvm-project/releaseinstall/bin/llvm-lib > >...
2019 Jul 16
3
lld-link crash when build openssl with LTO
..., Steven <steven.shi at intel.com> wrote: >> >>> In my previous test case, after add the `-fno-builtin` to clang then >>> build, the lld-link still has same crash as below: >>> >>> >>> >>> $ make >>> >>> "/home/jshi19/llvm/llvm-project/releaseinstall/bin/clang" -Oz -flto >>> -target i686-unknown-windows -fno-builtin -c -o main.obj main.c >>> >>> "/home/jshi19/llvm/llvm-project/releaseinstall/bin/clang" -Oz -flto >>> -target i686-unknown-windows -fno-builtin -c...
2019 Feb 27
2
lld-link crash when linking intrinsics lib
...VirtualAddress = 0; Snp->MapList[Index].MapCookie = 0; } return 0; } $ cat intrinsics.c void * memset (void *dest, int ch, size_t count) { volatile char *Pointer; Pointer = (char *)dest; while (count-- != 0) { *(Pointer++) = (char)ch; } return dest; } $ "/home/jshi19/llvm/releaseinstall/bin/clang-cl" /Fomain.obj /c --target=x86_64-pc-win32-coff -m64 /O1b2s -flto main.c $ "/home/jshi19/llvm/releaseinstall/bin/clang-cl" /Fointrinsics.obj /c --target=x86_64-pc-win32-coff -m64 /O1b2s -flto intrinsics.c $ "/home/jshi19/llvm/releaseinstall/bin/llv...
2019 Feb 28
4
lld-link crash when linking intrinsics lib
...latile char *Pointer; >> >> Pointer = (char *)dest; >> >> while (count-- != 0) { >> >> *(Pointer++) = (char)ch; >> >> } >> >> return dest; >> >> } >> >> >> >> >> >> $ "/home/jshi19/llvm/releaseinstall/bin/clang-cl" /Fomain.obj /c >> --target=x86_64-pc-win32-coff -m64 /O1b2s -flto main.c >> >> $ "/home/jshi19/llvm/releaseinstall/bin/clang-cl" /Fointrinsics.obj /c >> --target=x86_64-pc-win32-coff -m64 /O1b2s -flto intrinsics.c >> &gt...
2016 May 30
0
[cfe-dev] How to debug if LTO generate wrong code?
...ehdi, > The llvm3.8 gold-plugin.cpp is very different from the latest one on trunk. Your patch has compiling failure on llvm3.8 as below. I will try it on latest trunk later. Thank you help anyway! > > Building CXX object tools/gold/CMakeFiles/LLVMgold.dir/gold-plugin.cpp.o > cd /home/jshi19/llvm38releasebuild/tools/gold && /home/jshi19/clang38/bin/clang++ -DGTEST_HAS_RTTI=0 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/jshi19/llvm38releasebuild/tools/gold -I/home/jshi19/llvm-3.8.0.src/to...
2016 May 30
0
[cfe-dev] How to debug if LTO generate wrong code?
Hi Mehdi, The llvm3.8 gold-plugin.cpp is very different from the latest one on trunk. Your patch has compiling failure on llvm3.8 as below. I will try it on latest trunk later. Thank you help anyway! Building CXX object tools/gold/CMakeFiles/LLVMgold.dir/gold-plugin.cpp.o cd /home/jshi19/llvm38releasebuild/tools/gold && /home/jshi19/clang38/bin/clang++ -DGTEST_HAS_RTTI=0 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/jshi19/llvm38releasebuild/tools/gold -I/home/jshi19/llvm-3.8.0.src/to...
2019 Jan 28
4
lld write wrong symbol value in .data section if enable -pie
...relocation entries, are all 0. In other word, I found the S in below R_X86_64_64 calculation is 0. Name: R_X86_64_64 1 word64 S + A Below is an example to compare the lld and ld, sorry about the verbose. 1. Firstly, I use lld to link a HelloWorld module with -pie enabled: "/home/jshi19/llvm/releaseinstall/bin/ld.lld" -pie -z relro --hash-style=gnu --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o /home/jshi19/wksp_efi/lgao4/edk2/Build/OvmfX64/NOOPT_CLANG38/X64/MdeModulePkg/Application/HelloWorld/HelloWorld/DEBUG/HelloWorld.dll -u _ModuleEntryPoint -...
2019 Aug 03
2
lld-link /ALIGN option doesn't work for the "execute in place (XIP)"
...ardcode the SectionAlignment as 4096 in COFF file and let the lld-link respect the user's /ALIGN option value? We can set the 4096 as the default SectionAlignment value. Below are some steps to show the hardcode issue and code size impact: $ cat main.c int main() { return 0; } $ "/home/jshi19/llvm/llvm-project/releaseinstall/bin/clang" -target i686-unknown-windows -fno-builtin -c -o main.obj main.c $ "/home/jshi19/llvm/llvm-project/releaseinstall/bin/lld-link" /OUT:main.dll /MACHINE:X86 /DLL /ENTRY:main /ALIGN:32 /FILEALIGN:32 main.obj $ sudo apt install pev $ readpe -H...
2020 Jan 09
3
LLD PDB Lines zero number issue
...x1 == 0; assembly_fun(), Index1++){ assembly_fun(); } assembly_fun(); } $ cat assembly.nasm DEFAULT REL SECTION .text global assembly_fun assembly_fun: ret $ cat makefile_clanglto_Oz CC_FLAGS= -g -m64 -mcmodel=small -target x86_64-unknown-windows -gcodeview -flto -Oz CC = /home/jshi19/llvm/clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/clang DLINK_FLAGS = /Machine:X64 /DLL /ENTRY:main /DEBUG:GHASH /lldmap DLINK = /home/jshi19/llvm/clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/lld-link SLINK = /home/jshi19/llvm/clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/llvm-lib...
2016 May 30
2
[cfe-dev] How to debug if LTO generate wrong code?
Hi Steven, > On May 29, 2016, at 11:28 PM, Shi, Steven <steven.shi at intel.com> wrote: > > Hi Mehdi, > Should I apply your attached patch on my llvm3.8 source firstly? Or should I use the latest llvm SVN trunk instead? I wrote it on trunk, but I expect it to be fairly easy to port on 3.8. This is really just quickly plumbing an option on the TargetMachine creation. --
2019 Jan 29
3
lld write wrong symbol value in .data section if enable -pie
...relocation entries, are all 0. In other word, I found the S in below R_X86_64_64 calculation is 0. Name: R_X86_64_64 1 word64 S + A Below is an example to compare the lld and ld, sorry about the verbose. 1. Firstly, I use lld to link a HelloWorld module with -pie enabled: "/home/jshi19/llvm/releaseinstall/bin/ld.lld" -pie -z relro --hash-style=gnu --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o /home/jshi19/wksp_efi/lgao4/edk2/Build/OvmfX64/NOOPT_CLANG38/X64/MdeModulePkg/Application/HelloWorld/HelloWorld/DEBUG/HelloWorld.dll -u _ModuleEntryPoint -...
2020 Jan 12
2
LLD PDB Lines zero number issue
...llvm -use-unknown-locations=Disable" in the clang CC flag to build test case in my previous email, but it looks still not work in my side with llvm 9.0.0. Could you give me some more advices? Do I need to use the master LLVM instead of the 9.0.0? $ make -f makefile_clanglto_Oz "/home/jshi19/llvm/clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/clang" -g -m64 -mcmodel=small -target x86_64-unknown-windows -gcodeview -mllvm -use-unknown-locations=Disable -flto -Oz -c -o main.obj main.c "nasm" -f win64 -o assembly.obj assembly.nasm "/home/jshi19/llvm/clang+llvm-9...
2020 Jan 09
2
LLD PDB Lines zero number issue
On Thu, 9 Jan 2020, David Blaikie via llvm-dev wrote: > +rnk who works on COFF debugging things. > >  My understanding is that this has nothing to do with the linker - but is a > function of LLVM optimizations creating line zero debug locations. I believe > rnk & folks have disabled line zero emission for CodeView debug info in some > manner - perhaps that needs a flag? or
2020 Jan 14
2
LLD PDB Lines zero number issue
...-link /OUT:main.dll /Machine:X64 /DLL /ENTRY:main /DEBUG:GHASH /lldmap main.obj assembly.obj Check to see that there are line zeros in the pdb file: $ llvm-pdbutil" dump -l main.pdb Lines ============================================================ Mod 0000 | `/home/jshi19/llvm/wrongcode/lld_PDB_issue/main.obj`: /home/jshi19/llvm/wrongcode/lld_PDB_issue/main.c (MD5: 5F82BB79FE2DA0B0549B784CFDC37D05) 0001:00000000-0000001A, line/addr entries = 5 3 00000000 ! 0 00000004 ! 5 00000009 ! 0 0000000E ! 9 00000013 ! Thanks Shi, Steven From: Zachary Turn...
2019 Jan 29
2
lld write wrong symbol value in .data section if enable -pie
...relocation entries, are all 0. In other word, I found the S in below R_X86_64_64 calculation is 0. Name: R_X86_64_64 1 word64 S + A Below is an example to compare the lld and ld, sorry about the verbose. 1. Firstly, I use lld to link a HelloWorld module with -pie enabled: "/home/jshi19/llvm/releaseinstall/bin/ld.lld" -pie -z relro --hash-style=gnu --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o /home/jshi19/wksp_efi/lgao4/edk2/Build/OvmfX64/NOOPT_CLANG38/X64/MdeModulePkg/Application/HelloWorld/HelloWorld/DEBUG/HelloWorld.dll -u _ModuleEntryPoint -...
2016 May 30
7
[cfe-dev] How to debug if LTO generate wrong code?
> On May 29, 2016, at 5:44 PM, Shi, Steven <steven.shi at intel.com> wrote: > > (And I doubt the GNU linker supports LTO with LLVM). > [Steven]: I’ve pushed GNU Binutils ld to support LLVM gold plugin, see detail in this bug https://sourceware.org/bugzilla/show_bug.cgi?id=20070 <https://sourceware.org/bugzilla/show_bug.cgi?id=20070>. The new GNU ld linker works well with
2016 Jan 09
2
[cfe-dev] Is it a va_arg bug in clang?
...iltin_ms_va_list, __builtin_ms_va_start, __builtin_ms_va_arg, __builtin_ms_va_end, my code will build fail in Ubuntu with below message. Do you suggest I should build it in windows and not in Linux? Or did I miss any build option here? Appreciate if you could let me know the correct build steps. jshi19 at jshi19-Intel:/mnt/disk3$ clang X64.c X64.c:12:2: error: unknown type name '__builtin_ms_va_list'; did you mean '__builtin_va_list'? __builtin_ms_va_list Marker; ^~~~~~~~~~~~~~~~~~~~ __builtin_va_list note: '__builtin_va_list' declared here...