aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/boot
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/boot')
-rw-r--r--arch/mips/boot/tools/relocs_64.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/arch/mips/boot/tools/relocs_64.c b/arch/mips/boot/tools/relocs_64.c
index b671b5e2dcd8..06066e6ac2f9 100644
--- a/arch/mips/boot/tools/relocs_64.c
+++ b/arch/mips/boot/tools/relocs_64.c
@@ -9,17 +9,20 @@
9 9
10typedef uint8_t Elf64_Byte; 10typedef uint8_t Elf64_Byte;
11 11
12typedef struct { 12typedef union {
13 Elf64_Word r_sym; /* Symbol index. */ 13 struct {
14 Elf64_Byte r_ssym; /* Special symbol. */ 14 Elf64_Word r_sym; /* Symbol index. */
15 Elf64_Byte r_type3; /* Third relocation. */ 15 Elf64_Byte r_ssym; /* Special symbol. */
16 Elf64_Byte r_type2; /* Second relocation. */ 16 Elf64_Byte r_type3; /* Third relocation. */
17 Elf64_Byte r_type; /* First relocation. */ 17 Elf64_Byte r_type2; /* Second relocation. */
18 Elf64_Byte r_type; /* First relocation. */
19 } fields;
20 Elf64_Xword unused;
18} Elf64_Mips_Rela; 21} Elf64_Mips_Rela;
19 22
20#define ELF_CLASS ELFCLASS64 23#define ELF_CLASS ELFCLASS64
21#define ELF_R_SYM(val) (((Elf64_Mips_Rela *)(&val))->r_sym) 24#define ELF_R_SYM(val) (((Elf64_Mips_Rela *)(&val))->fields.r_sym)
22#define ELF_R_TYPE(val) (((Elf64_Mips_Rela *)(&val))->r_type) 25#define ELF_R_TYPE(val) (((Elf64_Mips_Rela *)(&val))->fields.r_type)
23#define ELF_ST_TYPE(o) ELF64_ST_TYPE(o) 26#define ELF_ST_TYPE(o) ELF64_ST_TYPE(o)
24#define ELF_ST_BIND(o) ELF64_ST_BIND(o) 27#define ELF_ST_BIND(o) ELF64_ST_BIND(o)
25#define ELF_ST_VISIBILITY(o) ELF64_ST_VISIBILITY(o) 28#define ELF_ST_VISIBILITY(o) ELF64_ST_VISIBILITY(o)