linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.6.34] ARM: SAMSUNG: Fix build after "ARM: Eliminate decompressor -Dstatic= PIC hack"
@ 2010-03-01 18:52 Mark Brown
  2010-03-02  8:25 ` Uwe Kleine-König
  2010-03-10 17:17 ` Mark Brown
  0 siblings, 2 replies; 10+ messages in thread
From: Mark Brown @ 2010-03-01 18:52 UTC (permalink / raw)
  To: linux-arm-kernel

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 with minimal invasiveness by fixing the
plat/uncompress.h declaration.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 arch/arm/plat-samsung/include/plat/uncompress.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-samsung/include/plat/uncompress.h b/arch/arm/plat-samsung/include/plat/uncompress.h
index e87ce8f..e41e6d2 100644
--- a/arch/arm/plat-samsung/include/plat/uncompress.h
+++ b/arch/arm/plat-samsung/include/plat/uncompress.h
@@ -140,7 +140,7 @@ static void arch_decomp_error(const char *x)
 #define arch_error arch_decomp_error
 #endif
 
-static void error(char *err);
+extern void error(char *err);
 
 #ifdef CONFIG_S3C_BOOT_UART_FORCE_FIFO
 static inline void arch_enable_uart_fifo(void)
-- 
1.7.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2.6.34] ARM: SAMSUNG: Fix build after "ARM: Eliminate decompressor -Dstatic= PIC hack"
  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
  1 sibling, 0 replies; 10+ messages in thread
From: Uwe Kleine-König @ 2010-03-02  8:25 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Mar 01, 2010 at 06:52:22PM +0000, Mark Brown wrote:
> 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
declaration --------------------------------^

> 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 with minimal invasiveness by fixing the
> plat/uncompress.h declaration.
> 
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
>  arch/arm/plat-samsung/include/plat/uncompress.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/plat-samsung/include/plat/uncompress.h b/arch/arm/plat-samsung/include/plat/uncompress.h
> index e87ce8f..e41e6d2 100644
> --- a/arch/arm/plat-samsung/include/plat/uncompress.h
> +++ b/arch/arm/plat-samsung/include/plat/uncompress.h
> @@ -140,7 +140,7 @@ static void arch_decomp_error(const char *x)
>  #define arch_error arch_decomp_error
>  #endif
>  
> -static void error(char *err);
> +extern void error(char *err);
>  
>  #ifdef CONFIG_S3C_BOOT_UART_FORCE_FIFO
>  static inline void arch_enable_uart_fifo(void)
> -- 
> 1.7.0
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 2.6.34] ARM: SAMSUNG: Fix build after "ARM: Eliminate decompressor -Dstatic= PIC hack"
  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
  1 sibling, 1 reply; 10+ messages in thread
From: Mark Brown @ 2010-03-10 17:17 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Mar 01, 2010 at 06:52:22PM +0000, Mark Brown wrote:
> 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:

This is now required in mainline (2.6.34-rc1 fails to build) - given the
severity and lack of response I'm just going to go ahead and send it to
the patch tracker, hope that's OK.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 2.6.34] ARM: SAMSUNG: Fix build after "ARM: Eliminate decompressor -Dstatic= PIC hack"
  2010-03-10 17:17 ` Mark Brown
@ 2010-03-10 17:25   ` Russell King - ARM Linux
  2010-03-10 17:42     ` Mark Brown
  0 siblings, 1 reply; 10+ messages in thread
From: Russell King - ARM Linux @ 2010-03-10 17:25 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Mar 10, 2010 at 05:17:37PM +0000, Mark Brown wrote:
> On Mon, Mar 01, 2010 at 06:52:22PM +0000, Mark Brown wrote:
> > 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:
> 
> This is now required in mainline (2.6.34-rc1 fails to build) - given the
> severity and lack of response I'm just going to go ahead and send it to
> the patch tracker, hope that's OK.

Why is error() being declared in this header file?

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 2.6.34] ARM: SAMSUNG: Fix build after "ARM: Eliminate decompressor -Dstatic= PIC hack"
  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
  0 siblings, 1 reply; 10+ messages in thread
From: Mark Brown @ 2010-03-10 17:42 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Mar 10, 2010 at 05:25:03PM +0000, Russell King - ARM Linux wrote:
> On Wed, Mar 10, 2010 at 05:17:37PM +0000, Mark Brown wrote:

> > This is now required in mainline (2.6.34-rc1 fails to build) - given the
> > severity and lack of response I'm just going to go ahead and send it to
> > the patch tracker, hope that's OK.

> Why is error() being declared in this header file?

IIRC (it's a little while since I grovelled through) it's being used by
some of the S3C specific code for error reporting as well and the
declaration/definition from the generic code wasn't visible at the
point that code was built.  Clearly not having this second, platform
specific declaration would be a better approach but due to the urgency
and closeness to release I went with a minimally invasive one line edit
in order to reduce the risk of possible side effects.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 2.6.34] ARM: SAMSUNG: Fix build after "ARM: Eliminate decompressor -Dstatic= PIC hack"
  2010-03-10 17:42     ` Mark Brown
