diff options
| author | Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de> | 2003-01-15 22:02:51 -0600 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2003-01-15 22:02:51 -0600 |
| commit | 8db9d33855cf2b0bb18699c44aa66b172d158b7a (patch) | |
| tree | b887c90cd281d973a1e96ef4792af03942e141ac /include | |
| parent | 7bf6b27cdd85617388c6d104427031ccc561206d (diff) | |
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
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-generic/vmlinux.lds.h | 59 |
1 files changed, 33 insertions, 26 deletions
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index ef0e28700cd1..3d97aae1c3e6 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -1,26 +1,33 @@ -#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) \ + } + |
