Commit 89f97c42 authored by Kai Germaschewski's avatar Kai Germaschewski Committed by Linus Torvalds

kbuild: kallsyms cleanup

There's no need to alias the kallsyms-related symbols to a dummy
variable, we can as well just do the sanity check against NULL.
parent 8db9d338
...@@ -9,12 +9,10 @@ ...@@ -9,12 +9,10 @@
#include <linux/kallsyms.h> #include <linux/kallsyms.h>
#include <linux/module.h> #include <linux/module.h>
static char kallsyms_dummy;
/* These will be re-linked against their real values during the second link stage */ /* These will be re-linked against their real values during the second link stage */
extern unsigned long kallsyms_addresses[1] __attribute__((weak, alias("kallsyms_dummy"))); extern unsigned long kallsyms_addresses[] __attribute__((weak));
extern unsigned long kallsyms_num_syms __attribute__((weak, alias("kallsyms_dummy"))); extern unsigned long kallsyms_num_syms __attribute__((weak));
extern char kallsyms_names[1] __attribute__((weak, alias("kallsyms_dummy"))); extern char kallsyms_names[] __attribute__((weak));
/* Defined by the linker script. */ /* Defined by the linker script. */
extern char _stext[], _etext[]; extern char _stext[], _etext[];
...@@ -28,8 +26,7 @@ const char *kallsyms_lookup(unsigned long addr, ...@@ -28,8 +26,7 @@ const char *kallsyms_lookup(unsigned long addr,
unsigned long i, best = 0; unsigned long i, best = 0;
/* This kernel should never had been booted. */ /* This kernel should never had been booted. */
if ((void *)kallsyms_addresses == &kallsyms_dummy) BUG_ON(!kallsyms_addresses);
BUG();
namebuf[127] = 0; namebuf[127] = 0;
namebuf[0] = 0; namebuf[0] = 0;
......
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