From: jic23@cam.ac.uk (Jonathan Cameron)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] pxa: fix for UART reference in section text for a number of platforms.
Date: Mon, 08 Mar 2010 12:05:36 +0000 [thread overview]
Message-ID: <4B94E810.7050307@cam.ac.uk> (raw)
In-Reply-To: <f17812d71003080348k7ff5cd77lf5e1262ce1ccf14@mail.gmail.com>
> What's the background?
Directly, the following compile error in current mainline:
`UART' referenced in section `.text' of arch/arm/boot/compressed/misc.o: defined in discarded section `.data' of arch/arm/boot/compressed/misc.o
`UART' referenced in section `.text' of arch/arm/boot/compressed/misc.o: defined in discarded section `.data' of arch/arm/boot/compressed/misc.o
make[2]: *** [arch/arm/boot/compressed/vmlinux] Error 1
A result of (I think):
5de813b6cd06460b337f9da9afe316823cf3ef45
ARM: Eliminate decompressor -Dstatic= PIC hack
We used to build decompressors with -Dstatic= to avoid any local data
being generated. The problem is that local data generates GOTOFF
relocations, which means we can't relocate the data relative to the
text segment.
Global data, on the other hand, goes through the GOT, and can be
relocated anywhere.
Unfortunately, with the new decompressors, this presents a problem
since they declare static data within functions, and this leads to
stack overflow.
Fix this by separating out the decompressor code into a separate file,
and removing 'static' from BSS data in misc.c.
Also, discard the .data section - this means that should we end up
with read/write initialized data, the decompressor will fail to link
and the problem will be obvious.
> 2010/3/8 Jonathan Cameron <jic23@cam.ac.uk>:
>> Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
>>
>> ---
>> Fix exactly as proposed by Russell King. Thanks!
>>
>> arch/arm/mach-pxa/include/mach/uncompress.h | 4 +++-
>> 1 files changed, 3 insertions(+), 1 deletions(-)
>>
>> diff --git a/arch/arm/mach-pxa/include/mach/uncompress.h b/arch/arm/mach-pxa/include/mach/uncompress.h
>> index 237734b..b009299 100644
>> --- a/arch/arm/mach-pxa/include/mach/uncompress.h
>> +++ b/arch/arm/mach-pxa/include/mach/uncompress.h
>> @@ -15,7 +15,7 @@
>>
>> #define __REG(x) ((volatile unsigned long *)x)
>>
>> -static volatile unsigned long *UART = FFUART;
>> +static volatile unsigned long *UART;
>>
>> static inline void putc(char c)
>> {
>> @@ -39,6 +39,8 @@ static inline void arch_decomp_setup(void)
>> || machine_is_csb726() || machine_is_stargate2()
>> || machine_is_cm_x300() || machine_is_balloon3())
>> UART = STUART;
>> + else
>> + UART = FFUART;
>> }
>>
>> /*
>> --
>> 1.6.4.4
>>
>>
>
next prev parent reply other threads:[~2010-03-08 12:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-08 11:15 [PATCH] pxa: fix for UART reference in section text for a number of platforms Jonathan Cameron
2010-03-08 11:48 ` Eric Miao
2010-03-08 12:05 ` Jonathan Cameron [this message]
2010-03-08 12:10 ` Eric Miao
2010-03-08 17:44 ` Jonathan Cameron
2010-03-15 12:43 ` Eric Miao
2010-03-15 13:04 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B94E810.7050307@cam.ac.uk \
--to=jic23@cam.ac.uk \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox