All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2.6.34-rc2] sh: Fix FDPIC binary loader
@ 2010-03-26  9:55 Andrew Stubbs
  2010-03-29  3:15 ` Paul Mundt
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Andrew Stubbs @ 2010-03-26  9:55 UTC (permalink / raw)
  To: linux-sh

Ensure that the aux table is properly initialized, even when optional 
features are missing. Without this, the FDPIC loader did not work.

Signed-off-by: Andrew Stubbs <ams@codesourcery.com>
---


diff --git a/arch/sh/include/asm/elf.h b/arch/sh/include/asm/elf.h
index ac04255..b2fefb3 100644
--- a/arch/sh/include/asm/elf.h
+++ b/arch/sh/include/asm/elf.h
@@ -211,15 +211,17 @@ extern void __kernel_vsyscall;

  #define VSYSCALL_AUX_ENT                                       \
         if (vdso_enabled)                                       \
-               NEW_AUX_ENT(AT_SYSINFO_EHDR, VDSO_BASE);
+               NEW_AUX_ENT(AT_SYSINFO_EHDR, VDSO_BASE);        \
+       else                                                    \
+               NEW_AUX_ENT(AT_IGNORE, 0); /* Match AT_VECTOR_SIZE_ARCH.  */
  #else
-#define VSYSCALL_AUX_ENT
+#define VSYSCALL_AUX_ENT NEW_AUX_ENT(AT_IGNORE, 0);
  #endif /* CONFIG_VSYSCALL */

  #ifdef CONFIG_SH_FPU
  #define FPU_AUX_ENT    NEW_AUX_ENT(AT_FPUCW, FPSCR_INIT)
  #else
-#define FPU_AUX_ENT
+#define FPU_AUX_ENT    NEW_AUX_ENT(AT_IGNORE, 0);
  #endif

  extern int l1i_cache_shape, l1d_cache_shape, l2_cache_shape;

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

* Re: [PATCH 2.6.34-rc2] sh: Fix FDPIC binary loader
  2010-03-26  9:55 [PATCH 2.6.34-rc2] sh: Fix FDPIC binary loader Andrew Stubbs
@ 2010-03-29  3:15 ` Paul Mundt
  2010-03-29  8:23 ` Andrew Stubbs
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Paul Mundt @ 2010-03-29  3:15 UTC (permalink / raw)
  To: linux-sh

On Fri, Mar 26, 2010 at 09:55:38AM +0000, Andrew Stubbs wrote:
> Ensure that the aux table is properly initialized, even when optional 
> features are missing. Without this, the FDPIC loader did not work.
> 
> Signed-off-by: Andrew Stubbs <ams@codesourcery.com>

This was whitespace damaged and didn't apply, so I did it by hand. Please
double check your mailer settings for future patches, thanks.

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

* Re: [PATCH 2.6.34-rc2] sh: Fix FDPIC binary loader
  2010-03-26  9:55 [PATCH 2.6.34-rc2] sh: Fix FDPIC binary loader Andrew Stubbs
  2010-03-29  3:15 ` Paul Mundt
