From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28747 invoked by alias); 19 Apr 2017 12:54:16 -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 28706 invoked by uid 89); 19 Apr 2017 12:54:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM autolearn=no version=3.3.2 spammy= X-HELO: mail-qk0-f180.google.com Received: from mail-qk0-f180.google.com (HELO mail-qk0-f180.google.com) (209.85.220.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 19 Apr 2017 12:54:09 +0000 Received: by mail-qk0-f180.google.com with SMTP id f133so18825439qke.2 for ; Wed, 19 Apr 2017 05:54:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=zKF79FUFw9u0z+v6nkqGaagDmxQDe/dc1rw4VemVZ4U=; b=BqA28c1HNOtkXi8YGkikApdjS+Z7ZGznj4ThxnbRHfHPIRtTrhL/+NyUnW+ajv8jGj mKhzlpQD1EcOW6BjXbI6yxZ17nwvXUPMEPUheBi0INRtl3nHKeGc3En6mNafr77SWYvv yEYRKfmZgsgI6kKUTtSgjUl2QLQjvhVx5njqRuzkVBCZIprXyHTCMiPcgm2gcoxvU1tH lyhO0xB0SmXp2oTBD/p2CgeJ3rhsbbA2m7KQz3nylei53stRTEkMHo2rcox/Zkvhqqk3 6MbrIl3kvPtC2wfteNdTAJVOvtgHSbl+fZmlD0pSTicEDbRVi38Z043XUzadfUMhciFP TCCQ== X-Gm-Message-State: AN3rC/4Ttor43WH+OXmtc5W/bpmqkOR9fyH/MiEHQ/iHomx2i+jGDWrW EtFjzLkML3HtZfmMLNdJEyXyVX/PJY84kkg= X-Received: by 10.55.126.129 with SMTP id z123mr2520662qkc.198.1492606448783; Wed, 19 Apr 2017 05:54:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.200.45.213 with HTTP; Wed, 19 Apr 2017 05:53:38 -0700 (PDT) In-Reply-To: <20170419122941.GF30642@calimero.vinschen.de> References: <20170419122941.GF30642@calimero.vinschen.de> From: Jozef Lawrynowicz Date: Wed, 19 Apr 2017 12:54:00 -0000 Message-ID: Subject: Re: [PATCH] [MSP430] Fix relocation type for _bsssize being R_MSP430X_ABS16 when large memory model is used To: newlib@sourceware.org Content-Type: multipart/mixed; boundary=94eb2c05e8102b9816054d848541 X-SW-Source: 2017/txt/msg00302.txt.bz2 --94eb2c05e8102b9816054d848541 Content-Type: text/plain; charset=UTF-8 Content-length: 2019 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/bin/ld: stone-msp430 section `.bss' will not fit in region `RAM' >> > /usr/local/bin/../lib/gcc/msp430-elf/6.3.1/../../../../msp430-elf/bin/ld: region `RAM' overflowed by 65906 bytes >> > /usr/local/bin/../lib/gcc/msp430-elf/6.3.1/../../../../msp430-elf/lib/large/libcrt.a(crt_bss.o): In function `.Loc.75.1': >> > [...]/msp430-elf/large/libgloss/msp430/../../../../../libgloss/msp430/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/bin/ld: stone-msp430 section `.bss' will not fit in region `RAM' >> > /usr/local/bin/../lib/gcc/msp430-elf/6.3.1/../../../../msp430-elf/bin/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 with > the output of `git format-patch'. Looks like my email client changed the tabs to spaces. Patch is attached. Thanks, Jozef --94eb2c05e8102b9816054d848541 Content-Type: application/octet-stream; name="0001-Fix-relocation-type-for-_bsssize-being-R_MSP430X_ABS.patch" Content-Disposition: attachment; filename="0001-Fix-relocation-type-for-_bsssize-being-R_MSP430X_ABS.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_j1oz246y1 Content-length: 1098 RnJvbSBmNzliMjQzZmFmYjI5NjRlNGQ3YjczZWRjZjc5ZGQ3YzdkMDg3YWM5 IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBKb3plZiBMYXdyeW5v d2ljeiA8am96ZWYubEBzb21uaXVtdGVjaC5jb20+CkRhdGU6IFdlZCwgMTkg QXByIDIwMTcgMTE6NDc6MTMgKzAwMDAKU3ViamVjdDogW1BBVENIXSBGaXgg cmVsb2NhdGlvbiB0eXBlIGZvciBfYnNzc2l6ZSBiZWluZyBSX01TUDQzMFhf QUJTMTYgd2hlbgogbGFyZ2UgbWVtb3J5IG1vZGVsIGlzIHVzZWQKCi0tLQog bGliZ2xvc3MvbXNwNDMwL2NydDAuUyB8IDQgKystLQogMSBmaWxlIGNoYW5n ZWQsIDIgaW5zZXJ0aW9ucygrKSwgMiBkZWxldGlvbnMoLSkKCmRpZmYgLS1n aXQgYS9saWJnbG9zcy9tc3A0MzAvY3J0MC5TIGIvbGliZ2xvc3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