RE: [PATCH] powerpc: link error on orphan sections

2016-10-19 Thread David Laight
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

RE: [PATCH] powerpc: link error on orphan sections

2016-10-19 Thread Michael Ellerman
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: >> >>

RE: [PATCH] powerpc: link error on orphan sections

2016-10-14 Thread David Laight
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 '-- >

Re: [PATCH] powerpc: link error on orphan sections

2016-10-13 Thread Nicholas Piggin
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 > >

Re: [PATCH] powerpc: link error on orphan sections

2016-10-13 Thread Nicholas Piggin
Cc Alan Modra On Fri, 14 Oct 2016 14:27:45 +1100 Michael Ellerman wrote: > With DEBUG_INFO=y I'm seeing: > > /opt/toolchains/6/powerpc/bin/ld: error: unplaced orphan section > `.debug_addr' from `arch/powerpc/kernel/prom_init.o'. > /opt/toolchains/6/powerpc/bin/ld:

Re: [PATCH] powerpc: link error on orphan sections

2016-10-13 Thread Michael Ellerman
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 = .

Re: [PATCH] powerpc: link error on orphan sections

2016-10-13 Thread Balbir Singh
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

Re: [PATCH] powerpc: link error on orphan sections

2016-10-13 Thread Michael Ellerman
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