Glad to know, thanks -----Original Message----- From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=orange...@nongnu.org] On Behalf Of Sandro Sent: Monday, January 24, 2022 07:41 To: tinycc-devel@nongnu.org Subject: Re: [Tinycc-devel] Beginner issue when linking 7z LZMA SDK to dietlibc
Hello Christian Solved. Dietlibc's start.o is calling stackgap before entering main for x86_64 by default. Everything goes well if I remove stackgap in dietfeatures.h. BR Sandro Am Fr., 21. Jan. 2022 um 10:59 Uhr schrieb Sandro <sandro.y...@gmail.com>: > > Hello Christian > > Thanks for the reply! I checked the latest mob tinycc-4e0e9b8.tar.gz. > The result is the same. :( > > What are the differences between gnu ld and tcc linker? > > BR Sandro > > ———————————————————————————————————— > Hi are you using mob? > Tcc uses 0.9.27 for almost 4 years now, only mob is supported. > > C > > -----Original Message----- > From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=orange...@nongnu.org] > On Behalf Of Sandro > Sent: Thursday, January 20, 2022 03:21 > To: tinycc-devel@nongnu.org > Subject: [Tinycc-devel] Beginner issue when linking 7z LZMA SDK to dietlibc > > Hello Everyone > > I'm using tcc on sabotage. I use below to link LZMA to dietlibc (the > start.o and libc.a from dietlibc are in current path): > > tcc -nostdlib start.o LzmaUtil.o Alloc.o LzFind.o LzmaEnc.o LzmaDec.o > 7zFind.o 7zStream.o -L. -lc > > Linking succeeds without any error but always segfault when run the a.out. > > If I use ld from binutils, a.out can run without any problems. > > If adding linker flag -static, there will be the same situation. > > Anyone could advise on how to fix this? Thank you very much! > > Versions: > tcc-0.9.27.tar.bz2 > dietlibc-0.34.tar.xz > lzma1900.7z > sabotage-1.1.24-x86_64-desktop-1f74666.img.xz > > Best regards > Sandro Yang _______________________________________________ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel _______________________________________________ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel