Commit a358e2a5 authored by Linus Torvalds's avatar Linus Torvalds

Merge http://linux-isdn.bkbits.net/linux-2.5.make

into home.transmeta.com:/home/torvalds/v2.5/linux
parents c9b1ca0d 89f97c42
......@@ -52,7 +52,7 @@ o Gnu C 2.95.3 # gcc --version
o Gnu make 3.78 # make --version
o binutils 2.9.5.0.25 # ld -v
o util-linux 2.10o # fdformat --version
o module-init-tools 0.9 # rmmod -V
o module-init-tools 0.9.8 # rmmod -V
o e2fsprogs 1.29 # tune2fs
o jfsutils 1.0.14 # fsck.jfs -V
o reiserfsprogs 3.6.3 # reiserfsck -V 2>&1|grep reiserfsprogs
......
......@@ -4,6 +4,9 @@
#include <asm/ptrace.h>
#include <asm/system.h>
#define LOAD_OFFSET PAGE_OFFSET
#include <asm-generic/vmlinux.lds.h>
OUTPUT_FORMAT("elf64-ia64-little")
OUTPUT_ARCH(ia64)
ENTRY(phys_start)
......@@ -60,23 +63,6 @@ SECTIONS
machvec_end = .;
#endif
__start___ksymtab = .; /* Kernel symbol table */
__ksymtab : AT(ADDR(__ksymtab) - PAGE_OFFSET)
{ *(__ksymtab) }
__stop___ksymtab = .;
__start___gpl_ksymtab = .; /* Kernel symbol table: GPL only */
__gpl_ksymtab : AT(ADDR(__gpl_ksymtab) - PAGE_OFFSET)
{ *(__gpl_ksymtab) }
__stop___gpl_ksymtab = .;
__kallsyms : AT(ADDR(__kallsyms) - PAGE_OFFSET)
{
__start___kallsyms = .; /* All kernel symbols */
*(__kallsyms)
__stop___kallsyms = .;
}
/* Unwind info & table: */
. = ALIGN(8);
.IA_64.unwind_info : AT(ADDR(.IA_64.unwind_info) - PAGE_OFFSET)
......@@ -86,12 +72,8 @@ SECTIONS
{ *(.IA_64.unwind*) }
ia64_unw_end = .;
.rodata : AT(ADDR(.rodata) - PAGE_OFFSET)
{ *(.rodata) *(.rodata.*) }
.kstrtab : AT(ADDR(.kstrtab) - PAGE_OFFSET)
{ *(.kstrtab) }
__vermagic : AT(ADDR(__vermagic) - PAGE_OFFSET)
{ *(__vermagic) }
RODATA
.opd : AT(ADDR(.opd) - PAGE_OFFSET)
{ *(.opd) }
......
#ifndef LOAD_OFFSET
#define LOAD_OFFSET 0
#endif
#define RODATA \
.rodata : { *(.rodata) *(.rodata.*) *(.rodata1) } \
.rodata1 : { *(.rodata1) } \
.rodata : AT(ADDR(.rodata) - LOAD_OFFSET) { \
*(.rodata) *(.rodata.*) \
*(__vermagic) /* Kernel version magic */ \
} \
\
.kstrtab : { *(.kstrtab) } \
.rodata1 : AT(ADDR(.rodata1) - LOAD_OFFSET) { \
*(.rodata1) \
} \
\
/* Kernel version magic */ \
__vermagic : { *(__vermagic) } \
\
/* Kernel symbol table */ \
. = ALIGN(64); \
/* Kernel symbol table: Normal symbols */ \
__start___ksymtab = .; \
__ksymtab : { *(__ksymtab) } \
__ksymtab : AT(ADDR(__ksymtab) - LOAD_OFFSET) { \
*(__ksymtab) \
} \
__stop___ksymtab = .; \
\
/* Kernel symbol table: GPL-only symbols */ \
__start___gpl_ksymtab = .; \
__gpl_ksymtab : { *(__gpl_ksymtab) } \
__gpl_ksymtab : AT(ADDR(__gpl_ksymtab) - LOAD_OFFSET) { \
*(__gpl_ksymtab) \
} \
__stop___gpl_ksymtab = .; \
\
/* All kernel symbols */ \
__start___kallsyms = .; \
__kallsyms : { *(__kallsyms) } \
__stop___kallsyms = .;
/* Kernel symbol table: strings */ \
__ksymtab_strings : AT(ADDR(__ksymtab_strings) - LOAD_OFFSET) { \
*(__ksymtab_strings) \
}
......@@ -36,7 +36,7 @@
struct kernel_symbol
{
unsigned long value;
char name[MODULE_NAME_LEN];
const char *name;
};
/* These are either module local, or the kernel's dummy ones. */
......@@ -141,16 +141,22 @@ void *__symbol_get_gpl(const char *symbol);
/* For every exported symbol, place a struct in the __ksymtab section */
#define EXPORT_SYMBOL(sym) \
const struct kernel_symbol __ksymtab_##sym \
static const char __kstrtab_##sym[] \
__attribute__((section("__ksymtab_strings"))) \
= MODULE_SYMBOL_PREFIX #sym; \
static const struct kernel_symbol __ksymtab_##sym \
__attribute__((section("__ksymtab"))) \
= { (unsigned long)&sym, MODULE_SYMBOL_PREFIX #sym }
= { (unsigned long)&sym, __kstrtab_##sym }
#define EXPORT_SYMBOL_NOVERS(sym) EXPORT_SYMBOL(sym)
#define EXPORT_SYMBOL_GPL(sym) \
const struct kernel_symbol __ksymtab_##sym \
static const char __kstrtab_##sym[] \
__attribute__((section("__ksymtab_strings"))) \
= MODULE_SYMBOL_PREFIX #sym; \
static const struct kernel_symbol __ksymtab_##sym \
__attribute__((section("__gpl_ksymtab"))) \
= { (unsigned long)&sym, #sym }
= { (unsigned long)&sym, __kstrtab_##sym }
struct module_ref
{
......
......@@ -9,12 +9,10 @@
#include <linux/kallsyms.h>
#include <linux/module.h>
static char kallsyms_dummy;
/* 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_num_syms __attribute__((weak, alias("kallsyms_dummy")));
extern char kallsyms_names[1] __attribute__((weak, alias("kallsyms_dummy")));
extern unsigned long kallsyms_addresses[] __attribute__((weak));
extern unsigned long kallsyms_num_syms __attribute__((weak));
extern char kallsyms_names[] __attribute__((weak));
/* Defined by the linker script. */
extern char _stext[], _etext[];
......@@ -28,8 +26,7 @@ const char *kallsyms_lookup(unsigned long addr,
unsigned long i, best = 0;
/* This kernel should never had been booted. */
if ((void *)kallsyms_addresses == &kallsyms_dummy)
BUG();
BUG_ON(!kallsyms_addresses);
namebuf[127] = 0;
namebuf[0] = 0;
......
......@@ -144,7 +144,7 @@ write_src(void)
for (k = 0; table[i].sym[k] && table[i].sym[k] == prev[k]; ++k)
;
printf("\t.byte 0x%02x ; .asciz\t\"%s\"\n", k, table[i].sym + k);
printf("\t.byte 0x%02x\n\t.asciz\t\"%s\"\n", k, table[i].sym + k);
last_addr = table[i].addr;
prev = table[i].sym;
}
......
......@@ -6,7 +6,7 @@
IN_PER_CPU=0
}
/__per_cpu$$/ && ! / __ksymtab_/ {
/__per_cpu$$/ && ! ( / __ksymtab_/ || / __kstrtab_/ ) {
if (!IN_PER_CPU) {
print $$3 " not in per-cpu section" > "/dev/stderr";
FOUND=1;
......
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