linux/include/asm-generic/module.h

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __ASM_GENERIC_MODULE_H
#define __ASM_GENERIC_MODULE_H

/*
 * Many architectures just need a simple module
 * loader without arch specific data.
 */
#ifndef CONFIG_HAVE_MOD_ARCH_SPECIFIC
struct mod_arch_specific
{
};
#endif

#ifdef CONFIG_64BIT
#define Elf_Shdr
#define Elf_Phdr
#define Elf_Sym
#define Elf_Dyn
#define Elf_Ehdr
#define Elf_Addr
#ifdef CONFIG_MODULES_USE_ELF_REL
#define Elf_Rel
#endif
#ifdef CONFIG_MODULES_USE_ELF_RELA
#define Elf_Rela
#endif
#define ELF_R_TYPE(X)
#define ELF_R_SYM(X)

#else /* CONFIG_64BIT */

#define Elf_Shdr
#define Elf_Phdr
#define Elf_Sym
#define Elf_Dyn
#define Elf_Ehdr
#define Elf_Addr
#ifdef CONFIG_MODULES_USE_ELF_REL
#define Elf_Rel
#endif
#ifdef CONFIG_MODULES_USE_ELF_RELA
#define Elf_Rela
#endif
#define ELF_R_TYPE
#define ELF_R_SYM
#endif

#endif /* __ASM_GENERIC_MODULE_H */