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] |
On Aug 19 11:01, Hale Wang wrote: > Hi Corinna, > > I have done several test locally and found that maybe we can't just leave this wrapper blank. If we do this, the arm-none-eabi-gcc will report "undefined reference to `strlen` ". > > The reason is that the libc/machine/arm/lib_a-strlen.o will always be generated even if we don't define this function, and this *.o will replace the default libc/string/lib_a-strlen.o. > > The details are describled as following: > 1. The libc.a is generated by the following scripts: > =================================== > for i in string/lib.a machine/lib.a; do \ > arm-none-eabi-ar x ../$i; \ > done; \ > arm-none-eabi-ar rc ../libc.a *.o > arm-none-eabi-ranlib libc.a > =================================== > 2. Firstly, lib_a-strlen.o is generated by the script ' arm-none-eabi-ar x string/lib.a '. And the default strlen() function is defined in this object file. > 3. Then, another lib_a-strlen.o is generated by the script ' arm-none-eabi-ar x machine/lib.a '. This file will replace the previous object file immediately because they own the same name. And no function is defined in this object file. > 4. Finally, strlen() is not defined in the libc.a generated. This will cause the link failure. > > So we may need to turn back to our previous patch. Hmm, I'm wondering if that's really the right thing to do. Jeff? Corinna -- Corinna Vinschen Cygwin Maintainer Red Hat
Attachment:
pgpZetnCa6TWw.pgp
Description: PGP signature
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |