-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use some preprocessor magic in combination with the newly introduced CONFIG_BITS to unify module.h. A few additional symbols are added as they are needed in a follow-up patch Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
- Loading branch information
Sam Ravnborg
authored and
David S. Miller
committed
Dec 26, 2008
1 parent
fe6875e
commit e1648a8
Showing
3 changed files
with
24 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,24 @@ | ||
#ifndef ___ASM_SPARC_MODULE_H | ||
#define ___ASM_SPARC_MODULE_H | ||
#if defined(__sparc__) && defined(__arch64__) | ||
#include <asm/module_64.h> | ||
#else | ||
#include <asm/module_32.h> | ||
#endif | ||
#endif | ||
#ifndef __SPARC_MODULE_H | ||
#define __SPARC_MODULE_H | ||
struct mod_arch_specific { }; | ||
|
||
/* | ||
* Use some preprocessor magic to define the correct symbol | ||
* for sparc32 and sparc64. | ||
* Elf_Addr becomes Elf32_Addr for sparc32 and Elf64_Addr for sparc64 | ||
*/ | ||
#define ___ELF(a, b, c) a##b##c | ||
#define __ELF(a, b, c) ___ELF(a, b, c) | ||
#define _Elf(t) __ELF(Elf, CONFIG_BITS, t) | ||
#define _ELF(t) __ELF(ELF, CONFIG_BITS, t) | ||
|
||
#define Elf_Shdr _Elf(_Shdr) | ||
#define Elf_Sym _Elf(_Sym) | ||
#define Elf_Ehdr _Elf(_Ehdr) | ||
#define Elf_Rela _Elf(_Rela) | ||
#define Elf_Addr _Elf(_Addr) | ||
|
||
#define ELF_R_SYM _ELF(_R_SYM) | ||
#define ELF_R_TYPE _ELF(_R_TYPE) | ||
|
||
#endif /* __SPARC_MODULE_H */ |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.