Commit 75b662dc authored by Keith Owens's avatar Keith Owens Committed by David Mosberger

[PATCH] ia64: force all kernel sections into one and the same segment

Older versions of the linker do not handle cross-segment segment-relative
relocations properly.  This becomes a real problem when the linker decides
to put .text and .text.init into different segments (for whatever reasons)
because in that case, broken linkers will produce a broken unwind section,
which can cause nasty Heisenbugs, where, for example, unwinding may or may
not work depending on the exact value of the IP in a function.
parent 0dd60aa9
......@@ -12,6 +12,11 @@ OUTPUT_FORMAT("elf64-ia64-little")
OUTPUT_ARCH(ia64)
ENTRY(phys_start)
jiffies = jiffies_64;
PHDRS {
code PT_LOAD;
percpu PT_LOAD;
data PT_LOAD;
}
SECTIONS
{
/* Sections to be discarded */
......@@ -26,6 +31,7 @@ SECTIONS
v = PAGE_OFFSET; /* this symbol is here to make debugging easier... */
phys_start = _start - LOAD_OFFSET;
code : { } :code
. = KERNEL_START;
_text = .;
......@@ -173,6 +179,7 @@ SECTIONS
{ *(.data.cacheline_aligned) }
/* Per-cpu data: */
percpu : { } :percpu
. = ALIGN(PERCPU_PAGE_SIZE);
__phys_per_cpu_start = .;
.data.percpu PERCPU_ADDR : AT(__phys_per_cpu_start - LOAD_OFFSET)
......@@ -183,6 +190,7 @@ SECTIONS
}
. = __phys_per_cpu_start + PERCPU_PAGE_SIZE; /* ensure percpu data fits into percpu page size */
data : { } :data
.data : AT(ADDR(.data) - LOAD_OFFSET)
{ *(.data) *(.data1) *(.gnu.linkonce.d*) CONSTRUCTORS }
......@@ -205,6 +213,7 @@ SECTIONS
_end = .;
code : { } :code
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
......
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