Commit 3ca8b12e authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

vdso: x86 -- Drop DECLARE_VDSO macro

We're not sharing the code anymore so drop it.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 8a073493
...@@ -106,19 +106,6 @@ static inline void vdso_put_mark(void *where, unsigned long proxy_addr) ...@@ -106,19 +106,6 @@ static inline void vdso_put_mark(void *where, unsigned long proxy_addr)
#define VDSO_SYMBOL_TIME_NAME "__vdso_time" #define VDSO_SYMBOL_TIME_NAME "__vdso_time"
#define DECLARE_VDSO(ident_name, symtab_name) \
\
char ident_name[] = { \
0x7f, 0x45, 0x4c, 0x46, 0x02, 0x01, 0x01, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
}; \
\
char *symtab_name[VDSO_SYMBOL_MAX] = { \
[VDSO_SYMBOL_CLOCK_GETTIME] = VDSO_SYMBOL_CLOCK_GETTIME_NAME, \
[VDSO_SYMBOL_GETCPU] = VDSO_SYMBOL_GETCPU_NAME, \
[VDSO_SYMBOL_GETTIMEOFDAY] = VDSO_SYMBOL_GETTIMEOFDAY_NAME, \
[VDSO_SYMBOL_TIME] = VDSO_SYMBOL_TIME_NAME, \
};
extern struct vdso_symtable vdso_sym_rt; extern struct vdso_symtable vdso_sym_rt;
extern u64 vdso_pfn; extern u64 vdso_pfn;
......
...@@ -90,9 +90,22 @@ int vdso_fill_symtable(char *mem, size_t size, struct vdso_symtable *t) ...@@ -90,9 +90,22 @@ int vdso_fill_symtable(char *mem, size_t size, struct vdso_symtable *t)
unsigned long base = VDSO_BAD_ADDR; unsigned long base = VDSO_BAD_ADDR;
unsigned int i, j, k; unsigned int i, j, k;
DECLARE_VDSO(vdso_ident, vdso_symbols); /*
* See Elf specification for this magic values.
*/
const char elf_ident[] = {
0x7f, 0x45, 0x4c, 0x46, 0x02, 0x01, 0x01, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const char *vdso_symbols[VDSO_SYMBOL_MAX] = {
[VDSO_SYMBOL_CLOCK_GETTIME] = VDSO_SYMBOL_CLOCK_GETTIME_NAME,
[VDSO_SYMBOL_GETCPU] = VDSO_SYMBOL_GETCPU_NAME,
[VDSO_SYMBOL_GETTIMEOFDAY] = VDSO_SYMBOL_GETTIMEOFDAY_NAME,
[VDSO_SYMBOL_TIME] = VDSO_SYMBOL_TIME_NAME,
};
BUILD_BUG_ON(sizeof(vdso_ident) != sizeof(ehdr->e_ident)); BUILD_BUG_ON(sizeof(elf_ident) != sizeof(ehdr->e_ident));
pr_debug("Parsing at %lx %lx\n", pr_debug("Parsing at %lx %lx\n",
(long)mem, (long)mem + (long)size); (long)mem, (long)mem + (long)size);
...@@ -100,7 +113,7 @@ int vdso_fill_symtable(char *mem, size_t size, struct vdso_symtable *t) ...@@ -100,7 +113,7 @@ int vdso_fill_symtable(char *mem, size_t size, struct vdso_symtable *t)
/* /*
* Make sure it's a file we support. * Make sure it's a file we support.
*/ */
if (builtin_memcmp(ehdr->e_ident, vdso_ident, sizeof(vdso_ident))) { if (builtin_memcmp(ehdr->e_ident, elf_ident, sizeof(elf_ident))) {
pr_debug("Elf header magic mismatch\n"); pr_debug("Elf header magic mismatch\n");
goto err; goto err;
} }
...@@ -190,7 +203,7 @@ int vdso_fill_symtable(char *mem, size_t size, struct vdso_symtable *t) ...@@ -190,7 +203,7 @@ int vdso_fill_symtable(char *mem, size_t size, struct vdso_symtable *t)
goto err; goto err;
k = get_symbol_index(&dynsymbol_names[sym->st_name], k = get_symbol_index(&dynsymbol_names[sym->st_name],
vdso_symbols, (char **)vdso_symbols,
ARRAY_SIZE(vdso_symbols)); ARRAY_SIZE(vdso_symbols));
if (k != VDSO_SYMBOL_MAX) { if (k != VDSO_SYMBOL_MAX) {
builtin_memcpy(t->symbols[k].name, vdso_symbols[k], builtin_memcpy(t->symbols[k].name, vdso_symbols[k],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment