From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2747 invoked by alias); 13 Mar 2013 09:25:16 -0000 Received: (qmail 2717 invoked by uid 22791); 13 Mar 2013 09:25:14 -0000 X-SWARE-Spam-Status: No, hits=-3.6 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KAM_STOCKGEN,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,TW_BF X-Spam-Check-By: sourceware.org Received: from mail-ve0-f182.google.com (HELO mail-ve0-f182.google.com) (209.85.128.182) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 13 Mar 2013 09:25:04 +0000 Received: by mail-ve0-f182.google.com with SMTP id ox1so554541veb.27 for ; Wed, 13 Mar 2013 02:25:03 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.52.19.239 with SMTP id i15mr6866106vde.47.1363166703332; Wed, 13 Mar 2013 02:25:03 -0700 (PDT) Received: by 10.59.0.67 with HTTP; Wed, 13 Mar 2013 02:25:03 -0700 (PDT) In-Reply-To: <20130312232736.3f71531b@YAAKOV04> References: <20130312232736.3f71531b@YAAKOV04> Date: Wed, 13 Mar 2013 09:25:00 -0000 Message-ID: Subject: Re: Error building libffi on x86_64 From: Kai Tietz To: cygwin-developers@cygwin.com Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact cygwin-developers-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner@cygwin.com Mail-Followup-To: cygwin-developers@cygwin.com X-SW-Source: 2013-03/txt/msg00072.txt.bz2 2013/3/13 Yaakov : > I have encountered the following error attempting to build > libffi-3.0.12 on Cygwin: > > src/x86/.libs/win64.o:/usr/src/debug/libffi-3.0.12-1/src/x86/win64.S:298:(.text+0x69): relocation truncated to fit: R_X86_64_32S against symbol `ffi_closure_win64_inner' defined in .text section in src/x86/.libs/ffi.o Hmm, I think the issue is here that the instruction used at this place misses ip-relative addressing. At line 298 we have mov $SYMBOL_NAME(ffi_closure_win64_inner), %rax Could you try if you get same isse with that line replaced by lea SYMBOL_NAME(ffi_closure_win64_inner)(%rip), %rax > The only matches on Google for this sort of error were for >2GB code on > Linux, but I suspect the problem here is with the medium code model. Well, as ffi_closure_win64_inner is a *near* symbol to win64.S - as it is within same library and is a static one - I suspect that the issue is related to medium (means far data) scenario. Otherway might be to translate libffi itself by using the option -mcmodel=small instead. BUt I assuem it is more related by none-ip-relative addressing within that assembler file. > Here's what I'm working with: > > http://cygwin-ports.git.sourceforge.net/git/gitweb.cgi?p=cygwin-ports/libffi > > > Yaakov Kai