diff options
author | Laura Abbott <labbott@redhat.com> | 2016-07-08 15:18:50 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2016-08-02 12:57:24 -0400 |
commit | b2e1c26f0b62531636509fbcb6dab65617ed8331 (patch) | |
tree | 6aa5808ddcc56c658b3d4668b991b386e7cc8c1d /scripts | |
parent | 124a3d88fa20e1869fc229d7d8c740cc81944264 (diff) |
ftrace/recordmcount: Work around for addition of metag magic but not relocations
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@vger.kernel.org # v3.9+
Cc: James Hogan <james.hogan@imgtec.com>
Fixes: 00512bdd4573 ("metag: ftrace support")
Reported-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/recordmcount.c | 9 |
1 files changed, 8 insertions, 1 deletions
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 @@ | |||
33 | #include <string.h> | 33 | #include <string.h> |
34 | #include <unistd.h> | 34 | #include <unistd.h> |
35 | 35 | ||
36 | /* | ||
37 | * glibc synced up and added the metag number but didn't add the relocations. | ||
38 | * Work around this in a crude manner for now. | ||
39 | */ | ||
36 | #ifndef EM_METAG | 40 | #ifndef EM_METAG |
37 | /* Remove this when these make it to the standard system elf.h. */ | ||
38 | #define EM_METAG 174 | 41 | #define EM_METAG 174 |
42 | #endif | ||
43 | #ifndef R_METAG_ADDR32 | ||
39 | #define R_METAG_ADDR32 2 | 44 | #define R_METAG_ADDR32 2 |
45 | #endif | ||
46 | #ifndef R_METAG_NONE | ||
40 | #define R_METAG_NONE 3 | 47 | #define R_METAG_NONE 3 |
41 | #endif | 48 | #endif |
42 | 49 | ||