public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "Frager, Neal" <neal.frager@amd.com>
To: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>,
	"binutils@sourceware.org" <binutils@sourceware.org>
Cc: "Erkiaga Elorza, Ibai" <ibai.erkiaga-elorza@amd.com>,
	"Mekala, Nagaraju" <nagaraju.mekala@amd.com>,
	"Hatle, Mark" <mark.hatle@amd.com>,
	"Mutyala, Sadanand" <sadanand.mutyala@amd.com>,
	"Nali, Appa Rao" <appa.rao.nali@amd.com>,
	"Hunsigida, Vidhumouli" <vidhumouli.hunsigida@amd.com>,
	"luca.ceresoli@bootlin.com" <luca.ceresoli@bootlin.com>,
	"nickc@redhat.com" <nickc@redhat.com>
Subject: RE: [PATCH v1 1/1] bfd: microblaze: Fix automated build errors
Date: Mon, 9 Oct 2023 06:13:17 +0000	[thread overview]
Message-ID: <CH2PR12MB5004B3753CF40E26BA238461F0CEA@CH2PR12MB5004.namprd12.prod.outlook.com> (raw)
In-Reply-To: <74ce52f1-9554-9968-a653-518ca4c99730@oracle.com>

Hi Vladimir,

> This patch fixes the following automated build errors:
> https://builder.sourceware.org/buildbot/#/builders/80/builds/2101/step
> s/4/logs/stdio 
> https://builder.sourceware.org/buildbot/#/builders/72/builds/3405/step
> s/4/logs/stdio
>
> Signed-off-by: Neal Frager <neal.frager@amd.com>
> ---
>   bfd/elf32-microblaze.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/bfd/elf32-microblaze.c b/bfd/elf32-microblaze.c index 
> a8ced43c08a..96bb63fbd2e 100644
> --- a/bfd/elf32-microblaze.c
> +++ b/bfd/elf32-microblaze.c
> @@ -1986,7 +1986,7 @@ microblaze_elf_relax_section (bfd *abfd,
>   		/* Validate the in-band val.  */
>   		val = bfd_get_32 (abfd, contents + irel->r_offset);
>   		if (val != irel->r_addend && ELF32_R_TYPE (irel->r_info) == R_MICROBLAZE_32_NONE) {
> -		    fprintf(stderr, "%d: CORRUPT relax reloc %x %lx\n", __LINE__, val, irel->r_addend);
> +		    fprintf(stderr, "%d: CORRUPT relax reloc %x %x\n", __LINE__, 
> +val, irel->r_addend);

> The type of irel->r_addend is "bfd_vma".
> "bfd_vma" can be "unsigned long" or "unsigned int".

> Perhaps the correct fix is:
>  fprintf(stderr, "%d: CORRUPT relax reloc %x %lx\n", __LINE__, val, (unsigned long) irel->r_addend); or
>  fprintf(stderr, "%d: CORRUPT relax reloc %x %llx\n", __LINE__, val, (unsigned long long) irel->r_addend);

Thank you for your input.  I will implement your solution in v3 of the patch.

Just to be sure, both lines should be cast set to (unsigned long), correct?  The "(unsigned long long)" that you used on the second fprintf statement was just a typo?

Thank you for your help.

Best regards,
Neal Frager
AMD

  reply	other threads:[~2023-10-09  6:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-07  7:11 Neal Frager
2023-10-07 18:56 ` Vladimir Mezentsev
2023-10-09  6:13   ` Frager, Neal [this message]
2023-10-09 16:05     ` Vladimir Mezentsev

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=CH2PR12MB5004B3753CF40E26BA238461F0CEA@CH2PR12MB5004.namprd12.prod.outlook.com \
    --to=neal.frager@amd.com \
    --cc=appa.rao.nali@amd.com \
    --cc=binutils@sourceware.org \
    --cc=ibai.erkiaga-elorza@amd.com \
    --cc=luca.ceresoli@bootlin.com \
    --cc=mark.hatle@amd.com \
    --cc=nagaraju.mekala@amd.com \
    --cc=nickc@redhat.com \
    --cc=sadanand.mutyala@amd.com \
    --cc=vidhumouli.hunsigida@amd.com \
    --cc=vladimir.mezentsev@oracle.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).