This is the mail archive of the cygwin-cvs@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[newlib-cygwin] Silent relocation truncations considered harmful


https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=70e7f94e9fe4556efd1879758504401082d4735e

commit 70e7f94e9fe4556efd1879758504401082d4735e
Author: Mark Geisert <mark@maxrnd.com>
Date:   Wed Feb 17 10:55:16 2016 +0100

    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>

Diff:
---
 winsup/cygwin/pseudo-reloc.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/winsup/cygwin/pseudo-reloc.cc b/winsup/cygwin/pseudo-reloc.cc
index f374d22..c250fdc 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 "


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]