ltib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Ltib] gcc-4.1 vs gcc-4.3 and multiple "tolower"/"toupper" refs (fwd)


From: Robert P. J. Day
Subject: [Ltib] gcc-4.1 vs gcc-4.3 and multiple "tolower"/"toupper" refs (fwd)
Date: Sun, 22 Feb 2009 12:31:51 -0500 (EST)
User-agent: Alpine 2.00 (LFD 1167 2008-08-23)

  the following is something i sent earlier to the busybox mailing
list, but i'm wondering if this might be a better forum.  i'm using
the gcc-4.3 coldfire toolchain from codesourcery, and trying to build
busybox-1.7.2 and, for whatever reason, rather than compiling
invocations to the C routines toupper() and tolower() as undefined
references to be resolved at runtime, it appears to build them
directly into the object files as inlines with external linkage so
that, when the time comes to create the final busybox executable, the
link fails as you can see below.

  has anyone else seen anything like this?  thanks.

rday

p.s.  the gcc-4.1 based toolchain works just fine.

--

---------- Forwarded message ----------
Date: Sun, 22 Feb 2009 07:19:01 -0500
From: Robert P. J. Day <address@hidden>
To: address@hidden
Subject: gcc-4.1 vs gcc-4.3 and multiple "tolower"/"toupper" refs

 as a followup to an earlier post (which i can't continue the thread on since
i'm posting this from a browser, sorry), here's the error i'm getting when i use
a gcc-4.3 coldfire toolchain to compile busybox-1.7.2:


Failed: m68k-linux-gnu-gcc -o busybox_unstripped -Wl,-Map
-Wl,busybox_unstripped.map -Wl,--warn-common -Wl,--sort-common -Wl,--start-group
applets/built-in.o archival/lib.a archival/libunarchive/lib.a
console-tools/lib.a coreutils/lib.a coreutils/libcoreutils/lib.a
debianutils/lib.a e2fsprogs/lib.a editors/lib.a findutils/lib.a init/lib.a
ipsvd/lib.a libbb/lib.a libpwdgrp/lib.a loginutils/lib.a miscutils/lib.a
modutils/lib.a networking/lib.a networking/libiproute/lib.a
networking/udhcp/lib.a procps/lib.a runit/lib.a selinux/lib.a shell/lib.a
sysklogd/lib.a util-linux/lib.a archival/built-in.o
archival/libunarchive/built-in.o console-tools/built-in.o coreutils/built-in.o
coreutils/libcoreutils/built-in.o debianutils/built-in.o e2fsprogs/built-in.o
editors/built-in.o findutils/built-in.o init/built-in.o ipsvd/built-in.o
libbb/built-in.o libpwdgrp/built-in.o loginutils/built-in.o miscutils/built-in.o
modutils/built-in.o networking/built-in.o networking/libiproute/built-in.o
networking/udhcp/built-in.o procps/built-in.o runit/built-in.o
selinux/built-in.o shell/built-in.o sysklogd/built-in.o util-linux/built-in.o
-Wl,--end-group -Wl,--start-group -Wl,--start-group -lcrypt -lm -Wl,--end-group
-Wl,--end-group
init/lib.a(init.o): In function `toupper':
init.c:(.text.toupper+0x0): multiple definition of `toupper'
applets/built-in.o:(.text.toupper+0x0): first defined here
init/lib.a(init.o): In function `tolower':
init.c:(.text.tolower+0x0): multiple definition of `tolower'
applets/built-in.o:(.text.tolower+0x0): first defined here
... etc etc lots more of these, all related to tolower and toupper ...

 ok, let's see what's happening here:

$ nm applets/built-in.o
...
00000000 T tolower
00000000 T toupper
...

 ok, so it appears that applets/built-in.o does indeed define those text
symbols.  and:


$ nm init/init.o
...
00000000 T tolower
00000000 T toupper
...


 but that's using the newer gcc-4.3 toolchain.  if i clean and rebuild using the
earlier gcc-4.1 coldfile toolchain, the build works and:

$ nm applets/built-in.o
... no definition of tolower or toupper ...

$ nm init/init.o
... here either ...

 i'm confused ... why should upgrading my toolchain suddenly result in the
definition of text symbols "tolower" and "toupper" in various object files,
causing a link error?

rday





reply via email to

[Prev in Thread] Current Thread [Next in Thread]