@ 2010-03-10 17:46       ` Russell King - ARM Linux
  2010-03-10 17:56         ` Mark Brown
  0 siblings, 1 reply; 10+ messages in thread
From: Russell King - ARM Linux @ 2010-03-10 17:46 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Mar 10, 2010 at 05:42:28PM +0000, Mark Brown wrote:
> On Wed, Mar 10, 2010 at 05:25:03PM +0000, Russell King - ARM Linux wrote:
> > On Wed, Mar 10, 2010 at 05:17:37PM +0000, Mark Brown wrote:
> 
> > > This is now required in mainline (2.6.34-rc1 fails to build) - given the
> > > severity and lack of response I'm just going to go ahead and send it to
> > > the patch tracker, hope that's OK.
> 
> > Why is error() being declared in this header file?
> 
> IIRC (it's a little while since I grovelled through) it's being used by
> some of the S3C specific code for error reporting as well and the
> declaration/definition from the generic code wasn't visible at the
> point that code was built.  Clearly not having this second, platform
> specific declaration would be a better approach but due to the urgency
> and closeness to release I went with a minimally invasive one line edit
> in order to reduce the risk of possible side effects.

Let's do the job properly this time then and put a declaration in
compressed/misc.c

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 2.6.34] ARM: SAMSUNG: Fix build after "ARM: Eliminate decompressor -Dstatic= PIC hack"
  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:08           ` [PATCH] ARM: Fix Samsung " Mark Brown
  0 siblings, 2 replies; 10+ messages in thread
From: Mark Brown @ 2010-03-10 17:56 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Mar 10, 2010 at 05:46:50PM +0000, Russell King - ARM Linux wrote:

> Let's do the job properly this time then and put a declaration in
> compressed/misc.c

I agree that that's best, I guess I'll try to take a look.  I'd be much
more comfortable doing that in .35 than .34, though.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 2.6.34] ARM: SAMSUNG: Fix build after "ARM: Eliminate decompressor -Dstatic= PIC hack"
  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           ` [PATCH] ARM: Fix Samsung " Mark Brown
  1 sibling, 1 reply; 10+ messages in thread
From: Russell King - ARM Linux @ 2010-03-10 18:01 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Mar 10, 2010 at 05:56:11PM +0000, Mark Brown wrote:
> On Wed, Mar 10, 2010 at 05:46:50PM +0000, Russell King - ARM Linux wrote:
> 
> > Let's do the job properly this time then and put a declaration in
> > compressed/misc.c
> 
> I agree that that's best, I guess I'll try to take a look.  I'd be much
> more comfortable doing that in .35 than .34, though.

Since this isn't even in for .34 yet, that isn't a concern.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH] ARM: Fix Samsung build after "ARM: Eliminate decompressor -Dstatic= PIC hack"
  2010-03-10 17:56         ` Mark Brown
  2010-03-10 18:01           ` Russell King - ARM Linux
@ 2010-03-10 18:08           ` Mark Brown
  1 sibling, 0 replies; 10+ messages in thread
From: Mark Brown @ 2010-03-10 18:08 UTC (permalink / raw)
  To: linux-arm-kernel

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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2.6.34] ARM: SAMSUNG: Fix build after "ARM: Eliminate decompressor -Dstatic= PIC hack"
  2010-03-10 18:01           ` Russell King - ARM Linux
@ 2010-03-10 18:16             ` Mark Brown
  0 siblings, 0 replies; 10+ messages in thread
From: Mark Brown @ 2010-03-10 18:16 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Mar 10, 2010 at 06:01:28PM +0000, Russell King - ARM Linux wrote:
> On Wed, Mar 10, 2010 at 05:56:11PM +0000, Mark Brown wrote:

> > I agree that that's best, I guess I'll try to take a look.  I'd be much
> > more comfortable doing that in .35 than .34, though.

> Since this isn't even in for .34 yet, that isn't a concern.

Oh, I think I'm missing something here or we're talking at cross
purposes.  The generic change is in Linus' tree since ac0f6f92 and I'm
seeing build failures with -rc1.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-03-10 18:16 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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           ` [PATCH] ARM: Fix Samsung " Mark Brown

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).