From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 72696 invoked by alias); 19 Apr 2017 13:06:00 -0000 Mailing-List: contact newlib-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-owner@sourceware.org Received: (qmail 72649 invoked by uid 89); 19 Apr 2017 13:05:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=H*i:sk:N2fX6nR, H*f:sk:N2fX6nR X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 19 Apr 2017 13:05:58 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 256CE8FCF5; Wed, 19 Apr 2017 13:05:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 256CE8FCF5 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=vinschen@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 256CE8FCF5 Received: from calimero.vinschen.de (unknown [10.36.118.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id BB52E74AC2; Wed, 19 Apr 2017 13:05:58 +0000 (UTC) Received: by calimero.vinschen.de (Postfix, from userid 500) id 7B43EA80C15; Wed, 19 Apr 2017 15:05:57 +0200 (CEST) Date: Wed, 19 Apr 2017 13:06:00 -0000 From: Corinna Vinschen To: Jozef Lawrynowicz Cc: newlib@sourceware.org Subject: Re: [PATCH] [MSP430] Fix relocation type for _bsssize being R_MSP430X_ABS16 when large memory model is used Message-ID: <20170419130557.GG30642@calimero.vinschen.de> Reply-To: newlib@sourceware.org Mail-Followup-To: Jozef Lawrynowicz , newlib@sourceware.org References: <20170419122941.GF30642@calimero.vinschen.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="S5HS5MvDw4DmbRmb" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.0 (2017-02-23) X-SW-Source: 2017/txt/msg00303.txt.bz2 --S5HS5MvDw4DmbRmb Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 2209 On Apr 19 13:53, Jozef Lawrynowicz wrote: > On 19 April 2017 at 13:29, Corinna Vinschen wrote: > > On Apr 19 12:58, Jozef Lawrynowicz wrote: > >> For the msp430 target, trying to link a program with .bss larger than > >> 64K causes a few different errors to be reported. > >> > >> > /usr/local/bin/../lib/gcc/msp430-elf/6.3.1/../../../../msp430-elf/bi= n/ld: stone-msp430 section `.bss' will not fit in region `RAM' > >> > /usr/local/bin/../lib/gcc/msp430-elf/6.3.1/../../../../msp430-elf/bi= n/ld: region `RAM' overflowed by 65906 bytes > >> > /usr/local/bin/../lib/gcc/msp430-elf/6.3.1/../../../../msp430-elf/li= b/large/libcrt.a(crt_bss.o): In function `.Loc.75.1': > >> > [...]/msp430-elf/large/libgloss/msp430/../../../../../libgloss/msp43= 0/crt0.S:73:(.crt_0100init_bss+0x8): relocation truncated to fit: R_MSP430X= _ABS16 against symbol `__bsssize' defined in *ABS* section in stone-msp430 > >> > >> Even though BSS shouldn't be larger than 64K, the relocation trunated > >> to fit error still looks like a bug. > >> The patch below changes one of the instructions in > >> libgloss/msp430/crt0.S from mov.w to mov_, so that the > >> R_MSP430X_ABS20_A relocation type is used instead of the > >> R_MSP430X_ABS16 for the _bsssize variable when the large memory model > >> is used. I also fixed a typo in a comment. > >> With the patch applied, linking the program with large bss now reports > >> only the following errors: > >> > >> > /usr/local/bin/../lib/gcc/msp430-elf/6.3.1/../../../../msp430-elf/bi= n/ld: stone-msp430 section `.bss' will not fit in region `RAM' > >> > /usr/local/bin/../lib/gcc/msp430-elf/6.3.1/../../../../msp430-elf/bi= n/ld: region `RAM' overflowed by 65906 bytes > >> > >> I don't have write access, so if this patch is satisfactory, I would > >> appreciate if someone could commit it for me. > > > > Your patch doesn't apply cleanly. Can you please recrate it and make > > sure the whitespaces are correct? Ideally just create an attachment wi= th > > the output of `git format-patch'. >=20 > Looks like my email client changed the tabs to spaces. >=20 > Patch is attached. Pushed. Thanks, Corinna --=20 Corinna Vinschen Cygwin Maintainer Red Hat --S5HS5MvDw4DmbRmb Content-Type: application/pgp-signature; name="signature.asc" Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJY92C1AAoJEPU2Bp2uRE+gu94P/0oP8/seH89oHIvV1NSWMHcx hey3KzvYXA9AA5AvHLBD8IqFQZV53BW7l2+c0ytWzfua1nePx31aFCLk+37/2fuF Ts89sYGHJnfGwrVZIXlzX81yBS/UTvls9pT8RArKOpqDKFqMx9I5srK7ctdnmdHZ ddWpNmLGEkRQD1ID89HD2goyOUdcLs4hXQGsdYCxASqzR+Zflmg0bvBpWCHGh3Jl rGVbkwxYsFTAgsnwNC6kocmp7k24cRufxs0ohdgeukKi3KPOy+yhCtyAKPBIgcaU VckLGog5hZUlB9zaHQsA2oovuom4tg3+iWrveA3o3TYh2JgoQgThzIjtfWHJjJj0 cTEq1ANlihj78t3txHO5W1D7rApgsRa4QJX9V/nsl9MVEbhiiI3lCc8/Po5yd7Cv 6XfiuH7HF3JqTIauFJwcZYBsiToHl+CsxLpNm7joYxuQAJowado2nC2j7Y1X7myR 7zLaCJO2+u8CSU0sqPn1dejQ1840EscVZLQgsD9L0RWVX+Tvr5+wlYqkucV6w8eB B0x3jg+sTugk7KhgQax5hIb32c0vpbgasFXtGVCYjEXL/cUUuLzsuNmjidQ0SKVN 9u1ZdpQRtFG5voIfyqOHH2JxQEBhfeWX8C69NJAfZbg7Ld78aYQrPjYMivEZVmD1 T5k9/rtK10O8fXInNLRo =imcl -----END PGP SIGNATURE----- --S5HS5MvDw4DmbRmb--