Commit 8db9d338 authored by Kai Germaschewski's avatar Kai Germaschewski Committed by Linus Torvalds

kbuild: Make asm-generic/vmlinux.lds.h usable for IA-64

  Allow for different LMA vs VMA (logical/virtual memory address).
  IA-64 uses the LMA to tell the bootloader the physical location
  of the image, whereas the VMA as always represents the address the
  image gets mapped to.
  
  The default (used for non IA-64) is LMA == VMA, which is what
  the linker previously assumed anyway.
  
Also:
o remove duplicate .rodata1 section
o __vermagic doesn't need its own section in vmlinux, it can
  just go into .rodata
o .kstrtab hasn't been used since the introduction of the new
  module loader, so it should be deleted from the linker scripts
  as well (except for arch/um, which does not seem up to date
  w.r.t the new module loader yet)
o The kallsyms mechanism has changed to not need its own section,
  so again the references in the linker scripts can go away
parent 7bf6b27c
......@@ -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) }
......
#define RODATA \
.rodata : { *(.rodata) *(.rodata.*) *(.rodata1) } \
.rodata1 : { *(.rodata1) } \
\
.kstrtab : { *(.kstrtab) } \
\
/* Kernel version magic */ \
__vermagic : { *(__vermagic) } \
\
/* Kernel symbol table */ \
__start___ksymtab = .; \
__ksymtab : { *(__ksymtab) } \
__stop___ksymtab = .; \
\
/* Kernel symbol table: GPL-only symbols */ \
__start___gpl_ksymtab = .; \
__gpl_ksymtab : { *(__gpl_ksymtab) } \
__stop___gpl_ksymtab = .; \
\
/* Kernel symbol table: strings */ \
__ksymtab_strings : { *(__ksymtab_strings) } \
\
/* All kernel symbols */ \
__start___kallsyms = .; \
__kallsyms : { *(__kallsyms) } \
__stop___kallsyms = .;
#ifndef LOAD_OFFSET
#define LOAD_OFFSET 0
#endif
#define RODATA \
.rodata : AT(ADDR(.rodata) - LOAD_OFFSET) { \
*(.rodata) *(.rodata.*) \
*(__vermagic) /* Kernel version magic */ \
} \
\
.rodata1 : AT(ADDR(.rodata1) - LOAD_OFFSET) { \
*(.rodata1) \
} \
\
/* Kernel symbol table: Normal symbols */ \
__start___ksymtab = .; \
__ksymtab : AT(ADDR(__ksymtab) - LOAD_OFFSET) { \
*(__ksymtab) \
} \
__stop___ksymtab = .; \
\
/* Kernel symbol table: GPL-only symbols */ \
__start___gpl_ksymtab = .; \
__gpl_ksymtab : AT(ADDR(__gpl_ksymtab) - LOAD_OFFSET) { \
*(__gpl_ksymtab) \
} \
__stop___gpl_ksymtab = .; \
\
/* Kernel symbol table: strings */ \
__ksymtab_strings : AT(ADDR(__ksymtab_strings) - LOAD_OFFSET) { \
*(__ksymtab_strings) \
}
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