@ 2010-03-29  8:23 ` Andrew Stubbs
  2012-11-16 10:07 ` Thomas Schwinge
  2012-11-19  2:22 ` Paul Mundt
  3 siblings, 0 replies; 5+ messages in thread
From: Andrew Stubbs @ 2010-03-29  8:23 UTC (permalink / raw)
  To: linux-sh

On 29/03/10 04:15, Paul Mundt wrote:
> On Fri, Mar 26, 2010 at 09:55:38AM +0000, Andrew Stubbs wrote:
>> Ensure that the aux table is properly initialized, even when optional
>> features are missing. Without this, the FDPIC loader did not work.
>>
>> Signed-off-by: Andrew Stubbs<ams@codesourcery.com>
>
> This was whitespace damaged and didn't apply, so I did it by hand. Please
> double check your mailer settings for future patches, thanks.

Apologies for the mistake.

Thanks for taking the patch.

Andrew

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

* Re: [PATCH 2.6.34-rc2] sh: Fix FDPIC binary loader
  2010-03-26  9:55 [PATCH 2.6.34-rc2] sh: Fix FDPIC binary loader Andrew Stubbs
  2010-03-29  3:15 ` Paul Mundt
  2010-03-29  8:23 ` Andrew Stubbs
@ 2012-11-16 10:07 ` Thomas Schwinge
  2012-11-19  2:22 ` Paul Mundt
  3 siblings, 0 replies; 5+ messages in thread
From: Thomas Schwinge @ 2012-11-16 10:07 UTC (permalink / raw)
  To: linux-sh


[-- Attachment #1.1: Type: text/plain, Size: 1071 bytes --]

Hi!

On Mon, 29 Mar 2010 12:15:23 +0900, Paul Mundt <lethal@linux-sh.org> wrote:
> On Fri, Mar 26, 2010 at 09:55:38AM +0000, Andrew Stubbs wrote:
> > Ensure that the aux table is properly initialized, even when optional 
> > features are missing. Without this, the FDPIC loader did not work.

Andrew's patch became commit d5ab780305bb6d60a7b5a74f18cf84eb6ad153b1.

> This was whitespace damaged and didn't apply, so I did it by hand.

Unfortunately, in Paul's manual application, one part of the patch was
lost, and that happened to be the functional part.  I'm attaching a patch
to address that.  The patch is for 3.5.2, but likewise applies to the
current master branch.


If you add that patch to, for example, »SH7269 Linux BSP«,
<https://oss.renesas.com/modules/download/index.php?cid=80&lid=231>, you
can re-enable dynamic linking, and can remove the following note from its
readme.txt:

| 1. The toolchain used can only be used with static builds. Do not use this with
|    dynamically loaded shared libraries.


Grüße,
 Thomas



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-sh-Fix-FDPIC-binary-loader.patch --]
[-- Type: text/x-diff, Size: 1119 bytes --]

From 23dc6096a678259662224de60470fababed35d2d Mon Sep 17 00:00:00 2001
From: Thomas Schwinge <thomas@codesourcery.com>
Date: Fri, 16 Nov 2012 10:46:20 +0100
Subject: [PATCH] sh: Fix FDPIC binary loader

Ensure that the aux table is properly initialized, even when optional features
are missing.  Without this, the FDPIC loader did not work.  This was meant to
be included in commit d5ab780305bb6d60a7b5a74f18cf84eb6ad153b1.

Signed-off-by: Thomas Schwinge <thomas@codesourcery.com>
---
 arch/sh/include/asm/elf.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/sh/include/asm/elf.h b/arch/sh/include/asm/elf.h
index f38112b..978b7fd 100644
--- a/arch/sh/include/asm/elf.h
+++ b/arch/sh/include/asm/elf.h
@@ -202,9 +202,9 @@ extern void __kernel_vsyscall;
 	if (vdso_enabled)					\
 		NEW_AUX_ENT(AT_SYSINFO_EHDR, VDSO_BASE);	\
 	else							\
-		NEW_AUX_ENT(AT_IGNORE, 0);
+		NEW_AUX_ENT(AT_IGNORE, 0)
 #else
-#define VSYSCALL_AUX_ENT
+#define VSYSCALL_AUX_ENT	NEW_AUX_ENT(AT_IGNORE, 0)
 #endif /* CONFIG_VSYSCALL */
 
 #ifdef CONFIG_SH_FPU
-- 
1.7.4.1


[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]

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

* Re: [PATCH 2.6.34-rc2] sh: Fix FDPIC binary loader
  2010-03-26  9:55 [PATCH 2.6.34-rc2] sh: Fix FDPIC binary loader Andrew Stubbs
                   ` (2 preceding siblings ...)
  2012-11-16 10:07 ` Thomas Schwinge
@ 2012-11-19  2:22 ` Paul Mundt
  3 siblings, 0 replies; 5+ messages in thread
From: Paul Mundt @ 2012-11-19  2:22 UTC (permalink / raw)
  To: linux-sh

On Fri, Nov 16, 2012 at 11:07:43AM +0100, Thomas Schwinge wrote:
> On Mon, 29 Mar 2010 12:15:23 +0900, Paul Mundt <lethal@linux-sh.org> wrote:
> > On Fri, Mar 26, 2010 at 09:55:38AM +0000, Andrew Stubbs wrote:
> > > Ensure that the aux table is properly initialized, even when optional 
> > > features are missing. Without this, the FDPIC loader did not work.
> 
> Andrew's patch became commit d5ab780305bb6d60a7b5a74f18cf84eb6ad153b1.
> 
> > This was whitespace damaged and didn't apply, so I did it by hand.
> 
> Unfortunately, in Paul's manual application, one part of the patch was
> lost, and that happened to be the functional part.  I'm attaching a patch
> to address that.  The patch is for 3.5.2, but likewise applies to the
> current master branch.
> 
Good catch, thanks. I'll queue it up and make sure it finds its way back
in to -stable, too.

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

end of thread, other threads:[~2012-11-19  2:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-26  9:55 [PATCH 2.6.34-rc2] sh: Fix FDPIC binary loader Andrew Stubbs
2010-03-29  3:15 ` Paul Mundt
2010-03-29  8:23 ` Andrew Stubbs
2012-11-16 10:07 ` Thomas Schwinge
2012-11-19  2:22 ` Paul Mundt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.