summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Wilcox <willy@parisc-linux.org>2005-03-11 17:15:57 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-03-11 17:15:57 -0800
commite18898f00a7d8431e812b5ac44c8487cca106341 (patch)
tree887f1b919679faae2297208cc72c805c7fae42b7
parent961d603a84347207a234f6eb389b30c2abd7a3f8 (diff)
[PATCH] PA-RISC GCC-3.4 build fix
fix problem with building 64-bit kernels with gcc-3.4 Signed-off-by: Randolph Chung <tausq@parisc-linux.org> Signed-off-by: Matthew Wilcox <willy@parisc-linux.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--arch/parisc/kernel/init_task.c12
-rw-r--r--arch/parisc/kernel/vmlinux.lds.S3
2 files changed, 11 insertions, 4 deletions
diff --git a/arch/parisc/kernel/init_task.c b/arch/parisc/kernel/init_task.c
index c71b9462beda..7e898fd64415 100644
--- a/arch/parisc/kernel/init_task.c
+++ b/arch/parisc/kernel/init_task.c
@@ -55,11 +55,15 @@ union thread_union init_thread_union
#ifdef __LP64__
/* NOTE: This layout exactly conforms to the hybrid L2/L3 page table layout
- * with the first pmd adjacent to the pgd and below it */
-pmd_t pmd0[PTRS_PER_PMD] __attribute__ ((aligned(PAGE_SIZE))) = { {0}, };
+ * with the first pmd adjacent to the pgd and below it. gcc doesn't actually
+ * guarantee that global objects will be laid out in memory in the same order
+ * as the order of declaration, so put these in different sections and use
+ * the linker script to order them. */
+pmd_t pmd0[PTRS_PER_PMD] __attribute__ ((aligned(PAGE_SIZE))) __attribute__ ((__section__ (".data.vm0.pmd"))) = { {0}, };
+
#endif
-pgd_t swapper_pg_dir[PTRS_PER_PGD] __attribute__ ((aligned(PAGE_SIZE))) = { {0}, };
-pte_t pg0[PT_INITIAL * PTRS_PER_PTE] __attribute__ ((aligned(PAGE_SIZE))) = { {0}, };
+pgd_t swapper_pg_dir[PTRS_PER_PGD] __attribute__ ((aligned(PAGE_SIZE))) __attribute__ ((__section__ (".data.vm0.pgd"))) = { {0}, };
+pte_t pg0[PT_INITIAL * PTRS_PER_PTE] __attribute__ ((aligned(PAGE_SIZE))) __attribute__ ((__section__ (".data.vm0.pte"))) = { {0}, };
/*
* Initial task structure.
diff --git a/arch/parisc/kernel/vmlinux.lds.S b/arch/parisc/kernel/vmlinux.lds.S
index 597801a2e85a..e5fac3e08c7a 100644
--- a/arch/parisc/kernel/vmlinux.lds.S
+++ b/arch/parisc/kernel/vmlinux.lds.S
@@ -84,6 +84,9 @@ SECTIONS
.data : { /* Data */
*(.data)
+ *(.data.vm0.pmd)
+ *(.data.vm0.pgd)
+ *(.data.vm0.pte)
CONSTRUCTORS
}