This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ARM newlib oddity


On 09/10/2011, at 12:32, Duane Ellis wrote:
> >>  I find that when I try and use time() that a syscalls file gets linked in which conflicts with the one I am supplying.
> 
> >> [snip, many examples of duplicate symbol errors].
> 
> What is happening is this:
> 
>    The NEWLIB file you are linking with defines a few extra symbols that your replacement is not defining.
>    Those other symbols are needed (for some reason) and thus, the NEWLIB supplied syscalls are being brought in.
> 
> You need a list of symbols supplied by both, the newlib-syscalls, and your syscalls.
> 
> You can create this list with the "nm" command, often the generic NM command just works, sometimes you need your build specific one, which should be:  'arm-non-eabi-nm'  {same prefix as your gcc}
> 
> Step 1:  Run NM against your syscalls.
> Step 2: Run NM against the NEWLIB library that is being brought in.
> Step 3: Compare the resulting lists.
> 
> Actually, all the duplicates are the ones that both are supplying,
> 
> you want the list of missing names.


mmm tedious :)

There are a lot of undefined symbols in libg.a though :(
[ur 17:38] ~/projects >arm-none-eabi-nm /opt/local/arm-none-eabi/lib/thumb/libg.a| grep U | sort | uniq | wc -l
     382

Is there some way to prevent it linking against libg.a? I tried temporarily moving it out of the way but there are 2 (in /opt/local/arm-none-eabi/lib/thumb and /opt/local/arm-none-eabi/lib) and even then I get complaints from libc.a..

/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_arm-none-eabi-gcc/arm-none-eabi-gcc/work/build/arm-none-eabi/thumb/newlib/libc/sys/arm/../../../../../../../gcc-4.6.1/newlib/libc/sys/arm/syscalls.c:512: multiple definition of `_fstat'
syscalls.o:/Users/darius/projects/stm32test/syscalls.c:86: first defined here
/opt/local/lib/gcc/arm-none-eabi/4.6.1/../../../../arm-none-eabi/lib/thumb/libc.a(lib_a-syscalls.o): In function `_isatty':

--
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
  -- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C







Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]