4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-02-22 16:49:45 +08:00
Corinna Vinschen 8f66bc28ae Cygwin: fix new sigfe.o generation in optimized case
Commit 0597c84b9bdb ("Cygwin: revamp TLS offsets computation")
introduced a really weird problem when building Cygwin with
optimization.

First of all, the tlsoffsets file is broken with -O2.  This
can easily be fixed by running the compiler with -O0 when called
from the gentls_offsets script.

But it gets worse:

When creating sigfe.o with optimization, the generated machine code
uses incorrect offsets: For some reason the assembler codes using
_cygtls.stackptr as offset value are assembled into machine code
using _cygtls.pstackptr as offsets.

And as if that isn't already absurd enough, renaming _cygtls.pstackptr
to, say, _cygtls.blurb, fixes the assembled machine code expressions;
they use the value of _cygtls.stackptr again.

So I changed gentls_offsets and gendef to use _cygtls.foo_p rather
than _cygtls.pfoo and that fixes the assembled code in the optimized
case.

No, I can't explain that.  There's no system in that behaviour.
It looks absolutely crazy.

Fixes: 0597c84b9bdb ("Cygwin: revamp TLS offsets computation")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-05-13 21:22:44 +02:00
..
2020-05-30 19:41:18 +02:00
2021-11-15 19:32:23 -05:00
2022-05-13 11:11:38 +02:00
2021-11-10 20:16:15 -05:00
2022-05-13 12:47:29 +02:00
2021-04-27 16:49:56 +01:00
2021-11-15 19:32:23 -05:00
2021-02-01 09:55:08 -05:00
2021-02-01 09:55:08 -05:00
2021-10-26 18:47:22 +02:00
2021-06-26 15:24:27 +01:00
2022-05-03 15:10:24 +02:00
2021-10-26 18:47:22 +02:00
2017-03-27 22:03:58 +01:00
2015-08-17 11:05:43 +02:00
2021-07-29 17:13:47 +02:00
2018-04-16 22:46:11 -05:00
2022-05-13 12:35:00 +02:00
2022-02-22 12:38:46 +01:00
2021-08-23 19:36:10 +02:00
2019-06-25 15:44:43 -04:00
2019-06-25 15:44:43 -04:00