All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@amd.com>
To: Mark Kettenis <kettenis@openbsd.org>, <u-boot@lists.denx.de>
Cc: Tom Rini <trini@konsulko.com>
Subject: Re: [PATCH] tools: relocate-rela: Don't assume <elf.h> defines Microblaze stuff
Date: Wed, 27 Jul 2022 17:59:02 +0200	[thread overview]
Message-ID: <a2a694d0-7363-d70d-d397-dbda1e06114c@amd.com> (raw)
In-Reply-To: <20220727143405.52368-1-kettenis@openbsd.org>



On 7/27/22 16:34, Mark Kettenis wrote:
> The contents of <elf.h> differ between OSes.  It may only define
> the relocation types for the host architecture, and may not contain
> machine-specific defines for more obscure architectures (such as
> Microblaze) at all.
> 
> Define the relevant constants for Microblaze locally if they are
> not provided by <elf.h>.
> 
> Fixes: 034944b33bc8 ("tools: relocate-rela: Add support for 32bit Microblaze relocation")
> Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
> ---
>   tools/relocate-rela.c | 20 ++++++++++++++++++++
>   1 file changed, 20 insertions(+)
> 
> diff --git a/tools/relocate-rela.c b/tools/relocate-rela.c
> index 090fb1acb2..c57c3cfade 100644
> --- a/tools/relocate-rela.c
> +++ b/tools/relocate-rela.c
> @@ -20,6 +20,26 @@
>   #define R_AARCH64_RELATIVE	1027
>   #endif
>   
> +#ifndef EM_MICROBLAZE
> +#define EM_MICROBLAZE		189
> +#endif
> +
> +#ifndef R_MICROBLAZE_NONE
> +#define R_MICROBLAZE_NONE	0
> +#endif
> +
> +#ifndef R_MICROBLAZE_32
> +#define R_MICROBLAZE_32		1
> +#endif
> +
> +#ifndef R_MICROBLAZE_REL
> +#define R_MICROBLAZE_REL	16
> +#endif
> +
> +#ifndef R_MICROBLAZE_GLOB_DAT
> +#define R_MICROBLAZE_GLOB_DAT	18
> +#endif
> +
>   static int ei_class;
>   
>   static uint64_t rela_start, rela_end, text_base, dyn_start;


It is fixed already in the latest master branch. Tom merged it yesterday.
Please take a look.

Thanks,
Michal

  reply	other threads:[~2022-07-27 15:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-27 14:34 [PATCH] tools: relocate-rela: Don't assume <elf.h> defines Microblaze stuff Mark Kettenis
2022-07-27 15:59 ` Michal Simek [this message]
2022-07-27 16:31   ` Mark Kettenis

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=a2a694d0-7363-d70d-d397-dbda1e06114c@amd.com \
    --to=michal.simek@amd.com \
    --cc=kettenis@openbsd.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.