public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Jozef Lawrynowicz <jozef.l@mittosystems.com>
To: Nick Clifton <nickc@redhat.com>
Cc: binutils@sourceware.org
Subject: Re: [PATCH] MSP430: Support relocations for subtract expressions in .uleb128 directives
Date: Tue, 8 Sep 2020 16:07:42 +0100	[thread overview]
Message-ID: <20200908150742.cjmn5xcp7mdlghs7@jozef-acer-manjaro> (raw)
In-Reply-To: <8cf5eb46-4bc2-3582-184d-26e220832889@redhat.com>

On Tue, Sep 08, 2020 at 11:01:17AM +0100, Nick Clifton via Binutils wrote:
> Hi Jozef,
> 
> > I've attached an updated patch with the following changes:
> > - "GNU" used in new reloc names
> > - uleb128 write function moved to bfd/libbfd.c
> > - uleb128 write function takes an end pointer argument and will not
> >   overwrite memory beyond this
> > - relocated uleb128 value is "right aligned" within the available space
> > 
> > Successfully re-tested the patch.
> > 
> > Ok to apply?
> 
> Thanks for making these adjustments.  The patch is approved, but
> it needs one small change before applying:
> 
> 	  _bfd_error_handler
> 	    (_("error: final size of uleb128 value at offset 0x%lx in %pA "
> 	       "from %pB exceeds available space"),
> 	     rel->r_offset, input_section, input_bfd);
> 
> This line generates an error when compiling for a 64-bit target (eg --enable-targets=all)
> because rel->r_offset is a long long but the print type is %0lx.  So if you could
> add a cast, that would be great:
> 
> 	  _bfd_error_handler
> 	    (_("error: final size of uleb128 value at offset 0x%lx in %pA "
> 	       "from %pB exceeds available space"),
> 	     (long) rel->r_offset, input_section, input_bfd);

Thanks for spotting that.

However, I'm not able to reproduce the error. I'd like to add this
configuration to my build system to spot any issues in the future.
I tried the following configure lines, but the build completes successfully
in both cases:

  ../configure --enable-targets=all --enable-werror
  ../configure --enable-targets=all --enable-werror --target=msp430-elf

Are there any additional options I need to add?

Thanks,
Jozef

  reply	other threads:[~2020-09-08 15:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-02 12:21 Jozef Lawrynowicz
2020-09-03 14:41 ` Nick Clifton
2020-09-03 20:22   ` Jozef Lawrynowicz
2020-09-04  7:13     ` Nick Clifton
2020-09-04 16:52       ` Jozef Lawrynowicz
2020-09-07 12:28         ` Jozef Lawrynowicz
2020-09-08 10:01           ` Nick Clifton
2020-09-08 15:07             ` Jozef Lawrynowicz [this message]
2020-09-08 15:23               ` Nick Clifton
2020-09-08 16:46                 ` Jozef Lawrynowicz
2020-09-08 23:23                   ` Alan Modra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200908150742.cjmn5xcp7mdlghs7@jozef-acer-manjaro \
    --to=jozef.l@mittosystems.com \
    --cc=binutils@sourceware.org \
    --cc=nickc@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).