[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20160804083919.GD19514@jhogan-linux.le.imgtec.org>
Date: Thu, 4 Aug 2016 09:39:20 +0100
From: James Hogan <james.hogan@...tec.com>
To: Steven Rostedt <rostedt@...dmis.org>
CC: <linux-kernel@...r.kernel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Ingo Molnar <mingo@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
<stable@...r.kernel.org>, Ross Burton <ross.burton@...el.com>,
Laura Abbott <labbott@...hat.com>
Subject: Re: [PATCH 1/4] ftrace/recordmcount: Work around for addition of
metag magic but not relocations
On Wed, Aug 03, 2016 at 09:54:17AM -0400, Steven Rostedt wrote:
> From: Laura Abbott <labbott@...hat.com>
>
> glibc recently did a sync up (94e73c95d9b5 "elf.h: Sync with the gabi
> webpage") that added a #define for EM_METAG but did not add relocations
>
> This triggers build errors:
>
> scripts/recordmcount.c: In function 'do_file':
> scripts/recordmcount.c:466:28: error: 'R_METAG_ADDR32' undeclared (first use in this function)
> case EM_METAG: reltype = R_METAG_ADDR32;
> ^~~~~~~~~~~~~~
> scripts/recordmcount.c:466:28: note: each undeclared identifier is reported only once for each function it appears in
> scripts/recordmcount.c:468:20: error: 'R_METAG_NONE' undeclared (first use in this function)
> rel_type_nop = R_METAG_NONE;
> ^~~~~~~~~~~~
>
> Work around this change with some more #ifdefery for the relocations.
>
> Fedora Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1354034
>
> Link: http://lkml.kernel.org/r/1468005530-14757-1-git-send-email-labbott@redhat.com
>
> Cc: stable@...r.kernel.org # v3.9+
> Cc: James Hogan <james.hogan@...tec.com>
> Fixes: 00512bdd4573 ("metag: ftrace support")
> Reported-by: Ross Burton <ross.burton@...el.com>
> Signed-off-by: Laura Abbott <labbott@...hat.com>
> Signed-off-by: Steven Rostedt <rostedt@...dmis.org>
> ---
> scripts/recordmcount.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/recordmcount.c b/scripts/recordmcount.c
> index e167592793a7..42396a74405d 100644
> --- a/scripts/recordmcount.c
> +++ b/scripts/recordmcount.c
> @@ -33,10 +33,17 @@
> #include <string.h>
> #include <unistd.h>
>
> +/*
> + * glibc synced up and added the metag number but didn't add the relocations.
> + * Work around this in a crude manner for now.
> + */
> #ifndef EM_METAG
> -/* Remove this when these make it to the standard system elf.h. */
> #define EM_METAG 174
> +#endif
> +#ifndef R_METAG_ADDR32
> #define R_METAG_ADDR32 2
> +#endif
> +#ifndef R_METAG_NONE
> #define R_METAG_NONE 3
> #endif
FWIW:
Reviewed-by: James Hogan <james.hogan@...tec.com>
Thanks
James
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists