From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Thu, 17 Mar 2016 10:18:09 -0600 Subject: [U-Boot] buildman: arm: undefined reference to `__aeabi_ldivmod' In-Reply-To: References: <56E6FF76.6040706@wwwdotorg.org> <56E97D0B.1040005@wwwdotorg.org> Message-ID: <56EAD8C1.9080707@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 03/16/2016 11:48 PM, Jagan Teki wrote: > On 16 March 2016 at 21:04, Stephen Warren wrote: >> On 03/16/2016 08:27 AM, Jagan Teki wrote: >>> On 14 March 2016 at 23:44, Stephen Warren wrote: >>>> On 03/14/2016 11:32 AM, Jagan Teki wrote: >>>>> On 12 March 2016 at 06:02, Simon Glass wrote: >>>>>> On 11 March 2016 at 01:00, Jagan Teki wrote: >>>>>>> Did anyone encounter this issue? please let me know for any inputs. >>>>>>> >>>>>>> arm: + venice2 >>>>>>> +drivers/mtd/spi-nor/built-in.o: In function `spi_nor_write': >>>>>>> +build/../drivers/mtd/spi-nor/spi-nor.c:585: undefined reference to >>>>>>> `__aeabi_ldivmod' >>>>>>> +arm-unknown-linux-gnueabi-ld.bfd: BFD (GNU Binutils) 2.24 assertion >>>>>>> fail /home/tony/buildall/src/binutils/bfd/elf32-arm.c:7696 >>>>>>> +arm-unknown-linux-gnueabi-ld.bfd: error: required section '.rel.plt' >>>>>>> not found in the linker script >>>>>>> +arm-unknown-linux-gnueabi-ld.bfd: final link failed: Invalid >>>>>>> operation >>>>>>> +make[1]: *** [u-boot] Error 1 >>>>>>> +make: *** [sub-make] Error 2 >>>>>> >>>>>> Are you using 64-bit division? Tegra uses the private libgcc. This >>>>>> patch might help: >>>>> >>>>> Yes, I'm using 64-bit. >>>>> >>>>>> http://patchwork.ozlabs.org/patch/592628/ ... >> Perhaps you could share the local patches that are triggering the problem? ... > This is the spi-nor.c file > http://git.denx.de/?p=u-boot/u-boot-spi.git;a=blob;f=drivers/mtd/spi-nor/spi-nor.c;h=6166b62e595c6620bd3407788d705168e0bd6b2c;hb=refs/heads/spi-nor-test I can reproduce this when building venice2 in u-boot-spi/spi-nor-test, and indeed the patch that Simon linked to doesn't help. That's because Simon's patch implements __aeabi_uldivmod whereas the linker failure is due to __aeabi_ldivmod (without the u). Simon, is it easy for you to bring in __aeabi_ldivmod from the same place? FWIW, I hacked _uldivmod.S to provide a dummy symbol for __aeabi_ldivmod and the link succeeded, so I think that's currently the only missing symbol. I only tested the venice2 build though.