mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-05 00:35:23 +00:00
pie: Give VDSO symbol table local scope
In commit c2271198, Laurent Dufour kindly reunified the VDSO code that had become duplicated between architectures. Unfortunately this introduced a regression in AArch64 where apparently due to the scope of vdso_symbols array of pointers to characters changing from local to global, load-time relocations became necessary. The following thread on the GCC mailing list discusses why load-time relocations can be necessary when pointers are used, although it doesn't mention the potential for locally scoped arrays to be handled differently: https://gcc.gnu.org/ml/gcc/2004-05/msg01016.html Because the alternatives, such as porting piegen to AArch64, are far more involved, simply revert the change in scope. Signed-off-by: Christopher Covington <cov@codeaurora.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
627f9a9e5f
commit
871da9a111
@@ -60,10 +60,6 @@ static inline unsigned long vvar_vma_size(struct vdso_symtable *t)
|
||||
return t->vvar_end - t->vvar_start;
|
||||
}
|
||||
|
||||
extern const char *vdso_symbols[VDSO_SYMBOL_MAX];
|
||||
|
||||
extern int vdso_fill_symtable(char *mem, size_t size, struct vdso_symtable *t);
|
||||
|
||||
|
||||
|
||||
#endif /* __CR_UTIL_VDSO_H__ */
|
||||
|
@@ -24,10 +24,6 @@
|
||||
#endif
|
||||
#define LOG_PREFIX "vdso: "
|
||||
|
||||
const char *vdso_symbols[VDSO_SYMBOL_MAX] = {
|
||||
ARCH_VDSO_SYMBOLS
|
||||
};
|
||||
|
||||
/* Check if pointer is out-of-bound */
|
||||
static bool __ptr_oob(void *ptr, void *start, size_t size)
|
||||
{
|
||||
@@ -54,6 +50,10 @@ static unsigned long elf_hash(const unsigned char *name)
|
||||
|
||||
int vdso_fill_symtable(char *mem, size_t size, struct vdso_symtable *t)
|
||||
{
|
||||
const char *vdso_symbols[VDSO_SYMBOL_MAX] = {
|
||||
ARCH_VDSO_SYMBOLS
|
||||
};
|
||||
|
||||
Elf64_Phdr *dynamic = NULL, *load = NULL;
|
||||
Elf64_Ehdr *ehdr = (void *)mem;
|
||||
Elf64_Dyn *dyn_strtab = NULL;
|
||||
|
Reference in New Issue
Block a user