linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: broonie@opensource.wolfsonmicro.com (Mark Brown)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: Fix Samsung build after "ARM: Eliminate decompressor -Dstatic= PIC hack"
Date: Wed, 10 Mar 2010 18:08:43 +0000	[thread overview]
Message-ID: <1268244523-17668-1-git-send-email-broonie@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <20100310175611.GA5403@rakim.wolfsonmicro.main>

Commit 5de813b6 (ARM: Eliminate decompressor -Dstatic= PIC hack) among
other things changed the declared type of the error() function to an
extern, conflicting with the forward declartion in the Samsung
plat/uncompress.h which appears to have been relying on the static
being defined away, causing build failures since error() ends up with
a GOT relocation but the linker script discards all GOT relocated
data and functions:

arch/arm/boot/compressed/decompress.o: In function `gunzip':
/home/broonie/git/linux-2.6/arch/arm/boot/compressed/../../../../lib/decompress_
+inflate.c:68: undefined reference to `error'

and so on. Fix this by moving the declaration into uncompress/misc.c
where it is shared with the rest of the code, correcting the definition
as we go.
---

OK, that seemed to be a lot easier than I'd been expecting - I'd been
looking for a header file to place this in when I originally ran into
this.

 arch/arm/boot/compressed/misc.c             |    1 +
 arch/arm/plat-s3c/include/plat/uncompress.h |    2 --
 2 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c
index d32bc71..d2b2ef4 100644
--- a/arch/arm/boot/compressed/misc.c
+++ b/arch/arm/boot/compressed/misc.c
@@ -33,6 +33,7 @@ unsigned int __machine_arch_type;
 #else
 
 static void putstr(const char *ptr);
+extern void error(char *x);
 
 #include <mach/uncompress.h>
 
diff --git a/arch/arm/plat-s3c/include/plat/uncompress.h b/arch/arm/plat-s3c/include/plat/uncompress.h
index dc66a47..975eec9 100644
--- a/arch/arm/plat-s3c/include/plat/uncompress.h
+++ b/arch/arm/plat-s3c/include/plat/uncompress.h
@@ -140,8 +140,6 @@ static void arch_decomp_error(const char *x)
 #define arch_error arch_decomp_error
 #endif
 
-static void error(char *err);
-
 #ifdef CONFIG_S3C_BOOT_UART_FORCE_FIFO
 static inline void arch_enable_uart_fifo(void)
 {
-- 
1.7.0

      parent reply	other threads:[~2010-03-10 18:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-01 18:52 [PATCH 2.6.34] ARM: SAMSUNG: Fix build after "ARM: Eliminate decompressor -Dstatic= PIC hack" Mark Brown
2010-03-02  8:25 ` Uwe Kleine-König
2010-03-10 17:17 ` Mark Brown
2010-03-10 17:25   ` Russell King - ARM Linux
2010-03-10 17:42     ` Mark Brown
2010-03-10 17:46       ` Russell King - ARM Linux
2010-03-10 17:56         ` Mark Brown
2010-03-10 18:01           ` Russell King - ARM Linux
2010-03-10 18:16             ` Mark Brown
2010-03-10 18:08           ` Mark Brown [this message]

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=1268244523-17668-1-git-send-email-broonie@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --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;
as well as URLs for NNTP newsgroup(s).