mirror of
https://github.com/torvalds/linux.git
synced 2024-11-06 03:51:48 +00:00
[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>
This commit is contained in:
parent
adee14b2e1
commit
4611a771fc
@ -266,4 +266,19 @@ do { \
|
|||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* format for entries in the Global Offset Table
|
||||||
|
*/
|
||||||
|
struct got_entry {
|
||||||
|
uint64_t val;
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Layout of the Function Descriptor
|
||||||
|
*/
|
||||||
|
struct fdesc {
|
||||||
|
uint64_t ip;
|
||||||
|
uint64_t gp;
|
||||||
|
};
|
||||||
|
|
||||||
#endif /* _ASM_IA64_ELF_H */
|
#endif /* _ASM_IA64_ELF_H */
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
* David Mosberger-Tang <davidm@hpl.hp.com>
|
* David Mosberger-Tang <davidm@hpl.hp.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <linux/elf.h>
|
||||||
|
#include <linux/uaccess.h>
|
||||||
#include <asm-generic/sections.h>
|
#include <asm-generic/sections.h>
|
||||||
|
|
||||||
extern char __per_cpu_start[], __per_cpu_end[], __phys_per_cpu_start[];
|
extern char __per_cpu_start[], __per_cpu_end[], __phys_per_cpu_start[];
|
||||||
@ -22,7 +24,16 @@ extern char __start_unwind[], __end_unwind[];
|
|||||||
extern char __start_ivt_text[], __end_ivt_text[];
|
extern char __start_ivt_text[], __end_ivt_text[];
|
||||||
|
|
||||||
#undef dereference_function_descriptor
|
#undef dereference_function_descriptor
|
||||||
void *dereference_function_descriptor(void *);
|
static inline void *dereference_function_descriptor(void *ptr)
|
||||||
|
{
|
||||||
|
struct fdesc *desc = ptr;
|
||||||
|
void *p;
|
||||||
|
|
||||||
|
if (!probe_kernel_address(&desc->ip, p))
|
||||||
|
ptr = p;
|
||||||
|
return ptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif /* _ASM_IA64_SECTIONS_H */
|
#endif /* _ASM_IA64_SECTIONS_H */
|
||||||
|
|
||||||
|
@ -31,11 +31,9 @@
|
|||||||
#include <linux/elf.h>
|
#include <linux/elf.h>
|
||||||
#include <linux/moduleloader.h>
|
#include <linux/moduleloader.h>
|
||||||
#include <linux/string.h>
|
#include <linux/string.h>
|
||||||
#include <linux/uaccess.h>
|
|
||||||
#include <linux/vmalloc.h>
|
#include <linux/vmalloc.h>
|
||||||
|
|
||||||
#include <asm/patch.h>
|
#include <asm/patch.h>
|
||||||
#include <asm/sections.h>
|
|
||||||
#include <asm/unaligned.h>
|
#include <asm/unaligned.h>
|
||||||
|
|
||||||
#define ARCH_MODULE_DEBUG 0
|
#define ARCH_MODULE_DEBUG 0
|
||||||
@ -137,15 +135,6 @@ static const char *reloc_name[256] = {
|
|||||||
|
|
||||||
#undef N
|
#undef N
|
||||||
|
|
||||||
struct got_entry {
|
|
||||||
uint64_t val;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct fdesc {
|
|
||||||
uint64_t ip;
|
|
||||||
uint64_t gp;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Opaque struct for insns, to protect against derefs. */
|
/* Opaque struct for insns, to protect against derefs. */
|
||||||
struct insn;
|
struct insn;
|
||||||
|
|
||||||
@ -943,13 +932,3 @@ module_arch_cleanup (struct module *mod)
|
|||||||
if (mod->arch.core_unw_table)
|
if (mod->arch.core_unw_table)
|
||||||
unw_remove_unwind_table(mod->arch.core_unw_table);
|
unw_remove_unwind_table(mod->arch.core_unw_table);
|
||||||
}
|
}
|
||||||
|
|
||||||
void *dereference_function_descriptor(void *ptr)
|
|
||||||
{
|
|
||||||
struct fdesc *desc = ptr;
|
|
||||||
void *p;
|
|
||||||
|
|
||||||
if (!probe_kernel_address(&desc->ip, p))
|
|
||||||
ptr = p;
|
|
||||||
return ptr;
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user