Merge commit 'f4bcd8ccddb02833340652e9f46f5127828eb79d' into x86/build
Bring in upstream merge of x86/kaslr for future patches. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
This commit is contained in:
@@ -722,15 +722,25 @@ static void percpu_init(void)
|
||||
|
||||
/*
|
||||
* Check to see if a symbol lies in the .data..percpu section.
|
||||
* For some as yet not understood reason the "__init_begin"
|
||||
* symbol which immediately preceeds the .data..percpu section
|
||||
* also shows up as it it were part of it so we do an explict
|
||||
* check for that symbol name and ignore it.
|
||||
*
|
||||
* The linker incorrectly associates some symbols with the
|
||||
* .data..percpu section so we also need to check the symbol
|
||||
* name to make sure that we classify the symbol correctly.
|
||||
*
|
||||
* The GNU linker incorrectly associates:
|
||||
* __init_begin
|
||||
* __per_cpu_load
|
||||
*
|
||||
* The "gold" linker incorrectly associates:
|
||||
* init_per_cpu__irq_stack_union
|
||||
* init_per_cpu__gdt_page
|
||||
*/
|
||||
static int is_percpu_sym(ElfW(Sym) *sym, const char *symname)
|
||||
{
|
||||
return (sym->st_shndx == per_cpu_shndx) &&
|
||||
strcmp(symname, "__init_begin");
|
||||
strcmp(symname, "__init_begin") &&
|
||||
strcmp(symname, "__per_cpu_load") &&
|
||||
strncmp(symname, "init_per_cpu_", 13);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user