* [PATCH] powerpc: vmlinux.lds: Drop Binutils 2.18 workarounds
@ 2019-03-21 0:32 Joel Stanley
2019-03-21 23:34 ` Segher Boessenkool
2019-03-26 0:55 ` Michael Ellerman
0 siblings, 2 replies; 18+ messages in thread
From: Joel Stanley @ 2019-03-21 0:32 UTC (permalink / raw)
To: linuxppc-dev
Segher added some workarounds for GCC 4.2 and bintuils 2.18. We now set
4.6 and 2.20 as the minimum, so they can be dropped.
This is mostly a revert of c69cccc95fe4 ("powerpc: Fix build bug with
binutils < 2.18 and GCC < 4.2").
Signed-off-by: Joel Stanley <joel@jms.id.au>
---
arch/powerpc/kernel/vmlinux.lds.S | 35 ++++---------------------------
1 file changed, 4 insertions(+), 31 deletions(-)
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
index 060a1acd7c6d..0551e9846676 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -17,25 +17,6 @@
ENTRY(_stext)
-PHDRS {
- kernel PT_LOAD FLAGS(7); /* RWX */
- notes PT_NOTE FLAGS(0);
- dummy PT_NOTE FLAGS(0);
-
- /* binutils < 2.18 has a bug that makes it misbehave when taking an
- ELF file with all segments at load address 0 as input. This
- happens when running "strip" on vmlinux, because of the AT() magic
- in this linker script. People using GCC >= 4.2 won't run into
- this problem, because the "build-id" support will put some data
- into the "notes" segment (at a non-zero load address).
-
- To work around this, we force some data into both the "dummy"
- segment and the kernel segment, so the dummy segment will get a
- non-zero load address. It's not enough to always create the
- "notes" segment, since if nothing gets assigned to it, its load
- address will be zero. */
-}
-
#ifdef CONFIG_PPC64
OUTPUT_ARCH(powerpc:common64)
jiffies = jiffies_64;
@@ -77,7 +58,7 @@ SECTIONS
#else /* !CONFIG_PPC64 */
HEAD_TEXT
#endif
- } :kernel
+ }
__head_end = .;
@@ -126,7 +107,7 @@ SECTIONS
__got2_end = .;
#endif /* CONFIG_PPC32 */
- } :kernel
+ }
. = ALIGN(ETEXT_ALIGN_SIZE);
_etext = .;
@@ -177,15 +158,7 @@ SECTIONS
#endif
EXCEPTION_TABLE(0)
- NOTES :kernel :notes
-
- /* The dummy segment contents for the bug workaround mentioned above
- near PHDRS. */
- .dummy : AT(ADDR(.dummy) - LOAD_OFFSET) {
- LONG(0)
- LONG(0)
- LONG(0)
- } :kernel :dummy
+ NOTES
/*
* Init sections discarded at runtime
@@ -200,7 +173,7 @@ SECTIONS
#ifdef CONFIG_PPC64
*(.tramp.ftrace.init);
#endif
- } :kernel
+ }
/* .exit.text is discarded at runtime, not link time,
* to deal with references from __bug_table
--
2.20.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH] powerpc: vmlinux.lds: Drop Binutils 2.18 workarounds
2019-03-21 0:32 [PATCH] powerpc: vmlinux.lds: Drop Binutils 2.18 workarounds Joel Stanley
@ 2019-03-21 23:34 ` Segher Boessenkool
2019-03-22 0:22 ` Michael Ellerman
2019-03-26 0:55 ` Michael Ellerman
1 sibling, 1 reply; 18+ messages in thread
From: Segher Boessenkool @ 2019-03-21 23:34 UTC (permalink / raw)
To: Joel Stanley; +Cc: linuxppc-dev
On Thu, Mar 21, 2019 at 11:02:53AM +1030, Joel Stanley wrote:
> Segher added some workarounds for GCC 4.2 and bintuils 2.18. We now set
> 4.6 and 2.20 as the minimum, so they can be dropped.
It was a bug in binutils _before_ 2.18, only seen by people using GCC
_before_ 4.2.
It's all ancient history by now, and good riddance :-)
> Signed-off-by: Joel Stanley <joel@jms.id.au>
Acked-by: Segher Boessenkool <segher@kernel.crashing.org>
Segher
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] powerpc: vmlinux.lds: Drop Binutils 2.18 workarounds
2019-03-21 23:34 ` Segher Boessenkool
@ 2019-03-22 0:22 ` Michael Ellerman
0 siblings, 0 replies; 18+ messages in thread
From: Michael Ellerman @ 2019-03-22 0:22 UTC (permalink / raw)
To: Segher Boessenkool, Joel Stanley; +Cc: linuxppc-dev
Segher Boessenkool <segher@kernel.crashing.org> writes:
> On Thu, Mar 21, 2019 at 11:02:53AM +1030, Joel Stanley wrote:
>> Segher added some workarounds for GCC 4.2 and bintuils 2.18. We now set
>> 4.6 and 2.20 as the minimum, so they can be dropped.
>
> It was a bug in binutils _before_ 2.18, only seen by people using GCC
> _before_ 4.2.
>
> It's all ancient history by now, and good riddance :-)
>
>> Signed-off-by: Joel Stanley <joel@jms.id.au>
>
> Acked-by: Segher Boessenkool <segher@kernel.crashing.org>
Thanks.
I updated the change log slightly:
powerpc/vmlinux.lds: Drop binutils < 2.18 workarounds
Segher added some workarounds for binutils < 2.18 and GCC < 4.2. We
now set GCC 4.6 and binutils 2.20 as the minimum, so the workarounds
can be dropped.
This is mostly a revert of c69cccc95fe4 ("powerpc: Fix build bug with
binutils < 2.18 and GCC < 4.2").
cheers
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] powerpc: vmlinux.lds: Drop Binutils 2.18 workarounds
2019-03-21 0:32 [PATCH] powerpc: vmlinux.lds: Drop Binutils 2.18 workarounds Joel Stanley
2019-03-21 23:34 ` Segher Boessenkool
@ 2019-03-26 0:55 ` Michael Ellerman
2019-03-26 7:55 ` Christophe Leroy
2019-03-26 8:08 ` Christophe Leroy
1 sibling, 2 replies; 18+ messages in thread
From: Michael Ellerman @ 2019-03-26 0:55 UTC (permalink / raw)
To: Joel Stanley, linuxppc-dev
Joel Stanley <joel@jms.id.au> writes:
> Segher added some workarounds for GCC 4.2 and bintuils 2.18. We now set
> 4.6 and 2.20 as the minimum, so they can be dropped.
>
> This is mostly a revert of c69cccc95fe4 ("powerpc: Fix build bug with
> binutils < 2.18 and GCC < 4.2").
>
> Signed-off-by: Joel Stanley <joel@jms.id.au>
> ---
> arch/powerpc/kernel/vmlinux.lds.S | 35 ++++---------------------------
> 1 file changed, 4 insertions(+), 31 deletions(-)
Seems this breaks some toolchains, at least the one from kernel.org:
/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld: .tmp_vmlinux1: Not enough room for program headers, try linking with -N
/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld: final link failed: Bad value
make[1]: *** [/kisskb/src/Makefile:1024: vmlinux] Error 1
http://kisskb.ellerman.id.au/kisskb/buildresult/13743374/
Not sure why.
That's binutils 2.30.
cheers
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] powerpc: vmlinux.lds: Drop Binutils 2.18 workarounds
2019-03-26 0:55 ` Michael Ellerman
@ 2019-03-26 7:55 ` Christophe Leroy
2019-03-26 18:19 ` Segher Boessenkool
2019-03-26 8:08 ` Christophe Leroy
1 sibling, 1 reply; 18+ messages in thread
From: Christophe Leroy @ 2019-03-26 7:55 UTC (permalink / raw)
To: Michael Ellerman, Joel Stanley, linuxppc-dev
On 03/26/2019 12:55 AM, Michael Ellerman wrote:
> Joel Stanley <joel@jms.id.au> writes:
>> Segher added some workarounds for GCC 4.2 and bintuils 2.18. We now set
>> 4.6 and 2.20 as the minimum, so they can be dropped.
>>
>> This is mostly a revert of c69cccc95fe4 ("powerpc: Fix build bug with
>> binutils < 2.18 and GCC < 4.2").
>>
>> Signed-off-by: Joel Stanley <joel@jms.id.au>
>> ---
>> arch/powerpc/kernel/vmlinux.lds.S | 35 ++++---------------------------
>> 1 file changed, 4 insertions(+), 31 deletions(-)
>
> Seems this breaks some toolchains, at least the one from kernel.org:
>
> /opt/cross/kisskb/korg/gcc-8.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld: .tmp_vmlinux1: Not enough room for program headers, try linking with -N
> /opt/cross/kisskb/korg/gcc-8.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld: final link failed: Bad value
> make[1]: *** [/kisskb/src/Makefile:1024: vmlinux] Error 1
>
> http://kisskb.ellerman.id.au/kisskb/buildresult/13743374/
>
> Not sure why.
>
> That's binutils 2.30.
>
> cheers
>
Without the patch on PPC32:
Program Header:
LOAD off 0x00010000 vaddr 0xc0000000 paddr 0x00000000 align 2**16
filesz 0x003c2ce4 memsz 0x003e1a08 flags rwx
NOTE off 0x0038dca8 vaddr 0xc037dca8 paddr 0x0037dca8 align 2**2
filesz 0x0000003c memsz 0x0000003c flags ---
NOTE off 0x0038dce4 vaddr 0xc037dce4 paddr 0x0037dce4 align 2**0
filesz 0x0000000c memsz 0x0000000c flags ---
With the patch:
Program Header:
LOAD off 0x00010000 vaddr 0xc0000000 paddr 0x00000000 align 2**16
filesz 0x003c2ce4 memsz 0x003e1a08 flags rwx
NOTE off 0x0038dca8 vaddr 0xc037dca8 paddr 0x0037dca8 align 2**2
filesz 0x0000003c memsz 0x0000003c flags r--
STACK off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**4
filesz 0x00000000 memsz 0x00000000 flags rwx
Christophe
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] powerpc: vmlinux.lds: Drop Binutils 2.18 workarounds
2019-03-26 0:55 ` Michael Ellerman
2019-03-26 7:55 ` Christophe Leroy
@ 2019-03-26 8:08 ` Christophe Leroy
1 sibling, 0 replies; 18+ messages in thread
From: Christophe Leroy @ 2019-03-26 8:08 UTC (permalink / raw)
To: Michael Ellerman, Joel Stanley, linuxppc-dev
Le 26/03/2019 à 01:55, Michael Ellerman a écrit :
> Joel Stanley <joel@jms.id.au> writes:
>> Segher added some workarounds for GCC 4.2 and bintuils 2.18. We now set
>> 4.6 and 2.20 as the minimum, so they can be dropped.
>>
>> This is mostly a revert of c69cccc95fe4 ("powerpc: Fix build bug with
>> binutils < 2.18 and GCC < 4.2").
>>
>> Signed-off-by: Joel Stanley <joel@jms.id.au>
>> ---
>> arch/powerpc/kernel/vmlinux.lds.S | 35 ++++---------------------------
>> 1 file changed, 4 insertions(+), 31 deletions(-)
>
> Seems this breaks some toolchains, at least the one from kernel.org:
>
> /opt/cross/kisskb/korg/gcc-8.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld: .tmp_vmlinux1: Not enough room for program headers, try linking with -N
> /opt/cross/kisskb/korg/gcc-8.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld: final link failed: Bad value
> make[1]: *** [/kisskb/src/Makefile:1024: vmlinux] Error 1
>
> http://kisskb.ellerman.id.au/kisskb/buildresult/13743374/
>
> Not sure why.
>
> That's binutils 2.30.
>
ld doc says:
6586 @cindex not enough room for program headers
6587 @cindex program headers, not enough room
6588 When producing an ELF output file, if the linker script uses the
6589 @code{SIZEOF_HEADERS} builtin function, the linker must compute the
6590 number of program headers before it has determined all the section
6591 addresses and sizes. If the linker later discovers that it needs
6592 additional program headers, it will report an error @samp{not enough
6593 room for program headers}. To avoid this error, you must avoid using
6594 the @code{SIZEOF_HEADERS} function, or you must rework your linker
6595 script to avoid forcing the linker to use additional program
headers, or
6596 you must define the program headers yourself using the @code{PHDRS}
6597 command (@pxref{PHDRS}).
6598 @end table
What about just removing the dummy section, and keeping everything else ? :
diff --git a/arch/powerpc/kernel/vmlinux.lds.S
b/arch/powerpc/kernel/vmlinux.lds.S
index 060a1acd7c6d..511bff8e4a8f 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -20,20 +20,6 @@ ENTRY(_stext)
PHDRS {
kernel PT_LOAD FLAGS(7); /* RWX */
notes PT_NOTE FLAGS(0);
- dummy PT_NOTE FLAGS(0);
-
- /* binutils < 2.18 has a bug that makes it misbehave when taking an
- ELF file with all segments at load address 0 as input. This
- happens when running "strip" on vmlinux, because of the AT() magic
- in this linker script. People using GCC >= 4.2 won't run into
- this problem, because the "build-id" support will put some data
- into the "notes" segment (at a non-zero load address).
-
- To work around this, we force some data into both the "dummy"
- segment and the kernel segment, so the dummy segment will get a
- non-zero load address. It's not enough to always create the
- "notes" segment, since if nothing gets assigned to it, its load
- address will be zero. */
}
#ifdef CONFIG_PPC64
@@ -179,14 +165,6 @@ SECTIONS
NOTES :kernel :notes
- /* The dummy segment contents for the bug workaround mentioned above
- near PHDRS. */
- .dummy : AT(ADDR(.dummy) - LOAD_OFFSET) {
- LONG(0)
- LONG(0)
- LONG(0)
- } :kernel :dummy
-
/*
* Init sections discarded at runtime
*/
Christophe
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH] powerpc: vmlinux.lds: Drop Binutils 2.18 workarounds
2019-03-26 7:55 ` Christophe Leroy
@ 2019-03-26 18:19 ` Segher Boessenkool
2019-03-26 19:28 ` Christophe Leroy
0 siblings, 1 reply; 18+ messages in thread
From: Segher Boessenkool @ 2019-03-26 18:19 UTC (permalink / raw)
To: Christophe Leroy; +Cc: linuxppc-dev, Joel Stanley
On Tue, Mar 26, 2019 at 07:55:33AM +0000, Christophe Leroy wrote:
> STACK off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**4
> filesz 0x00000000 memsz 0x00000000 flags rwx
You need to prevent this one somehow. What object file forces this?
Setting the program headers manually works of course, but that also hides
other problems.
Segher
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] powerpc: vmlinux.lds: Drop Binutils 2.18 workarounds
2019-03-26 18:19 ` Segher Boessenkool
@ 2019-03-26 19:28 ` Christophe Leroy
2019-03-26 20:12 ` Segher Boessenkool
0 siblings, 1 reply; 18+ messages in thread
From: Christophe Leroy @ 2019-03-26 19:28 UTC (permalink / raw)
To: Segher Boessenkool; +Cc: linuxppc-dev, Joel Stanley
Le 26/03/2019 à 19:19, Segher Boessenkool a écrit :
> On Tue, Mar 26, 2019 at 07:55:33AM +0000, Christophe Leroy wrote:
>> STACK off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**4
>> filesz 0x00000000 memsz 0x00000000 flags rwx
>
> You need to prevent this one somehow. What object file forces this?
mpc885_ads_defconfig
Christophe
>
> Setting the program headers manually works of course, but that also hides
> other problems.
>
>
> Segher
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] powerpc: vmlinux.lds: Drop Binutils 2.18 workarounds
2019-03-26 19:28 ` Christophe Leroy
@ 2019-03-26 20:12 ` Segher Boessenkool
2019-03-26 22:29 ` Segher Boessenkool
2019-03-27 8:56 ` Christophe Leroy
0 siblings, 2 replies; 18+ messages in thread
From: Segher Boessenkool @ 2019-03-26 20:12 UTC (permalink / raw)
To: Christophe Leroy; +Cc: linuxppc-dev, Joel Stanley
On Tue, Mar 26, 2019 at 08:28:58PM +0100, Christophe Leroy wrote:
>
>
> Le 26/03/2019 à 19:19, Segher Boessenkool a écrit :
> >On Tue, Mar 26, 2019 at 07:55:33AM +0000, Christophe Leroy wrote:
> >> STACK off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**4
> >> filesz 0x00000000 memsz 0x00000000 flags rwx
> >
> >You need to prevent this one somehow. What object file forces this?
>
> mpc885_ads_defconfig
No, which object file, ".o file". Not defconfig :-)
Segher
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] powerpc: vmlinux.lds: Drop Binutils 2.18 workarounds
2019-03-26 20:12 ` Segher Boessenkool
@ 2019-03-26 22:29 ` Segher Boessenkool
2019-03-26 22:59 ` Segher Boessenkool
2019-03-27 6:40 ` Christophe Leroy
2019-03-27 8:56 ` Christophe Leroy
1 sibling, 2 replies; 18+ messages in thread
From: Segher Boessenkool @ 2019-03-26 22:29 UTC (permalink / raw)
To: Christophe Leroy; +Cc: linuxppc-dev, Joel Stanley
On Tue, Mar 26, 2019 at 03:12:31PM -0500, Segher Boessenkool wrote:
> On Tue, Mar 26, 2019 at 08:28:58PM +0100, Christophe Leroy wrote:
> >
> >
> > Le 26/03/2019 à 19:19, Segher Boessenkool a écrit :
> > >On Tue, Mar 26, 2019 at 07:55:33AM +0000, Christophe Leroy wrote:
> > >> STACK off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**4
> > >> filesz 0x00000000 memsz 0x00000000 flags rwx
> > >
> > >You need to prevent this one somehow. What object file forces this?
> >
> > mpc885_ads_defconfig
>
> No, which object file, ".o file". Not defconfig :-)
I tried to reproduce this. It does not fail with a ppc6xx_defconfig
build, and mpc885_ads_defconfig fails with
INFO: Uncompressed kernel (size 0x435178) overlaps the address of the wrapper(0x400000)
INFO: Fixing the link_address of wrapper to (0x500000)
ln: failed to access 'arch/powerpc/boot/cuImage.mpc885ads': No such file or directory
What is your GCC?
Segher
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] powerpc: vmlinux.lds: Drop Binutils 2.18 workarounds
2019-03-26 22:29 ` Segher Boessenkool
@ 2019-03-26 22:59 ` Segher Boessenkool
2019-03-27 6:40 ` Christophe Leroy
1 sibling, 0 replies; 18+ messages in thread
From: Segher Boessenkool @ 2019-03-26 22:59 UTC (permalink / raw)
To: Christophe Leroy; +Cc: linuxppc-dev, Joel Stanley
On Tue, Mar 26, 2019 at 05:29:43PM -0500, Segher Boessenkool wrote:
> On Tue, Mar 26, 2019 at 03:12:31PM -0500, Segher Boessenkool wrote:
> > On Tue, Mar 26, 2019 at 08:28:58PM +0100, Christophe Leroy wrote:
> > >
> > >
> > > Le 26/03/2019 à 19:19, Segher Boessenkool a écrit :
> > > >On Tue, Mar 26, 2019 at 07:55:33AM +0000, Christophe Leroy wrote:
> > > >> STACK off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**4
> > > >> filesz 0x00000000 memsz 0x00000000 flags rwx
> > > >
> > > >You need to prevent this one somehow. What object file forces this?
> > >
> > > mpc885_ads_defconfig
> >
> > No, which object file, ".o file". Not defconfig :-)
>
> I tried to reproduce this. It does not fail with a ppc6xx_defconfig
> build, and mpc885_ads_defconfig fails with
>
> INFO: Uncompressed kernel (size 0x435178) overlaps the address of the wrapper(0x400000)
> INFO: Fixing the link_address of wrapper to (0x500000)
> ln: failed to access 'arch/powerpc/boot/cuImage.mpc885ads': No such file or directory
(Fixed this by getting a working mkimage)
> What is your GCC?
That question remains -- all my powerpc kernel builds work just fine with
that patch applied (recent GCC, recent binutils).
Segher
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] powerpc: vmlinux.lds: Drop Binutils 2.18 workarounds
2019-03-26 22:29 ` Segher Boessenkool
2019-03-26 22:59 ` Segher Boessenkool
@ 2019-03-27 6:40 ` Christophe Leroy
2019-03-27 12:47 ` Segher Boessenkool
1 sibling, 1 reply; 18+ messages in thread
From: Christophe Leroy @ 2019-03-27 6:40 UTC (permalink / raw)
To: Segher Boessenkool; +Cc: linuxppc-dev, Joel Stanley
Le 26/03/2019 à 23:29, Segher Boessenkool a écrit :
> On Tue, Mar 26, 2019 at 03:12:31PM -0500, Segher Boessenkool wrote:
>> On Tue, Mar 26, 2019 at 08:28:58PM +0100, Christophe Leroy wrote:
>>>
>>>
>>> Le 26/03/2019 à 19:19, Segher Boessenkool a écrit :
>>>> On Tue, Mar 26, 2019 at 07:55:33AM +0000, Christophe Leroy wrote:
>>>>> STACK off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**4
>>>>> filesz 0x00000000 memsz 0x00000000 flags rwx
>>>>
>>>> You need to prevent this one somehow. What object file forces this?
>>>
>>> mpc885_ads_defconfig
>>
>> No, which object file, ".o file". Not defconfig :-)
>
> I tried to reproduce this. It does not fail with a ppc6xx_defconfig
> build, and mpc885_ads_defconfig fails with
So far, the only defconfig which fails for me is ppc64_defconfig, like
Michael.
885_ads is ok, I just noticed the STACK header in vmlinux that is not
there when the patch is not applies.
>
> INFO: Uncompressed kernel (size 0x435178) overlaps the address of the wrapper(0x400000)
> INFO: Fixing the link_address of wrapper to (0x500000)
> ln: failed to access 'arch/powerpc/boot/cuImage.mpc885ads': No such file or directory
>
> What is your GCC?
[root@localhost linux-powerpc]# powerpc64-linux-gcc -v
Using built-in specs.
COLLECT_GCC=powerpc64-linux-gcc
COLLECT_LTO_WRAPPER=/opt/gcc-8.1.0-nolibc/powerpc64-linux/bin/../libexec/gcc/powerpc64-linux/8.1.0/lto-wrapper
Target: powerpc64-linux
Configured with: /home/arnd/git/gcc/configure --target=powerpc64-linux
--enable-targets=all
--prefix=/home/arnd/cross/x86_64/gcc-8.1.0-nolibc/powerpc64-linux
--enable-languages=c --without-headers --disable-bootstrap --disable-nls
--disable-threads --disable-shared --disable-libmudflap --disable-libssp
--disable-libgomp --disable-decimal-float --disable-libquadmath
--disable-libatomic --disable-libcc1 --disable-libmpx
--enable-checking=release
Thread model: single
gcc version 8.1.0 (GCC)
[root@localhost linux-powerpc]# powerpc64-linux-ld -v
GNU ld (GNU Binutils) 2.30
Christophe
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] powerpc: vmlinux.lds: Drop Binutils 2.18 workarounds
2019-03-26 20:12 ` Segher Boessenkool
2019-03-26 22:29 ` Segher Boessenkool
@ 2019-03-27 8:56 ` Christophe Leroy
2019-03-27 9:09 ` Christophe Leroy
1 sibling, 1 reply; 18+ messages in thread
From: Christophe Leroy @ 2019-03-27 8:56 UTC (permalink / raw)
To: Segher Boessenkool; +Cc: linuxppc-dev, Joel Stanley
Le 26/03/2019 à 21:12, Segher Boessenkool a écrit :
> On Tue, Mar 26, 2019 at 08:28:58PM +0100, Christophe Leroy wrote:
>>
>>
>> Le 26/03/2019 à 19:19, Segher Boessenkool a écrit :
>>> On Tue, Mar 26, 2019 at 07:55:33AM +0000, Christophe Leroy wrote:
>>>> STACK off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**4
>>>> filesz 0x00000000 memsz 0x00000000 flags rwx
>>>
>>> You need to prevent this one somehow. What object file forces this?
>>
>> mpc885_ads_defconfig
>
> No, which object file, ".o file". Not defconfig :-)
>
Ok, how to I know that ? Is it based on some file flags or some headers ?
Here is the list of headers in vmlinux.o, is there one that shouldn't
exist ?
vmlinux.o: file format elf32-powerpc
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 003320c0 00000000 00000000 00001000 2**12
CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
1 .head.text 00002340 00000000 00000000 003330c0 2**0
CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
2 .init.text 00017cb8 00000000 00000000 00335400 2**2
CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
3 .text.unlikely 00004154 00000000 00000000 0034d0b8 2**2
CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
4 .ref.text 000013f0 00000000 00000000 0035120c 2**2
CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
5 .softirqentry.text 00000258 00000000 00000000 003525fc 2**2
CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
6 .sched.text 00003930 00000000 00000000 00352854 2**2
CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
7 .cpuidle.text 0000007c 00000000 00000000 00356184 2**2
CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
8 .meminit.text 00000584 00000000 00000000 00356200 2**2
CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
9 .exit.text 00000800 00000000 00000000 00356784 2**2
CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
10 .rodata 0001d7a7 00000000 00000000 00356f90 2**4
CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA
11 .init.rodata 00000790 00000000 00000000 00374738 2**2
CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA
12 .rodata.str1.4 00022329 00000000 00000000 00374ec8 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
13 __param 000003c0 00000000 00000000 003971f4 2**2
CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA
14 .note.Linux 00000018 00000000 00000000 003975b4 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
15 __ex_table 00000ca8 00000000 00000000 003975cc 2**2
CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA
16 __ftr_alt_97 00000008 00000000 00000000 00398274 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
17 __ftr_fixup 00000198 00000000 00000000 00398280 2**3
CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA
18 __reservedmem_of_table 000000c4 00000000 00000000 00398418 2**2
CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA
19 __irqchip_of_table_end 000000c4 00000000 00000000 003984dc 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
20 __modver 00000008 00000000 00000000 003985a0 2**2
CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA
21 __reservedmem_of_table_end 000000c4 00000000 00000000 003985a8 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
22 .eh_frame 00134eb8 00000000 00000000 0039866c 2**2
CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA
23 .fixup 00000cc8 00000000 00000000 004cd524 2**0
CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
24 .data 00013668 00000000 00000000 004cf000 2**12
CONTENTS, ALLOC, LOAD, RELOC, DATA
25 __bug_table 00006ce4 00000000 00000000 004e2668 2**0
CONTENTS, ALLOC, LOAD, RELOC, DATA
26 .data..read_mostly 00001ce8 00000000 00000000 004e9350 2**3
CONTENTS, ALLOC, LOAD, RELOC, DATA
27 .init.data 0000244c 00000000 00000000 004eb038 2**2
CONTENTS, ALLOC, LOAD, RELOC, DATA
28 .init.setup 0000039c 00000000 00000000 004ed484 2**2
CONTENTS, ALLOC, LOAD, RELOC, DATA
29 .initcallrootfs.init 00000004 00000000 00000000 004ed820 2**2
CONTENTS, ALLOC, LOAD, RELOC, DATA
30 .data..page_aligned 00003000 00000000 00000000 004ee000 2**12
CONTENTS, ALLOC, LOAD, DATA
31 .initcall3.init 00000008 00000000 00000000 004f1000 2**2
CONTENTS, ALLOC, LOAD, RELOC, DATA
32 .initcallearly.init 00000010 00000000 00000000 004f1008 2**2
CONTENTS, ALLOC, LOAD, RELOC, DATA
33 .initcall6.init 00000120 00000000 00000000 004f1018 2**2
CONTENTS, ALLOC, LOAD, RELOC, DATA
34 .initcall4.init 00000080 00000000 00000000 004f1138 2**2
CONTENTS, ALLOC, LOAD, RELOC, DATA
35 .data.once 0000009e 00000000 00000000 004f11b8 2**0
CONTENTS, ALLOC, LOAD, DATA
36 .initcall1.init 00000048 00000000 00000000 004f1258 2**2
CONTENTS, ALLOC, LOAD, RELOC, DATA
37 .initcall7.init 00000030 00000000 00000000 004f12a0 2**2
CONTENTS, ALLOC, LOAD, RELOC, DATA
38 .machine.desc 000000e0 00000000 00000000 004f12d0 2**2
CONTENTS, ALLOC, LOAD, RELOC, DATA
39 .data..cacheline_aligned 00005000 00000000 00000000 004f13b0 2**4
CONTENTS, ALLOC, LOAD, DATA
40 .data..ro_after_init 000004b8 00000000 00000000 004f63b0 2**2
CONTENTS, ALLOC, LOAD, RELOC, DATA
41 .initcall2.init 00000018 00000000 00000000 004f6868 2**2
CONTENTS, ALLOC, LOAD, RELOC, DATA
42 .initcall5.init 00000070 00000000 00000000 004f6880 2**2
CONTENTS, ALLOC, LOAD, RELOC, DATA
43 .meminit.data 00000010 00000000 00000000 004f68f0 2**2
CONTENTS, ALLOC, LOAD, DATA
44 .ref.data 00000578 00000000 00000000 004f6900 2**2
CONTENTS, ALLOC, LOAD, DATA
45 .exitcall.exit 000000b0 00000000 00000000 004f6e78 2**2
CONTENTS, ALLOC, LOAD, RELOC, DATA
46 .initcall0.init 0000000c 00000000 00000000 004f6f28 2**2
CONTENTS, ALLOC, LOAD, RELOC, DATA
47 .con_initcall.init 00000004 00000000 00000000 004f6f34 2**2
CONTENTS, ALLOC, LOAD, RELOC, DATA
48 .initcall7s.init 00000004 00000000 00000000 004f6f38 2**2
CONTENTS, ALLOC, LOAD, RELOC, DATA
49 .data..shared_aligned 00000118 00000000 00000000 004f6f40 2**4
CONTENTS, ALLOC, LOAD, DATA
50 .sdata 00000188 00000000 00000000 004f7058 2**3
CONTENTS, ALLOC, LOAD, RELOC, DATA
51 .sbss 000002d4 00000000 00000000 004f71e0 2**3
ALLOC
52 .bss 0001e728 00000000 00000000 004f71e0 2**4
ALLOC
53 .stab 00000270 00000000 00000000 004f71e0 2**2
CONTENTS, RELOC, READONLY, DEBUGGING
54 .stabstr 00000335 00000000 00000000 004f7450 2**0
CONTENTS, READONLY, DEBUGGING
55 .comment 0000339c 00000000 00000000 004f7785 2**0
CONTENTS, READONLY
56 .note.GNU-stack 00000000 00000000 00000000 004fab21 2**0
CONTENTS, READONLY, CODE
57 .debug_aranges 000077e8 00000000 00000000 004fab28 2**3
CONTENTS, RELOC, READONLY, DEBUGGING
58 .debug_info 030a43d8 00000000 00000000 00502310 2**0
CONTENTS, RELOC, READONLY, DEBUGGING
59 .debug_abbrev 0018bdc0 00000000 00000000 035a66e8 2**0
CONTENTS, READONLY, DEBUGGING
60 .debug_line 005d69b9 00000000 00000000 037324a8 2**0
CONTENTS, RELOC, READONLY, DEBUGGING
61 .debug_frame 00134eb8 00000000 00000000 03d08e64 2**2
CONTENTS, RELOC, READONLY, DEBUGGING
62 .debug_str 01b24fc1 00000000 00000000 03e3dd1c 2**0
CONTENTS, READONLY, DEBUGGING
63 .debug_loc 00242597 00000000 00000000 05962cdd 2**0
CONTENTS, RELOC, READONLY, DEBUGGING
64 .debug_ranges 001ea010 00000000 00000000 05ba5274 2**0
CONTENTS, RELOC, READONLY, DEBUGGING
65 .gnu.attributes 00000012 00000000 00000000 05d8f284 2**0
CONTENTS, READONLY
Christophe
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] powerpc: vmlinux.lds: Drop Binutils 2.18 workarounds
2019-03-27 8:56 ` Christophe Leroy
@ 2019-03-27 9:09 ` Christophe Leroy
0 siblings, 0 replies; 18+ messages in thread
From: Christophe Leroy @ 2019-03-27 9:09 UTC (permalink / raw)
To: Segher Boessenkool; +Cc: linuxppc-dev, Joel Stanley
Le 27/03/2019 à 09:56, Christophe Leroy a écrit :
>
>
> Le 26/03/2019 à 21:12, Segher Boessenkool a écrit :
>> On Tue, Mar 26, 2019 at 08:28:58PM +0100, Christophe Leroy wrote:
>>>
>>>
>>> Le 26/03/2019 à 19:19, Segher Boessenkool a écrit :
>>>> On Tue, Mar 26, 2019 at 07:55:33AM +0000, Christophe Leroy wrote:
>>>>> STACK off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align
>>>>> 2**4
>>>>> filesz 0x00000000 memsz 0x00000000 flags rwx
>>>>
>>>> You need to prevent this one somehow. What object file forces this?
>>>
>>> mpc885_ads_defconfig
>>
>> No, which object file, ".o file". Not defconfig :-)
>>
>
> Ok, how to I know that ? Is it based on some file flags or some headers ?
>
> Here is the list of headers in vmlinux.o, is there one that shouldn't
> exist ?
>
>
> vmlinux.o: file format elf32-powerpc
>
> Sections:
> Idx Name Size VMA LMA File off Algn
> 0 .text 003320c0 00000000 00000000 00001000 2**12
> CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
> 1 .head.text 00002340 00000000 00000000 003330c0 2**0
> CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
> 2 .init.text 00017cb8 00000000 00000000 00335400 2**2
> CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
> 3 .text.unlikely 00004154 00000000 00000000 0034d0b8 2**2
> CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
> 4 .ref.text 000013f0 00000000 00000000 0035120c 2**2
> CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
> 5 .softirqentry.text 00000258 00000000 00000000 003525fc 2**2
> CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
> 6 .sched.text 00003930 00000000 00000000 00352854 2**2
> CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
> 7 .cpuidle.text 0000007c 00000000 00000000 00356184 2**2
> CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
> 8 .meminit.text 00000584 00000000 00000000 00356200 2**2
> CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
> 9 .exit.text 00000800 00000000 00000000 00356784 2**2
> CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
> 10 .rodata 0001d7a7 00000000 00000000 00356f90 2**4
> CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA
> 11 .init.rodata 00000790 00000000 00000000 00374738 2**2
> CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA
> 12 .rodata.str1.4 00022329 00000000 00000000 00374ec8 2**2
> CONTENTS, ALLOC, LOAD, READONLY, DATA
> 13 __param 000003c0 00000000 00000000 003971f4 2**2
> CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA
> 14 .note.Linux 00000018 00000000 00000000 003975b4 2**2
> CONTENTS, ALLOC, LOAD, READONLY, DATA
> 15 __ex_table 00000ca8 00000000 00000000 003975cc 2**2
> CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA
> 16 __ftr_alt_97 00000008 00000000 00000000 00398274 2**2
> CONTENTS, ALLOC, LOAD, READONLY, DATA
> 17 __ftr_fixup 00000198 00000000 00000000 00398280 2**3
> CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA
> 18 __reservedmem_of_table 000000c4 00000000 00000000 00398418 2**2
> CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA
> 19 __irqchip_of_table_end 000000c4 00000000 00000000 003984dc 2**2
> CONTENTS, ALLOC, LOAD, READONLY, DATA
> 20 __modver 00000008 00000000 00000000 003985a0 2**2
> CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA
> 21 __reservedmem_of_table_end 000000c4 00000000 00000000 003985a8
> 2**2
> CONTENTS, ALLOC, LOAD, READONLY, DATA
> 22 .eh_frame 00134eb8 00000000 00000000 0039866c 2**2
> CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA
> 23 .fixup 00000cc8 00000000 00000000 004cd524 2**0
> CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
> 24 .data 00013668 00000000 00000000 004cf000 2**12
> CONTENTS, ALLOC, LOAD, RELOC, DATA
> 25 __bug_table 00006ce4 00000000 00000000 004e2668 2**0
> CONTENTS, ALLOC, LOAD, RELOC, DATA
> 26 .data..read_mostly 00001ce8 00000000 00000000 004e9350 2**3
> CONTENTS, ALLOC, LOAD, RELOC, DATA
> 27 .init.data 0000244c 00000000 00000000 004eb038 2**2
> CONTENTS, ALLOC, LOAD, RELOC, DATA
> 28 .init.setup 0000039c 00000000 00000000 004ed484 2**2
> CONTENTS, ALLOC, LOAD, RELOC, DATA
> 29 .initcallrootfs.init 00000004 00000000 00000000 004ed820 2**2
> CONTENTS, ALLOC, LOAD, RELOC, DATA
> 30 .data..page_aligned 00003000 00000000 00000000 004ee000 2**12
> CONTENTS, ALLOC, LOAD, DATA
> 31 .initcall3.init 00000008 00000000 00000000 004f1000 2**2
> CONTENTS, ALLOC, LOAD, RELOC, DATA
> 32 .initcallearly.init 00000010 00000000 00000000 004f1008 2**2
> CONTENTS, ALLOC, LOAD, RELOC, DATA
> 33 .initcall6.init 00000120 00000000 00000000 004f1018 2**2
> CONTENTS, ALLOC, LOAD, RELOC, DATA
> 34 .initcall4.init 00000080 00000000 00000000 004f1138 2**2
> CONTENTS, ALLOC, LOAD, RELOC, DATA
> 35 .data.once 0000009e 00000000 00000000 004f11b8 2**0
> CONTENTS, ALLOC, LOAD, DATA
> 36 .initcall1.init 00000048 00000000 00000000 004f1258 2**2
> CONTENTS, ALLOC, LOAD, RELOC, DATA
> 37 .initcall7.init 00000030 00000000 00000000 004f12a0 2**2
> CONTENTS, ALLOC, LOAD, RELOC, DATA
> 38 .machine.desc 000000e0 00000000 00000000 004f12d0 2**2
> CONTENTS, ALLOC, LOAD, RELOC, DATA
> 39 .data..cacheline_aligned 00005000 00000000 00000000 004f13b0 2**4
> CONTENTS, ALLOC, LOAD, DATA
> 40 .data..ro_after_init 000004b8 00000000 00000000 004f63b0 2**2
> CONTENTS, ALLOC, LOAD, RELOC, DATA
> 41 .initcall2.init 00000018 00000000 00000000 004f6868 2**2
> CONTENTS, ALLOC, LOAD, RELOC, DATA
> 42 .initcall5.init 00000070 00000000 00000000 004f6880 2**2
> CONTENTS, ALLOC, LOAD, RELOC, DATA
> 43 .meminit.data 00000010 00000000 00000000 004f68f0 2**2
> CONTENTS, ALLOC, LOAD, DATA
> 44 .ref.data 00000578 00000000 00000000 004f6900 2**2
> CONTENTS, ALLOC, LOAD, DATA
> 45 .exitcall.exit 000000b0 00000000 00000000 004f6e78 2**2
> CONTENTS, ALLOC, LOAD, RELOC, DATA
> 46 .initcall0.init 0000000c 00000000 00000000 004f6f28 2**2
> CONTENTS, ALLOC, LOAD, RELOC, DATA
> 47 .con_initcall.init 00000004 00000000 00000000 004f6f34 2**2
> CONTENTS, ALLOC, LOAD, RELOC, DATA
> 48 .initcall7s.init 00000004 00000000 00000000 004f6f38 2**2
> CONTENTS, ALLOC, LOAD, RELOC, DATA
> 49 .data..shared_aligned 00000118 00000000 00000000 004f6f40 2**4
> CONTENTS, ALLOC, LOAD, DATA
> 50 .sdata 00000188 00000000 00000000 004f7058 2**3
> CONTENTS, ALLOC, LOAD, RELOC, DATA
> 51 .sbss 000002d4 00000000 00000000 004f71e0 2**3
> ALLOC
> 52 .bss 0001e728 00000000 00000000 004f71e0 2**4
> ALLOC
> 53 .stab 00000270 00000000 00000000 004f71e0 2**2
> CONTENTS, RELOC, READONLY, DEBUGGING
> 54 .stabstr 00000335 00000000 00000000 004f7450 2**0
> CONTENTS, READONLY, DEBUGGING
> 55 .comment 0000339c 00000000 00000000 004f7785 2**0
> CONTENTS, READONLY
> 56 .note.GNU-stack 00000000 00000000 00000000 004fab21 2**0
> CONTENTS, READONLY, CODE
> 57 .debug_aranges 000077e8 00000000 00000000 004fab28 2**3
> CONTENTS, RELOC, READONLY, DEBUGGING
> 58 .debug_info 030a43d8 00000000 00000000 00502310 2**0
> CONTENTS, RELOC, READONLY, DEBUGGING
> 59 .debug_abbrev 0018bdc0 00000000 00000000 035a66e8 2**0
> CONTENTS, READONLY, DEBUGGING
> 60 .debug_line 005d69b9 00000000 00000000 037324a8 2**0
> CONTENTS, RELOC, READONLY, DEBUGGING
> 61 .debug_frame 00134eb8 00000000 00000000 03d08e64 2**2
> CONTENTS, RELOC, READONLY, DEBUGGING
> 62 .debug_str 01b24fc1 00000000 00000000 03e3dd1c 2**0
> CONTENTS, READONLY, DEBUGGING
> 63 .debug_loc 00242597 00000000 00000000 05962cdd 2**0
> CONTENTS, RELOC, READONLY, DEBUGGING
> 64 .debug_ranges 001ea010 00000000 00000000 05ba5274 2**0
> CONTENTS, RELOC, READONLY, DEBUGGING
> 65 .gnu.attributes 00000012 00000000 00000000 05d8f284 2**0
> CONTENTS, READONLY
>
Using readelf, I get the following output
[root@localhost linux-powerpc]# powerpc64-linux-readelf -l vmlinux
Elf file type is EXEC (Executable file)
Entry point 0xc0000000
There are 3 program headers, starting at offset 52
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
LOAD 0x010000 0xc0000000 0x00000000 0x3f8ce4 0x417a08 RWE
0x10000
NOTE 0x3c3ca8 0xc03b3ca8 0x003b3ca8 0x0003c 0x0003c R 0x4
GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RWE 0x10
Section to Segment mapping:
Segment Sections...
00 .head.text .text .rodata __param __modver __ex_table .notes
.init.text .exit.text .init.data .init.setup .initcall.init
.con_initcall.init __ftr_fixup .machine.desc .data .data..init_task
.data..page_aligned .data..cacheline_aligned .data..read_mostly
__bug_table .sbss .bss
01 .notes
02
Is it the section .note.GNU-stack which implies GNU_STACK program header
? That section seems to be present in most .o files.
Christophe
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] powerpc: vmlinux.lds: Drop Binutils 2.18 workarounds
2019-03-27 6:40 ` Christophe Leroy
@ 2019-03-27 12:47 ` Segher Boessenkool
2019-03-27 18:21 ` Segher Boessenkool
0 siblings, 1 reply; 18+ messages in thread
From: Segher Boessenkool @ 2019-03-27 12:47 UTC (permalink / raw)
To: Christophe Leroy; +Cc: linuxppc-dev, Joel Stanley
On Wed, Mar 27, 2019 at 07:40:32AM +0100, Christophe Leroy wrote:
> Le 26/03/2019 à 23:29, Segher Boessenkool a écrit :
> >I tried to reproduce this. It does not fail with a ppc6xx_defconfig
> >build, and mpc885_ads_defconfig fails with
>
> So far, the only defconfig which fails for me is ppc64_defconfig, like
> Michael.
Oh, I misunderstood then. Let me try that :-)
> 885_ads is ok, I just noticed the STACK header in vmlinux that is not
> there when the patch is not applies.
Right... The linker generates that by default, it's nothing to worry
about.
> >What is your GCC?
>
> [root@localhost linux-powerpc]# powerpc64-linux-gcc -v
> Using built-in specs.
> COLLECT_GCC=powerpc64-linux-gcc
> COLLECT_LTO_WRAPPER=/opt/gcc-8.1.0-nolibc/powerpc64-linux/bin/../libexec/gcc/powerpc64-linux/8.1.0/lto-wrapper
> Target: powerpc64-linux
> Configured with: /home/arnd/git/gcc/configure --target=powerpc64-linux
> --enable-targets=all
> --prefix=/home/arnd/cross/x86_64/gcc-8.1.0-nolibc/powerpc64-linux
> --enable-languages=c --without-headers --disable-bootstrap --disable-nls
> --disable-threads --disable-shared --disable-libmudflap --disable-libssp
> --disable-libgomp --disable-decimal-float --disable-libquadmath
> --disable-libatomic --disable-libcc1 --disable-libmpx
> --enable-checking=release
> Thread model: single
> gcc version 8.1.0 (GCC)
Okay cool, a plain GCC build, importantly not a vendor compiler. Built
with my scripts no less ;-)
> [root@localhost linux-powerpc]# powerpc64-linux-ld -v
> GNU ld (GNU Binutils) 2.30
Segher
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] powerpc: vmlinux.lds: Drop Binutils 2.18 workarounds
2019-03-27 12:47 ` Segher Boessenkool
@ 2019-03-27 18:21 ` Segher Boessenkool
2019-03-28 6:19 ` Christophe Leroy
0 siblings, 1 reply; 18+ messages in thread
From: Segher Boessenkool @ 2019-03-27 18:21 UTC (permalink / raw)
To: Christophe Leroy; +Cc: linuxppc-dev, Joel Stanley
On Wed, Mar 27, 2019 at 07:47:55AM -0500, Segher Boessenkool wrote:
> On Wed, Mar 27, 2019 at 07:40:32AM +0100, Christophe Leroy wrote:
> > Le 26/03/2019 à 23:29, Segher Boessenkool a écrit :
> > >I tried to reproduce this. It does not fail with a ppc6xx_defconfig
> > >build, and mpc885_ads_defconfig fails with
> >
> > So far, the only defconfig which fails for me is ppc64_defconfig, like
> > Michael.
>
> Oh, I misunderstood then. Let me try that :-)
Yeah, okay, we should have some PHDRS statement here still. You can drop
the dummy segment, and the notes segment as well, or you can keep the notes
section in both the notes and kernel segments.
(You patch doesn't apply btw, whitespace damage I think; will you send a
new one?)
Segher
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] powerpc: vmlinux.lds: Drop Binutils 2.18 workarounds
2019-03-27 18:21 ` Segher Boessenkool
@ 2019-03-28 6:19 ` Christophe Leroy
2019-03-28 15:11 ` Segher Boessenkool
0 siblings, 1 reply; 18+ messages in thread
From: Christophe Leroy @ 2019-03-28 6:19 UTC (permalink / raw)
To: Segher Boessenkool, Joel Stanley; +Cc: linuxppc-dev
Le 27/03/2019 à 19:21, Segher Boessenkool a écrit :
> On Wed, Mar 27, 2019 at 07:47:55AM -0500, Segher Boessenkool wrote:
>> On Wed, Mar 27, 2019 at 07:40:32AM +0100, Christophe Leroy wrote:
>>> Le 26/03/2019 à 23:29, Segher Boessenkool a écrit :
>>>> I tried to reproduce this. It does not fail with a ppc6xx_defconfig
>>>> build, and mpc885_ads_defconfig fails with
>>>
>>> So far, the only defconfig which fails for me is ppc64_defconfig, like
>>> Michael.
>>
>> Oh, I misunderstood then. Let me try that :-)
>
> Yeah, okay, we should have some PHDRS statement here still. You can drop
> the dummy segment, and the notes segment as well, or you can keep the notes
> section in both the notes and kernel segments.
Is the note segment useful at all ? I guess if we decide to keep it, we
should have a reason.
>
> (You patch doesn't apply btw, whitespace damage I think; will you send a
> new one?)
Originally the patch is by Joel Stanley <joel@jms.id.au>
I guess he will send a v2 taking into account the discussion ?
Or maybe you can send it yourself as you are probably the best person to
explain in details the change in the commit message.
Christophe
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] powerpc: vmlinux.lds: Drop Binutils 2.18 workarounds
2019-03-28 6:19 ` Christophe Leroy
@ 2019-03-28 15:11 ` Segher Boessenkool
0 siblings, 0 replies; 18+ messages in thread
From: Segher Boessenkool @ 2019-03-28 15:11 UTC (permalink / raw)
To: Christophe Leroy; +Cc: linuxppc-dev, Joel Stanley
On Thu, Mar 28, 2019 at 07:19:57AM +0100, Christophe Leroy wrote:
> Le 27/03/2019 à 19:21, Segher Boessenkool a écrit :
> >Yeah, okay, we should have some PHDRS statement here still. You can drop
> >the dummy segment, and the notes segment as well, or you can keep the notes
> >section in both the notes and kernel segments.
>
> Is the note segment useful at all ? I guess if we decide to keep it, we
> should have a reason.
I don't know if it is.
$ readelf -x17 powerpc64/kernel/vmlinux
Hex dump of section '.notes':
0xc0000000010d4128 00000004 00000014 00000003 474e5500 ............GNU.
0xc0000000010d4138 ba254e47 396b1745 176695d8 6b54c9e3 .%NG9k.E.f..kT..
0xc0000000010d4148 959cedd7 00000006 00000001 00000100 ................
0xc0000000010d4158 4c696e75 78000000 00000000 Linux.......
Does that look useful? There's a build-id in there it seems. I don't know
if any tools look at that, or how they find it.
> >(You patch doesn't apply btw, whitespace damage I think; will you send a
> >new one?)
>
> Originally the patch is by Joel Stanley <joel@jms.id.au>
>
> I guess he will send a v2 taking into account the discussion ?
Please do Joel :-) Thanks in advance, etc.
> Or maybe you can send it yourself as you are probably the best person to
> explain in details the change in the commit message.
I have no way of testing things properly.
Segher
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2019-03-28 15:14 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-21 0:32 [PATCH] powerpc: vmlinux.lds: Drop Binutils 2.18 workarounds Joel Stanley
2019-03-21 23:34 ` Segher Boessenkool
2019-03-22 0:22 ` Michael Ellerman
2019-03-26 0:55 ` Michael Ellerman
2019-03-26 7:55 ` Christophe Leroy
2019-03-26 18:19 ` Segher Boessenkool
2019-03-26 19:28 ` Christophe Leroy
2019-03-26 20:12 ` Segher Boessenkool
2019-03-26 22:29 ` Segher Boessenkool
2019-03-26 22:59 ` Segher Boessenkool
2019-03-27 6:40 ` Christophe Leroy
2019-03-27 12:47 ` Segher Boessenkool
2019-03-27 18:21 ` Segher Boessenkool
2019-03-28 6:19 ` Christophe Leroy
2019-03-28 15:11 ` Segher Boessenkool
2019-03-27 8:56 ` Christophe Leroy
2019-03-27 9:09 ` Christophe Leroy
2019-03-26 8:08 ` Christophe Leroy
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.