On 19-Apr-12, at 4:26 AM, Guy Martin wrote:
Hi all,
I compiled a kernel with a few additional features and I was unable to
boot it. It seems that if the entry point is not 0x00100000 in
vmlinux,
the boot process fails right after "Total Memory: 2048 MB".
This is the only common denominator I could find.
I've been able to reproduce this with :
- C3600 and J5600
- kernel 3.2.12 and 3.3.1
- gcc 4.5.3
- ld 2.21 and 2.22
- palo 1.17 and 1.18
Could you try the attached patch? It adjusts the section arrangement so
that the long branch stubs don't appear at the start of .text. As a
result,
_stext and stext now are at 10100000.
The problem arises from section merging and a few branch distances
in the kernel exceeding the PA 2.0 limit.
The patch might not work if the long branch stubs don't work...
Another approach might be to add -mlong-calls to CFLAGS. However,
these calls are less efficient.
Dave
--
John David Anglin dave.anglin@xxxxxxxx
diff --git a/arch/parisc/kernel/vmlinux.lds.S b/arch/parisc/kernel/vmlinux.lds.S
index fa6f2b8..64a9998 100644
--- a/arch/parisc/kernel/vmlinux.lds.S
+++ b/arch/parisc/kernel/vmlinux.lds.S
@@ -50,8 +50,10 @@ SECTIONS
. = KERNEL_BINARY_TEXT_START;
_text = .; /* Text and read-only data */
- .text ALIGN(16) : {
+ .head ALIGN(16) : {
HEAD_TEXT
+ } = 0
+ .text ALIGN(16) : {
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
@@ -65,7 +67,7 @@ SECTIONS
*(.fixup)
*(.lock.text) /* out-of-line lock text */
*(.gnu.warning)
- } = 0
+ }
/* End of text section */
_etext = .;