* Fwd: [robh:dt/next 2/2] fdt_ro.c:undefined reference to `strnlen' [not found] ` <201601270337.wm7hjDwR%fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> @ 2016-01-26 20:54 ` Rob Herring 2016-01-26 21:52 ` Nicolas Pitre 0 siblings, 1 reply; 3+ messages in thread From: Rob Herring @ 2016-01-26 20:54 UTC (permalink / raw) To: Thierry Reding, David Gibson, Nicolas Pitre Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, devicetree-compiler-u79uwXL29TY76Z2rM5mHXA [-- Attachment #1: Type: text/plain, Size: 2168 bytes --] With the latest dtc I've imported to the kernel, there is a new dependency on strnlen. This is giving the ARM decompressor an error. I have a couple of ideas on how to fix it: - Move string related functions in dtc to separate file - Add lib/string.c to the decompressor build - Build the decompressor with function-sections to discard the string related functions and avoid the linker error. Also, there's probably a bit of other unused code that would get dropped. function-sections doesn't work for the kernel in general, but may for the decompressor. Nico may know. - Don't update dtc and take the rest of the day off. Opinions? Rob ---------- Forwarded message ---------- From: kbuild test robot <fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> Date: Tue, Jan 26, 2016 at 1:33 PM Subject: [robh:dt/next 2/2] fdt_ro.c:undefined reference to `strnlen' To: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> Cc: kbuild-all-JC7UmRfGjtg@public.gmane.org tree: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux dt/next head: 19b4d23a6157bec049027c435bbbf30e9af07e7f commit: 19b4d23a6157bec049027c435bbbf30e9af07e7f [2/2] scripts/dtc: Update to upstream commit b06e55c88b9b config: arm-at91_dt_defconfig (attached as .config) 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 19b4d23a6157bec049027c435bbbf30e9af07e7f # save the attached .config to linux build tree make.cross ARCH=arm All errors (new ones prefixed by >>): arch/arm/boot/compressed/fdt_ro.o: In function `fdt_stringlist_count': >> fdt_ro.c:(.text+0xaf0): undefined reference to `strnlen' arch/arm/boot/compressed/fdt_ro.o: In function `fdt_stringlist_search': fdt_ro.c:(.text+0xb6c): undefined reference to `strnlen' arch/arm/boot/compressed/fdt_ro.o: In function `fdt_stringlist_get': fdt_ro.c:(.text+0xc20): undefined reference to `strnlen' --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation [-- Attachment #2: .config.gz --] [-- Type: application/octet-stream, Size: 20787 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Fwd: [robh:dt/next 2/2] fdt_ro.c:undefined reference to `strnlen' 2016-01-26 20:54 ` Fwd: [robh:dt/next 2/2] fdt_ro.c:undefined reference to `strnlen' Rob Herring @ 2016-01-26 21:52 ` Nicolas Pitre [not found] ` <alpine.LFD.2.20.1601261636510.19789-fMhRO7WWcppj+hNMo8g0rg@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Nicolas Pitre @ 2016-01-26 21:52 UTC (permalink / raw) To: Rob Herring Cc: Thierry Reding, devicetree-compiler, linux-arm-kernel@lists.infradead.org, David Gibson On Tue, 26 Jan 2016, Rob Herring wrote: > With the latest dtc I've imported to the kernel, there is a new > dependency on strnlen. This is giving the ARM decompressor an error. I > have a couple of ideas on how to fix it: > > - Move string related functions in dtc to separate file > - Add lib/string.c to the decompressor build > - Build the decompressor with function-sections to discard the string > related functions and avoid the linker error. Also, there's probably a > bit of other unused code that would get dropped. function-sections > doesn't work for the kernel in general, but may for the decompressor. > Nico may know. Use of function-sections turns out to be more involved than I wish. And we've put many special restrictions on the decompressor already. And linking dtc (only part of it actually) into the decompressor is only for legacy stuff and I'd prefer we don't spend too much time on legacy stuff. Yadda yadda. So instead I'd simply paste a simple implementation of strnlen into arch/arm/boot/compressed/string.c and be done with it. The one in lib/string.c looks dead simple for what it's worth. > - Don't update dtc and take the rest of the day off. That is always an option. Does it really need to be updated? ;-) Nicolas ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <alpine.LFD.2.20.1601261636510.19789-fMhRO7WWcppj+hNMo8g0rg@public.gmane.org>]
* Re: Fwd: [robh:dt/next 2/2] fdt_ro.c:undefined reference to `strnlen' [not found] ` <alpine.LFD.2.20.1601261636510.19789-fMhRO7WWcppj+hNMo8g0rg@public.gmane.org> @ 2016-01-26 22:38 ` David Gibson 0 siblings, 0 replies; 3+ messages in thread From: David Gibson @ 2016-01-26 22:38 UTC (permalink / raw) To: Nicolas Pitre Cc: Rob Herring, Thierry Reding, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, devicetree-compiler-u79uwXL29TY76Z2rM5mHXA [-- Attachment #1: Type: text/plain, Size: 1667 bytes --] On Tue, Jan 26, 2016 at 04:52:18PM -0500, Nicolas Pitre wrote: > On Tue, 26 Jan 2016, Rob Herring wrote: > > > With the latest dtc I've imported to the kernel, there is a new > > dependency on strnlen. This is giving the ARM decompressor an error. I > > have a couple of ideas on how to fix it: > > > > - Move string related functions in dtc to separate file > > - Add lib/string.c to the decompressor build > > - Build the decompressor with function-sections to discard the string > > related functions and avoid the linker error. Also, there's probably a > > bit of other unused code that would get dropped. function-sections > > doesn't work for the kernel in general, but may for the decompressor. > > Nico may know. > > Use of function-sections turns out to be more involved than I wish. And > we've put many special restrictions on the decompressor already. And > linking dtc (only part of it actually) into the decompressor is only for > legacy stuff and I'd prefer we don't spend too much time on legacy > stuff. Yadda yadda. > > So instead I'd simply paste a simple implementation of strnlen into > arch/arm/boot/compressed/string.c and be done with it. The one in > lib/string.c looks dead simple for what it's worth. I think that would be my preferred option too. > > > - Don't update dtc and take the rest of the day off. > > That is always an option. Does it really need to be updated? ;-) > > > Nicolas -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-01-26 22:38 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <201601270337.wm7hjDwR%fengguang.wu@intel.com> [not found] ` <201601270337.wm7hjDwR%fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> 2016-01-26 20:54 ` Fwd: [robh:dt/next 2/2] fdt_ro.c:undefined reference to `strnlen' Rob Herring 2016-01-26 21:52 ` Nicolas Pitre [not found] ` <alpine.LFD.2.20.1601261636510.19789-fMhRO7WWcppj+hNMo8g0rg@public.gmane.org> 2016-01-26 22:38 ` David Gibson
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).