MIPS: module: Unify rel & rela reloc handling
The module load code has previously had entirely separate implementations for rel & rela style relocs, which unnecessarily duplicates a whole lot of code. Unify the implementations of both types of reloc, sharing the bulk of the code. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15832/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:

committed by
Ralf Baechle

parent
351b0940d4
commit
430d0b8894
@@ -47,8 +47,8 @@ typedef struct {
|
||||
#define Elf_Mips_Rel Elf32_Rel
|
||||
#define Elf_Mips_Rela Elf32_Rela
|
||||
|
||||
#define ELF_MIPS_R_SYM(rel) ELF32_R_SYM(rel.r_info)
|
||||
#define ELF_MIPS_R_TYPE(rel) ELF32_R_TYPE(rel.r_info)
|
||||
#define ELF_MIPS_R_SYM(rel) ELF32_R_SYM((rel).r_info)
|
||||
#define ELF_MIPS_R_TYPE(rel) ELF32_R_TYPE((rel).r_info)
|
||||
|
||||
#endif
|
||||
|
||||
@@ -65,8 +65,8 @@ typedef struct {
|
||||
#define Elf_Mips_Rel Elf64_Mips_Rel
|
||||
#define Elf_Mips_Rela Elf64_Mips_Rela
|
||||
|
||||
#define ELF_MIPS_R_SYM(rel) (rel.r_sym)
|
||||
#define ELF_MIPS_R_TYPE(rel) (rel.r_type)
|
||||
#define ELF_MIPS_R_SYM(rel) ((rel).r_sym)
|
||||
#define ELF_MIPS_R_TYPE(rel) ((rel).r_type)
|
||||
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user