From: Chris Ruehl <chris.ruehl@gtsys.com.hk>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] JFFS2: Fix undefined reference to `__aeabi_uldivmod' error
Date: Sun, 27 Oct 2013 17:46:30 +0800 [thread overview]
Message-ID: <526CE0F6.8020408@gtsys.com.hk> (raw)
In-Reply-To: <1382865251-17302-1-git-send-email-wd@denx.de>
Wolfgang,
GOOD Catch!
On Sunday, October 27, 2013 05:14 PM, Wolfgang Denk wrote:
> Building boards that have JFFS2 support enabled will fail when using
> U-Boot's builtin GCC library, for example like this:
>
> USE_PRIVATE_LIBGCC=yes ./MAKEALL omap3_evm
> ...
> fs/jffs2/libjffs2.o: In function `jffs2_1pass_build_lists':
> fs/jffs2/jffs2_1pass.c:1441: undefined reference to `__aeabi_uldivmod'
>
> This is caused by a u64 / u32 division in jffs2_1pass.c; the problem
> can be avoided by using do_div() instead of plain division.
>
> Signed-off-by: Wolfgang Denk<wd@denx.de>
> Reported-by: Chris Ruehl<chris.ruehl@gtsys.com.hk>
> Cc: Chris Ruehl<chris.ruehl@gtsys.com.hk>
>
> ---
> fs/jffs2/jffs2_1pass.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/jffs2/jffs2_1pass.c b/fs/jffs2/jffs2_1pass.c
> index c856983..a7dbe79 100644
> --- a/fs/jffs2/jffs2_1pass.c
> +++ b/fs/jffs2/jffs2_1pass.c
> @@ -1438,7 +1438,7 @@ jffs2_1pass_build_lists(struct part_info * part)
> {
> struct b_lists *pL;
> struct jffs2_unknown_node *node;
> - u32 nr_sectors = part->size/part->sector_size;
> + u32 nr_sectors = do_div(part->size, part->sector_size);
> u32 i;
> u32 counter4 = 0;
> u32 counterF = 0;
next prev parent reply other threads:[~2013-10-27 9:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-22 12:13 [U-Boot] v2013.10 failed build with jffs2 cmd Wolfgang Denk
2013-10-23 0:36 ` Chris Ruehl
2013-10-23 1:44 ` Chris Ruehl
2013-10-27 9:14 ` [U-Boot] [PATCH] JFFS2: Fix undefined reference to `__aeabi_uldivmod' error Wolfgang Denk
2013-10-27 9:46 ` Chris Ruehl [this message]
2013-10-27 10:01 ` Wolfgang Denk
2013-10-27 23:50 ` Chris Ruehl
2013-10-27 18:17 ` Daniel Schwierzeck
2013-10-27 20:07 ` Wolfgang Denk
2013-10-28 2:22 ` Chris Ruehl
2013-11-22 4:55 ` Gupta, Pekon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=526CE0F6.8020408@gtsys.com.hk \
--to=chris.ruehl@gtsys.com.hk \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.