arm-none-eabi-strip libc.a strips down libg.a as well. Why?

Asked by Tamas Kleiber

Hello,

 I am using Rlease GCC ARM Embedded 4.7 update 4 under linux (ubuntu 14.04). In particular this package: https://launchpad.net/gcc-arm-embedded/4.7/4.7-2014-q2-update/+download/gcc-arm-none-eabi-4_7-2014q2-20140408-linux.tar.bz2

When I build newlib for every architecture I get a libg.a and a libc.a. When I try to strip down libc.a with the following commands:

arm-none-eabi-strip libc.a

or

arm-none-eabi-strip -s libc.a

or whatever, the strip tool strips down both libc.a and libg.a. If in the same folder I call arm-none-eabi-strip -s libm.a, only libm.a is stripped down.

Do you know what is happening here? Why does the strip tool think that g=c or"libc.a" is the same as if I write "libg.a"?

The files are not symbolic links...

Is this is a bug in the strip tool?

Thanks in advance for your kind response.

Best regards,
 Tamas

_

Question information

Language:
English Edit question
Status:
Solved
For:
GNU Arm Embedded Toolchain Edit question
Assignee:
No assignee Edit question
Solved by:
Terry Guo
Solved:
Last query:
Last reply:
Revision history for this message
Best Terry Guo (terry.guo) said :
#1

If you check inode information, they are essentially same files:

terguo01@terry-pc01:lib$ ls -lih libc.a libg.a
20335117 -rw-r--r-- 2 terguo01 terguo01 1005K Nov 26 02:33 libc.a
20335117 -rw-r--r-- 2 terguo01 terguo01 1005K Nov 26 02:33 libg.a

Possible reason that not using symbol link is because windows doesn't support symbol link.

Revision history for this message
Tamas Kleiber (kleiber-tamas) said :
#2

Thanks Terry Guo, that solved my question.

Revision history for this message
Tamas Kleiber (kleiber-tamas) said :
#3

Wow... that is super weird... I thought that libg.a is supposed to be debug version while libc.a is non-debug stripped version of the same library.

Thanks for the clarification!

Revision history for this message
Terry Guo (terry.guo) said :
#4

In fact I personally think your understanding is correct that libg.a is debug version of libc.a. Long time ago, I noticed this issue but I don't get chance to figure out the reason. I just live with it. I am sorry. If anybody find any issue caused by this, please report.

Revision history for this message
Tamas Kleiber (kleiber-tamas) said :
#5

I will try to ask about this on the newlib mailing list. Originally I thought that the symptoms are related to the arm-none-eabi-strip tool, but it is clearly not the case. I will come back with the results if I get any response from them.