Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fix
Browse files Browse the repository at this point in the history
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fix:
  sparc64: fix alignment bug in linker definition script
  • Loading branch information
Linus Torvalds committed May 31, 2007
2 parents 51d7cfc + 4096b46 commit 54ca412
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
11 changes: 6 additions & 5 deletions arch/sparc64/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* ld script to make UltraLinux kernel */

#include <asm/page.h>
#include <asm-generic/vmlinux.lds.h>

OUTPUT_FORMAT("elf64-sparc", "elf64-sparc", "elf64-sparc")
Expand All @@ -23,7 +24,7 @@ SECTIONS
_etext = .;
PROVIDE (etext = .);

RODATA
RO_DATA(PAGE_SIZE)

.data :
{
Expand All @@ -44,7 +45,7 @@ SECTIONS
__ex_table : { *(__ex_table) }
__stop___ex_table = .;

. = ALIGN(8192);
. = ALIGN(PAGE_SIZE);
__init_begin = .;
.init.text : {
_sinittext = .;
Expand Down Expand Up @@ -83,17 +84,17 @@ SECTIONS
__sun4v_2insn_patch_end = .;

#ifdef CONFIG_BLK_DEV_INITRD
. = ALIGN(8192);
. = ALIGN(PAGE_SIZE);
__initramfs_start = .;
.init.ramfs : { *(.init.ramfs) }
__initramfs_end = .;
#endif

. = ALIGN(8192);
. = ALIGN(PAGE_SIZE);
__per_cpu_start = .;
.data.percpu : { *(.data.percpu) }
__per_cpu_end = .;
. = ALIGN(8192);
. = ALIGN(PAGE_SIZE);
__init_end = .;
__bss_start = .;
.sbss : { *(.sbss) *(.scommon) }
Expand Down
10 changes: 7 additions & 3 deletions include/asm-generic/vmlinux.lds.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
*(.data) \
*(.data.init.refok)

#define RODATA \
. = ALIGN(4096); \
#define RO_DATA(align) \
. = ALIGN((align)); \
.rodata : AT(ADDR(.rodata) - LOAD_OFFSET) { \
VMLINUX_SYMBOL(__start_rodata) = .; \
*(.rodata) *(.rodata.*) \
Expand Down Expand Up @@ -135,7 +135,11 @@
VMLINUX_SYMBOL(__end_rodata) = .; \
} \
\
. = ALIGN(4096);
. = ALIGN((align));

/* RODATA provided for backward compatibility.
* All archs are supposed to use RO_DATA() */
#define RODATA RO_DATA(4096)

#define SECURITY_INIT \
.security_initcall.init : AT(ADDR(.security_initcall.init) - LOAD_OFFSET) { \
Expand Down

0 comments on commit 54ca412

Please sign in to comment.