diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2023-07-23 13:04:45 +0300 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2023-07-31 17:42:14 +0300 |
commit | 4732acb75f468c12e2715cf5bf726cac873bc0e5 (patch) | |
tree | d2a8694cc87c9a5c9883394c826136bd3039a855 /scripts/mod/modpost.h | |
parent | 71d965cf3577d68788a3d3ef044eb8e6d85013fa (diff) | |
download | linux-4732acb75f468c12e2715cf5bf726cac873bc0e5.tar.xz |
modpost: clean up MIPS64 little endian relocation code
MIPS64 little endian target has an odd encoding of r_info.
This commit makes the special handling less ugly. It is still ugly,
but #if conditionals will go away, at least.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/mod/modpost.h')
-rw-r--r-- | scripts/mod/modpost.h | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/scripts/mod/modpost.h b/scripts/mod/modpost.h index dfdb9484e325..5f94c2c9f2d9 100644 --- a/scripts/mod/modpost.h +++ b/scripts/mod/modpost.h @@ -50,28 +50,6 @@ #define ELF_R_TYPE ELF64_R_TYPE #endif -/* The 64-bit MIPS ELF ABI uses an unusual reloc format. */ -typedef struct -{ - Elf32_Word r_sym; /* Symbol index */ - unsigned char r_ssym; /* Special symbol for 2nd relocation */ - unsigned char r_type3; /* 3rd relocation type */ - unsigned char r_type2; /* 2nd relocation type */ - unsigned char r_type1; /* 1st relocation type */ -} _Elf64_Mips_R_Info; - -typedef union -{ - Elf64_Xword r_info_number; - _Elf64_Mips_R_Info r_info_fields; -} _Elf64_Mips_R_Info_union; - -#define ELF64_MIPS_R_SYM(i) \ - ((__extension__ (_Elf64_Mips_R_Info_union)(i)).r_info_fields.r_sym) - -#define ELF64_MIPS_R_TYPE(i) \ - ((__extension__ (_Elf64_Mips_R_Info_union)(i)).r_info_fields.r_type1) - #if KERNEL_ELFDATA != HOST_ELFDATA static inline void __endian(const void *src, void *dest, unsigned int size) |