aboutsummaryrefslogtreecommitdiff
path: root/tools/relocate-rela.c
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@amd.com>2022-07-08 08:15:06 +0200
committerMichal Simek <michal.simek@amd.com>2022-07-26 08:23:55 +0200
commit65fc1697dbfbf61680e6a9cdad0a2d7dd2f9bed9 (patch)
tree6c14702b62591c385f8c903b529c5e59f405985f /tools/relocate-rela.c
parentbb7468b4c9d7ce0f7cdd5bc5eae11e8fe87250cf (diff)
downloadu-boot-65fc1697dbfbf61680e6a9cdad0a2d7dd2f9bed9.zip
u-boot-65fc1697dbfbf61680e6a9cdad0a2d7dd2f9bed9.tar.gz
u-boot-65fc1697dbfbf61680e6a9cdad0a2d7dd2f9bed9.tar.bz2
tools: relocate-rela: Define all macros for e_machine and reloc types
With some old toolchain not all values should be available that's why better to define all of them to avoid compilation issues. Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/e2a66854c5506100eb82b5b33cec7f0b5fca1008.1657260903.git.michal.simek@amd.com
Diffstat (limited to 'tools/relocate-rela.c')
-rw-r--r--tools/relocate-rela.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/tools/relocate-rela.c b/tools/relocate-rela.c
index 5f31d8a..2d2a2ed 100644
--- a/tools/relocate-rela.c
+++ b/tools/relocate-rela.c
@@ -16,10 +16,34 @@
#include <string.h>
#include "compiler.h"
+#ifndef EM_AARCH64
+#define EM_AARCH64 183
+#endif
+
#ifndef R_AARCH64_RELATIVE
#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;