From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Mon, 14 Mar 2016 12:14:14 -0600 Subject: [U-Boot] buildman: arm: undefined reference to `__aeabi_ldivmod' In-Reply-To: References: Message-ID: <56E6FF76.6040706@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/14/2016 11:32 AM, Jagan Teki wrote: > Hi Simon, > > On 12 March 2016 at 06:02, Simon Glass wrote: >> +Stephen >> >> Hi Jagan, >> >> On 11 March 2016 at 01:00, Jagan Teki wrote: >>> >>> Hi, >>> >>> 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/ > > Still the same issue. If I start with v2016.03, and apply the following patch, I can reproduce this issue when building venice2 (a 32-bit Tegra build) but not p2371-2180 (a 64-bit Tegra build): diff --git a/arch/arm/mach-tegra/board2.c b/arch/arm/mach-tegra/board2.c index ac274e17e8bd..9b1a4112a0b1 100644 --- a/arch/arm/mach-tegra/board2.c +++ b/arch/arm/mach-tegra/board2.c @@ -235,9 +235,13 @@ __weak void pin_mux_mmc(void) { } +uint64_t a = 200; +uint64_t b = 5; + /* this is a weak define that we are overriding */ int board_mmc_init(bd_t *bd) { + printf("a/b = %llu\n", a / b); debug("%s called\n", __func__); /* Enable muxes, etc. for SDMMC controllers */ However, if I apply the patch Simon mentioned above, the problem is fixed. Are you sure you applied that patch correctly?