Revert "kbuild: strip generated symbols from *.ko"

This reverts commit ad7a953c52.

And commit: ("allow stripping of generated symbols under CONFIG_KALLSYMS_ALL")
            9bb482476c

These stripping patches has caused a set of issues:

1) People have reported compatibility issues with binutils due to
   lack of support for `--strip-unneeded-symbols' with objcopy 2.15.92.0.2
   Reported by: Wenji
2) ccache and distcc no longer works as expeced
   Reported by: Ted, Roland, + others
3) The installed modules increased a lot in size
   Reported by: Ted, Davej + others

Reported-by: Wenji Huang <[email protected]>
Reported-by: "Theodore Ts'o" <[email protected]>
Reported-by: Dave Jones <[email protected]>
Reported-by: Roland McGrath <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
This commit is contained in:
Sam Ravnborg 2009-01-14 21:38:20 +01:00
commit 2ea038917b
12 changed files with 166 additions and 237 deletions

View file

@ -30,19 +30,20 @@
#define all_var 0
#endif
extern const unsigned long kallsyms_addresses[];
extern const u8 kallsyms_names[];
/* These will be re-linked against their real values during the second link stage */
extern const unsigned long kallsyms_addresses[] __attribute__((weak));
extern const u8 kallsyms_names[] __attribute__((weak));
/* tell the compiler that the count isn't in the small data section if the arch
* has one (eg: FRV)
*/
extern const unsigned long kallsyms_num_syms
__attribute__((__section__(".rodata")));
__attribute__((weak, section(".rodata")));
extern const u8 kallsyms_token_table[];
extern const u16 kallsyms_token_index[];
extern const u8 kallsyms_token_table[] __attribute__((weak));
extern const u16 kallsyms_token_index[] __attribute__((weak));
extern const unsigned long kallsyms_markers[];
extern const unsigned long kallsyms_markers[] __attribute__((weak));
static inline int is_kernel_inittext(unsigned long addr)
{
@ -167,6 +168,9 @@ static unsigned long get_symbol_pos(unsigned long addr,
unsigned long symbol_start = 0, symbol_end = 0;
unsigned long i, low, high, mid;
/* This kernel should never had been booted. */
BUG_ON(!kallsyms_addresses);
/* do a binary search on the sorted kallsyms_addresses array */
low = 0;
high = kallsyms_num_syms;