tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] [ELF][Relocatable] undefined global symbols will conf


From: draco
Subject: Re: [Tinycc-devel] [ELF][Relocatable] undefined global symbols will confuse binutils bfd if not set to STT_NOTYPE
Date: Fri, 27 Oct 2023 17:17:30 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On Thu, Oct 26, 2023 at 07:15:11PM +0200, draco wrote:
> Sylvain,
> 
> it seems to me, like this patch breaks the windows builds, maybe for
> exactly the same reason, ldd gets confused.
> 
> See the github mirror of tinycc, it has some automated builds and the
> win32 part starts breaking with linker errors against libtcc exactly
> after picking up your patch:
> 
> https://github.com/TinyCC/tinycc/actions

Hi,

I don't understand, this patch modifies only ELF relocatable generation, this
is unrelated to win32 PE/COFF file generation. Additionally, cproc/qbe
compilers are generating similar ELF relocatable files, meaning they would
break too.

I cannot get more information since your github link is "empty", this github
"feature" does not seem to work with the noscript/basic (x)html browsers I
use.

regards,

--
Sylvain

tcc uses the elf structure also to generate the windows binaries, so the STT_NOTYPE is carried over to the windows dll. But maybe the cause is different, memtest and dlltest also fail. I can't test this locally, because I don't have msys installed. In the buildlog on github, it's especially the abitest-tcc that fails with segmentation fault. The relevant part of the makefile # Check that code generated by libtcc is binary compatible with # that generated by CC abitest-cc.exe: abitest.c $(LIBTCC) $(CC) -o $@ $^ $(CFLAGS) $(LIBS) -w abitest-tcc.exe: abitest.c libtcc.c $(TCC) -o $@ $^ $(NATIVE_DEFINES) $(LIBS) abitest-% : abitest-%.exe @echo ------------ $@ ------------ ./$< $(TCCFLAGS) and the relevant part of the build-log Segfaults start here and carry on through the whole log running tcc.c in threads to run fib make[2]: *** [Makefile:92: libtest_mt] Segmentation fault ------------ test3 ------------ make[2]: *** [Makefile:124: test3] Error 139 ------------ memtest ------------ make[2]: *** [Makefile:174: memtest] Segmentation fault ------------ dlltest ------------ make[2]: *** [Makefile:160: dlltest] Segmentation fault ------------ abitest-cc ------------ ret_int_test... success ret_longlong_test... success ret_float_test... success ret_double_test... success ret_longdouble_test... success ret_2float_test... success ret_2double_test... success ret_8plus2double_test... success ret_6plus2longlong_test... success ret_mixed_test... success ret_mixed2_test... success ret_mixed3_test... success reg_pack_test... success reg_pack_longlong_test... success sret_test... success one_member_union_test... success two_member_union_test... success many_struct_test... success many_struct_test_2... success many_struct_test_3... success stdarg_test... success stdarg_many_test... success stdarg_struct_test... success arg_align_test... success ------------ abitest-tcc ------------ make[2]: *** [Makefile:247: abitest-tcc] Segmentation fault make[2]: *** Deleting file 'abitest-tcc' make[2]: Target 'abitest' not remade because of errors. Michael

reply via email to

[Prev in Thread] Current Thread [Next in Thread]