tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] forward asm symbols vs static


From: avih
Subject: Re: [Tinycc-devel] forward asm symbols vs static
Date: Sat, 25 Nov 2017 01:16:33 +0000 (UTC)

Also, the only reason I noticed this tcc.def was because my reproducible build script started getting different signature when invoked on linux/windows, and turns out this file exists and is the same on both OSs, but with different line endings CR/CRLF.


On Saturday, November 25, 2017 2:54 AM, avih <address@hidden> wrote:


> Are you sure the .def file isn't generated by a TCC from a commit before?

Yes

> Otherwise I'm at a loss, and not having a Windows system I can't help much.

You can reproduce it with Linux too. This is with Ubuntu 16.04 but I'm pretty sure it's not mandatory: Let's start from scratch after cloning and cd into the tinycc dir:

mkdir bld && cd bld && ../configure --enable-cross --prefix=$(pwd)/dist && make -j8 && make install && cd ..

ls tcc.def  # no such file

echo '#define TCC_VERSION "0.9.27"' > config.h && ./bld/dist/bin/i386-win32-tcc -DTCC_TARGET_PE -DTCC_TARGET_I386 -Iwin32 -I. -DONE_SOURCE -o tcc.exe tcc.c

ls tcc.def  # the file exists with the content I described earlier


Clean everything (git clean -xfd), checkout an earlier commit and repeat the procedure -> the file is not created.


On Saturday, November 25, 2017 2:08 AM, Michael Matz <address@hidden> wrote:


Hi,

On Fri, 24 Nov 2017, avih wrote:

> I noticed a change at e7c71e24 ("tccasm: synch C and asm symtab tighter")
> which I'm not sure is expected.
>
> On Windows, when I build tcc using tcc with one source, a file "tcc.def" is
> created at the same dir as the resulting tcc.exe, with this content:
>
> LIBRARY tcc.exe
>
> EXPORTS
> ___try__
> __chkstk
> __try__
> _exception_code
> _exception_info
>
> To reproduce: prepare a working version of tcc for windows (this example is
> with tcc 32), clone tcc, cd to its root dir, and execute:
>
> echo '#define TCC_VERSION "0.9.27"' > config.h && path/to/tcc.exe
> -DTCC_TARGET_PE -DTCC_TARGET_I386 -Iwin32 -I. -DONE_SOURCE -o tcc.exe tcc.c
>
> And the result is that tcc.def is created alongside tcc.exe .
> This started happening at e7c71e24 . The earlier commit ("Adjust testcase
> for PIE compilers") doesn't create tcc.def with the same invocation.
>
> Is it expected? a bug?

It'd be very surprising for my patch to have this effect.  It affects
symbol table entries, and AFAICS that doesn't influence if the .def file
is generated or not.  Ultimately it's created from pe_build_exports(),
which itself is called when processing the first writable data section.  I
don't see how commit e7c71e24 could make a difference.

Are you sure the .def file isn't generated by a TCC from a commit before?

Otherwise I'm at a loss, and not having a Windows system I can't help
much.  grischka, any ideas?



Ciao,

Michael.






reply via email to

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