Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Geisert <mark@maxrnd.com>2016-02-17 12:55:16 +0300
committerCorinna Vinschen <corinna@vinschen.de>2016-02-17 12:55:28 +0300
commit70e7f94e9fe4556efd1879758504401082d4735e (patch)
tree68afe853ed5ff3908ea00e9f38630e2da03a101b
parent4c59f62ef968d8ac3da12a6aa88b81c45e4e1438 (diff)
Silent relocation truncations considered harmful
This follows up from my msg re GMP-ECM failing its 'make check' on the main list https://cygwin.com/ml/cygwin/2016-02/msg00147.html . There's an error that ought to be reported during dynamic linking if the linked-to address is too far from the relocation site. However the error is not reported if __OPTIMIZE__ was #defined when building the Cygwin DLL. I can't see why optimization settings should affect this. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
-rw-r--r--winsup/cygwin/pseudo-reloc.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/pseudo-reloc.cc b/winsup/cygwin/pseudo-reloc.cc
index f374d2260..c250fdc01 100644
--- a/winsup/cygwin/pseudo-reloc.cc
+++ b/winsup/cygwin/pseudo-reloc.cc
@@ -342,7 +342,7 @@ do_pseudo_reloc (void * start, void * end, void * base)
__write_memory ((void *) reloc_target, &reldata, 2);
break;
case 32:
-#if defined (__CYGWIN__) && defined (__x86_64__) && !defined (__OPTIMIZE__)
+#if defined (__CYGWIN__) && defined (__x86_64__)
if (reldata > (ptrdiff_t) __INT32_MAX__
|| reldata < -((ptrdiff_t) __INT32_MAX__) - 1)
__report_error ("Invalid relocation. Offset %p at address %p "