Re: [Tinycc-devel] problem on win64 with latest commit

2024-03-01 Thread grischka via Tinycc-devel
On 01.03.2024 07:49, Herman ten Brugge via Tinycc-devel wrote: On 2/29/24 23:17, grischka wrote: On 29.02.2024 07:26, Herman ten Brugge via Tinycc-devel wrote: Setting CONFIG_RUNMEM_RO=0 looks incorrect to me because it sets write in executables. Apple has implemented W^X (Writes can not

[Tinycc-devel] tcc assembler emits wrong pc-relative symbol difference reloctions in immediates

2024-03-01 Thread Rich Felker
A user encountered this bug trying to build musl libc for i386 using tcc, where an asm source file using pc-relative addressing to load its data was reading from the wrong address. I tracked it down to the offset in the immediate to an add instruction, which I simplified down to the following