On Sat, 22 Oct 2016 15:53:03 +0800 kbuild test robot <fengguang...@intel.com> wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git test > head: 8a4fd950c8ac67ad98135db4107ed6cae412606c > commit: b09fa228be430ba2745102ac8e668ad869320bd9 [24/28] powerpc: link > warning for orphan sections > config: powerpc-ps3_defconfig (attached as .config) > compiler: powerpc64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705 > reproduce: > wget > https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross > -O ~/bin/make.cross > chmod +x ~/bin/make.cross > git checkout b09fa228be430ba2745102ac8e668ad869320bd9 > # save the attached .config to linux build tree > make.cross ARCH=powerpc > > All warnings (new ones prefixed by >>): > > >> powerpc64-linux-gnu-ld: warning: orphan section `.text.save.restore' from > >> `arch/powerpc/lib/built-in.o' being placed in section `.text.save.restore'. > >> powerpc64-linux-gnu-ld: warning: orphan section `.text.save.restore' from > >> `arch/powerpc/lib/built-in.o' being placed in section `.text.save.restore'. > >> powerpc64-linux-gnu-ld: warning: orphan section `.text.save.restore' from > >> `arch/powerpc/lib/built-in.o' being placed in section > >> `.text.save.restore'. On powerpc64, ld creates these for us when required, and puts them into section ".sfpr". So we can avoid compiling in lib/crtsavres.S entirely there, I think. When I do that, I see the save/restore functions getting located at 0x8000. That actually works with my .linker_stub_catch patch, but there is probably no good reason to put those sections there, so I'll change .sfpr in the linker script to be near the end of the main text output section. Thanks, Nick