public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Build error on strcmp()
Date: Tue, 14 Aug 2007 20:29:18 +0900	[thread overview]
Message-ID: <46C1920E.1050806@necel.com> (raw)

> commit 8092fef4c29b395958bb649647da7e3775731517
> Author: Martin Krause <Martin.Krause@tqs.de>
> Date:   Tue Dec 12 14:26:01 2006 +0100
> 
>     Add functions to list of exported functions
> 
>     Additionally export the following fuctions (to make trab_config build again):
>     - simple_strtol()
>     - strcmp()
> 
>     Also bump the ABI version to reflect this change
> 
>     Signed-off-by: Martin Krause <martin.krause@tqs.de>

This breaks my MIPS build:

common/libcommon.a(exports.o)(.text+0xdc): In function `jumptable_init':
/home/skuribay/bootloader/u-boot/u-boot.git/common/exports.c:32: undefined reference to `strcmp'
make: *** [u-boot] Error 1

We MIPS have arch-specific strcmp defined in <asm/string.h>.
Since strcmp is inlined, we couldn't refer them by function pointer.
The nm of lib_generic/string.o is like this:

             U _gp_disp
             U malloc
    00000610 T memchr
    00000520 T memcmp
    00000474 T memcpy
    000004a4 T memmove
    00000448 T memset
    00000000 T strcat
    00000084 T strchr
    00000198 T strdup
    000000c0 T strlen
    00000038 T strncat
    0000015c T strnlen
    00000270 T strpbrk
    000000e4 T strrchr
    00000380 T strsep
    00000210 T strspn
    00000550 T strstr
    000003ec T strswab
    000002c0 T strtok
    00000004 C ___strtok

I think all architectures which have __HAVE_ARCH_STRCMP defined will
encounter this error. What is the proper workaround?


Thanks,

    Shinya Kuribayashi

             reply	other threads:[~2007-08-14 11:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-14 11:29 Shinya Kuribayashi [this message]
2007-08-20 12:07 ` [U-Boot-Users] Build error on strcmp() Martin Krause
2007-08-21  3:33   ` Shinya Kuribayashi

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=46C1920E.1050806@necel.com \
    --to=shinya.kuribayashi@necel.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox