From: Michael Ellerman [mailto:m...@ellerman.id.au]
> > In the past I've caused orphan sections to error by assigning them
> > to the same address as something that exists.
> > Works with all linkers, even if the error message isn't as useful.
>
> How do you assign them an address without knowing
David Laight writes:
> From: Michael Ellerman
>> Sent: 14 October 2016 01:46
> ...
>> > +LDFLAGS_vmlinux := $(LDFLAGS_vmlinux-y) --orphan-handling=error
>>
>> At least some old(er) toolchains don't support that:
>>
>> /opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux-ld:
>
From: Michael Ellerman
> Sent: 14 October 2016 01:46
...
> > +LDFLAGS_vmlinux:= $(LDFLAGS_vmlinux-y) --orphan-handling=error
>
> At least some old(er) toolchains don't support that:
>
> /opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux-ld:
> unrecognized option '--
> orpha
On Fri, 14 Oct 2016 13:35:54 +1100
Balbir Singh wrote:
> On 12/10/16 18:00, Nicholas Piggin wrote:
> > Add --orphan-handling=error to final link flags. This ensures we have to
> > handle all sections. This would have caught subtle breakage such as
> > 7de3b27bac47da9de08409df1d69664acbb72197 at b
the same sections from other files.
How's this? Might take a few iterations to smooth out all toolchains
From: Nicholas Piggin
Date: Thu, 22 Sep 2016 18:41:14 +1000
Subject: [PATCH] powerpc: link error on orphan sections
Add --orphan-handling=error to final link flags. This ensures we have
Nicholas Piggin writes:
> diff --git a/arch/powerpc/kernel/vmlinux.lds.S
> b/arch/powerpc/kernel/vmlinux.lds.S
> index 8295f51..9f4d85e 100644
> --- a/arch/powerpc/kernel/vmlinux.lds.S
> +++ b/arch/powerpc/kernel/vmlinux.lds.S
> @@ -317,6 +319,16 @@ SECTIONS
> _end = . ;
> PROVIDE32
On 12/10/16 18:00, Nicholas Piggin wrote:
> Add --orphan-handling=error to final link flags. This ensures we have to
> handle all sections. This would have caught subtle breakage such as
> 7de3b27bac47da9de08409df1d69664acbb72197 at build-time.
>
> Also bring some wayward sections into the fold:
Nicholas Piggin writes:
> Add --orphan-handling=error to final link flags. This ensures we have to
> handle all sections. This would have caught subtle breakage such as
> 7de3b27bac47da9de08409df1d69664acbb72197 at build-time.
>
> Also bring some wayward sections into the fold:
> - .text.hot and
Add --orphan-handling=error to final link flags. This ensures we have to
handle all sections. This would have caught subtle breakage such as
7de3b27bac47da9de08409df1d69664acbb72197 at build-time.
Also bring some wayward sections into the fold:
- .text.hot and .text.unlikely are compiler generated