diff options
author | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-09-09 18:56:47 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2008-09-10 13:46:32 -0400 |
commit | 4611a771fc8e5ad77d27f25268846abb425101a0 (patch) | |
tree | 0c897e70d6ae6a810dfa2f4be8a6aaba7d33e8f1 /arch/ia64/include | |
parent | adee14b2e1557d0a8559f29681732d05a89dfc35 (diff) |
[IA64] fix compile failure with non modular builds
Broke the non modular builds by moving an essential function into
modules.c. Fix this by moving it out again and into asm/sections.h as
an inline. To do this, the definitions of struct fdesc and struct
got_val have been lifted out of modules.c and put in asm/elf.h where
they belong.
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64/include')
-rw-r--r-- | arch/ia64/include/asm/elf.h | 15 | ||||
-rw-r--r-- | arch/ia64/include/asm/sections.h | 13 |
2 files changed, 27 insertions, 1 deletions
diff --git a/arch/ia64/include/asm/elf.h b/arch/ia64/include/asm/elf.h index 5e0c1a6bce8d..2acb6b6543c9 100644 --- a/arch/ia64/include/asm/elf.h +++ b/arch/ia64/include/asm/elf.h | |||
@@ -266,4 +266,19 @@ do { \ | |||
266 | } \ | 266 | } \ |
267 | } while (0) | 267 | } while (0) |
268 | 268 | ||
269 | /* | ||
270 | * format for entries in the Global Offset Table | ||
271 | */ | ||
272 | struct got_entry { | ||
273 | uint64_t val; | ||
274 | }; | ||
275 | |||
276 | /* | ||
277 | * Layout of the Function Descriptor | ||
278 | */ | ||
279 | struct fdesc { | ||
280 | uint64_t ip; | ||
281 | uint64_t gp; | ||
282 | }; | ||
283 | |||
269 | #endif /* _ASM_IA64_ELF_H */ | 284 | #endif /* _ASM_IA64_ELF_H */ |
diff --git a/arch/ia64/include/asm/sections.h b/arch/ia64/include/asm/sections.h index a7acad2bc2f0..f66799891036 100644 --- a/arch/ia64/include/asm/sections.h +++ b/arch/ia64/include/asm/sections.h | |||
@@ -6,6 +6,8 @@ | |||
6 | * David Mosberger-Tang <davidm@hpl.hp.com> | 6 | * David Mosberger-Tang <davidm@hpl.hp.com> |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/elf.h> | ||
10 | #include <linux/uaccess.h> | ||
9 | #include <asm-generic/sections.h> | 11 | #include <asm-generic/sections.h> |
10 | 12 | ||
11 | extern char __per_cpu_start[], __per_cpu_end[], __phys_per_cpu_start[]; | 13 | extern char __per_cpu_start[], __per_cpu_end[], __phys_per_cpu_start[]; |
@@ -22,7 +24,16 @@ extern char __start_unwind[], __end_unwind[]; | |||
22 | extern char __start_ivt_text[], __end_ivt_text[]; | 24 | extern char __start_ivt_text[], __end_ivt_text[]; |
23 | 25 | ||
24 | #undef dereference_function_descriptor | 26 | #undef dereference_function_descriptor |
25 | void *dereference_function_descriptor(void *); | 27 | static inline void *dereference_function_descriptor(void *ptr) |
28 | { | ||
29 | struct fdesc *desc = ptr; | ||
30 | void *p; | ||
31 | |||
32 | if (!probe_kernel_address(&desc->ip, p)) | ||
33 | ptr = p; | ||
34 | return ptr; | ||
35 | } | ||
36 | |||
26 | 37 | ||
27 | #endif /* _ASM_IA64_SECTIONS_H */ | 38 | #endif /* _ASM_IA64_SECTIONS_H */ |
28 | 39 | ||