linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc: Don't use ELFv2 ABI to build the kernel
@ 2013-11-18  6:21 Alistair Popple
  2013-11-18 19:29 ` Scott Wood
  2013-11-19  3:25 ` Michael Ellerman
  0 siblings, 2 replies; 5+ messages in thread
From: Alistair Popple @ 2013-11-18  6:21 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Alistair Popple

The kernel doesn't build correctly using the ELFv2 ABI.  This patch
ensures that the ELFv1 ABI is used when building a kernel with an
ELFv2 enabled compiler.

Signed-off-by: Alistair Popple <alistair@popple.id.au>
---
 arch/powerpc/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 607acf5..8a24636 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -111,6 +111,7 @@ endif
 endif
 
 CFLAGS-$(CONFIG_PPC64)	:= -mtraceback=no -mcall-aixdesc
+CFLAGS-$(CONFIG_PPC64)	+= $(call cc-option,-mabi=elfv1)
 CFLAGS-$(CONFIG_PPC64)	+= $(call cc-option,-mcmodel=medium,-mminimal-toc)
 CFLAGS-$(CONFIG_PPC64)	+= $(call cc-option,-mno-pointers-to-nested-functions)
 CFLAGS-$(CONFIG_PPC32)	:= -ffixed-r2 $(MULTIPLEWORD)
-- 
1.8.2.1

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

* Re: [PATCH] powerpc: Don't use ELFv2 ABI to build the kernel
  2013-11-18  6:21 [PATCH] powerpc: Don't use ELFv2 ABI to build the kernel Alistair Popple
@ 2013-11-18 19:29 ` Scott Wood
  2013-11-19  0:46   ` Alistair Popple
  2013-11-19  3:25 ` Michael Ellerman
  1 sibling, 1 reply; 5+ messages in thread
From: Scott Wood @ 2013-11-18 19:29 UTC (permalink / raw)
  To: Alistair Popple; +Cc: linuxppc-dev

On Mon, 2013-11-18 at 17:21 +1100, Alistair Popple wrote:
> The kernel doesn't build correctly using the ELFv2 ABI.  This patch
> ensures that the ELFv1 ABI is used when building a kernel with an
> ELFv2 enabled compiler.
> 
> Signed-off-by: Alistair Popple <alistair@popple.id.au>
> ---
>  arch/powerpc/Makefile | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
> index 607acf5..8a24636 100644
> --- a/arch/powerpc/Makefile
> +++ b/arch/powerpc/Makefile
> @@ -111,6 +111,7 @@ endif
>  endif
>  
>  CFLAGS-$(CONFIG_PPC64)	:= -mtraceback=no -mcall-aixdesc
> +CFLAGS-$(CONFIG_PPC64)	+= $(call cc-option,-mabi=elfv1)
>  CFLAGS-$(CONFIG_PPC64)	+= $(call cc-option,-mcmodel=medium,-mminimal-toc)
>  CFLAGS-$(CONFIG_PPC64)	+= $(call cc-option,-mno-pointers-to-nested-functions)
>  CFLAGS-$(CONFIG_PPC32)	:= -ffixed-r2 $(MULTIPLEWORD)

How hard would it be to get the kernel to work with the new ABI?

Do you know where I can find a document for it?

-Scott

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

* Re: [PATCH] powerpc: Don't use ELFv2 ABI to build the kernel
  2013-11-18 19:29 ` Scott Wood
@ 2013-11-19  0:46   ` Alistair Popple
  0 siblings, 0 replies; 5+ messages in thread
From: Alistair Popple @ 2013-11-19  0:46 UTC (permalink / raw)
  To: Scott Wood; +Cc: linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 733 bytes --]

On Mon, 18 Nov 2013 13:29:25 Scott Wood wrote:
> On Mon, 2013-11-18 at 17:21 +1100, Alistair Popple wrote:

[snip]

> 
> How hard would it be to get the kernel to work with the new ABI?

We are preparing patches at the moment to allow the kernel to support a 
userspace compiled with the new ABI, however the kernel itself still needs to 
be built using the old ABI.

I'm not sure how hard it would be to compile a kernel with the new ABI. It 
mostly compiles now however I'm guessing there's probably some code that would 
need porting to make it functional.

> Do you know where I can find a document for it?

The ABI is still under development so there isn't any documentation available 
for it yet.

> -Scott

Regards,

Alistair

[-- Attachment #2: Type: text/html, Size: 4307 bytes --]

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

* Re: [PATCH] powerpc: Don't use ELFv2 ABI to build the kernel
  2013-11-18  6:21 [PATCH] powerpc: Don't use ELFv2 ABI to build the kernel Alistair Popple
  2013-11-18 19:29 ` Scott Wood
@ 2013-11-19  3:25 ` Michael Ellerman
  2013-11-19  4:06   ` Alistair Popple
  1 sibling, 1 reply; 5+ messages in thread
From: Michael Ellerman @ 2013-11-19  3:25 UTC (permalink / raw)
  To: Alistair Popple; +Cc: linuxppc-dev

On Mon, Nov 18, 2013 at 05:21:34PM +1100, Alistair Popple wrote:
> The kernel doesn't build correctly using the ELFv2 ABI.  This patch
> ensures that the ELFv1 ABI is used when building a kernel with an
> ELFv2 enabled compiler.

Let me check I've got this straight.

The ELFv2 ABI is still being developed, so there are no released
toolchains that support it right?

So this patch is precautionary, in that it means kernels from this
commit onward will build correctly with newer toolchains. Anyone wanting
to build an older kernel with a new toolchain will need to backport this
patch?

cheers

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

* Re: [PATCH] powerpc: Don't use ELFv2 ABI to build the kernel
  2013-11-19  3:25 ` Michael Ellerman
@ 2013-11-19  4:06   ` Alistair Popple
  0 siblings, 0 replies; 5+ messages in thread
From: Alistair Popple @ 2013-11-19  4:06 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 979 bytes --]

On Tue, 19 Nov 2013 14:25:53 Michael Ellerman wrote:
> On Mon, Nov 18, 2013 at 05:21:34PM +1100, Alistair Popple wrote:
> > The kernel doesn't build correctly using the ELFv2 ABI.  This patch
> > ensures that the ELFv1 ABI is used when building a kernel with an
> > ELFv2 enabled compiler.
> 
> Let me check I've got this straight.
> 
> The ELFv2 ABI is still being developed, so there are no released
> toolchains that support it right?

I believe ELFv2 patches started going upstream to gcc last week.

> So this patch is precautionary, in that it means kernels from this
> commit onward will build correctly with newer toolchains. Anyone wanting
> to build an older kernel with a new toolchain will need to backport this
> patch?

No, only people wanting to build PPC64 little endian kernels with newer 
toolchains should need this (as ELFv2 is the default for PPC64LE). In all 
cases execpt PPC64LE the newer toolchains should default to ELFv1.

> cheers

Regards,

Alistair

[-- Attachment #2: Type: text/html, Size: 5114 bytes --]

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

end of thread, other threads:[~2013-11-19  4:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-18  6:21 [PATCH] powerpc: Don't use ELFv2 ABI to build the kernel Alistair Popple
2013-11-18 19:29 ` Scott Wood
2013-11-19  0:46   ` Alistair Popple
2013-11-19  3:25 ` Michael Ellerman
2013-11-19  4:06   ` Alistair Popple

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