From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 46295 invoked by alias); 19 Apr 2017 12:29:44 -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 46278 invoked by uid 89); 19 Apr 2017 12:29:43 -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= 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 12:29:42 +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 EFD6963322; Wed, 19 Apr 2017 12:29:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com EFD6963322 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=vinschen@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com EFD6963322 Received: from calimero.vinschen.de (unknown [10.36.118.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id B95445C546; Wed, 19 Apr 2017 12:29:42 +0000 (UTC) Received: by calimero.vinschen.de (Postfix, from userid 500) id 1D4BAA80C12; Wed, 19 Apr 2017 14:29:41 +0200 (CEST) Date: Wed, 19 Apr 2017 12:29:00 -0000 From: Corinna Vinschen To: newlib@sourceware.org Cc: Jozef Lawrynowicz Subject: Re: [PATCH] [MSP430] Fix relocation type for _bsssize being R_MSP430X_ABS16 when large memory model is used Message-ID: <20170419122941.GF30642@calimero.vinschen.de> Reply-To: newlib@sourceware.org Mail-Followup-To: newlib@sourceware.org, Jozef Lawrynowicz References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="yRA+Bmk8aPhU85Qt" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.0 (2017-02-23) X-SW-Source: 2017/txt/msg00301.txt.bz2 --yRA+Bmk8aPhU85Qt Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1917 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. >=20 > > /usr/local/bin/../lib/gcc/msp430-elf/6.3.1/../../../../msp430-elf/bin/l= d: stone-msp430 section `.bss' will not fit in region `RAM' > > /usr/local/bin/../lib/gcc/msp430-elf/6.3.1/../../../../msp430-elf/bin/l= d: region `RAM' overflowed by 65906 bytes > > /usr/local/bin/../lib/gcc/msp430-elf/6.3.1/../../../../msp430-elf/lib/l= arge/libcrt.a(crt_bss.o): In function `.Loc.75.1': > > [...]/msp430-elf/large/libgloss/msp430/../../../../../libgloss/msp430/c= rt0.S:73:(.crt_0100init_bss+0x8): relocation truncated to fit: R_MSP430X_AB= S16 against symbol `__bsssize' defined in *ABS* section in stone-msp430 >=20 > 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: >=20 > > /usr/local/bin/../lib/gcc/msp430-elf/6.3.1/../../../../msp430-elf/bin/l= d: stone-msp430 section `.bss' will not fit in region `RAM' > > /usr/local/bin/../lib/gcc/msp430-elf/6.3.1/../../../../msp430-elf/bin/l= d: region `RAM' overflowed by 65906 bytes >=20 > 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 with the output of `git format-patch'. Thanks, Corinna --=20 Corinna Vinschen Cygwin Maintainer Red Hat --yRA+Bmk8aPhU85Qt Content-Type: application/pgp-signature; name="signature.asc" Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJY91g0AAoJEPU2Bp2uRE+gplkP/1SYHNGTFchnH74ggW70XWhe 3kfP57TqdnzI3hl3ApevxQeKIqL7zuYvKk9+50I5c8OwK4RhEnaKS7yYiX1UbSTM fzwY3LWdPCMCw1h4p58Gj6ToDfJkreWdJ7hoRL9Xj2OicqlTHdQv5Uxplq+4QCMU /730zMwxfeU3JemcBFpIWQWUb3QT9JxR5cLL5inDtyY6WL3UXaZyUAedg0jRv2TR FCVOKOEtkKwM9pJ9TpabAJBi22yM2WXOiYFELYo7F5klLppVz6sXBOm8OA4NvMEC yKykUrakf0Z2h0rqtqVjAoUdNdfZazF3V0a5N6pBbJo4fumvVl79SFYfMPMTpz9j 2G2/YMc/UDQsiBd5KF4CNbQ1Fveyp08spTEjnpbyayol5AE5mptlGTjzKKfz/gz9 722ck2IODMCtBvujHQtx2ecD+h7DNfA8PzVUiuntbZbSIZ33dVZkH2QQJvtCN20g YdLW3xUbGhJc4SZ3E49F6e/2Rc3tkT0fNIsERtqzNhHUm2Tw+xr7GFBs15KwUFxz DQz8/Z/uRYh0Q6V8N8m5iDSt4p5SxPuHFaU+qu4ZXYhbwJsYDwU5WvBXHGpsx0Ro sm5UCGz1kZIMq2ycn5riFa2ijBNQs11z3OBssbkyQSEtrN7bWdat2uBPqunIsh6q ef1PRUZojRGV+HOAcc8K =JG9q -----END PGP SIGNATURE----- --yRA+Bmk8aPhU85Qt--