This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
modifying libgcc.a
- From: Navid Toosizadeh <navid_toosizadeh at yahoo dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Thu, 22 Jan 2009 10:08:06 -0800 (PST)
- Subject: modifying libgcc.a
Greetings,
For some reason, I like to modify libgcc.a after GCC is built. I intend to add new definitions for macros such as mulsi3 existing in libgcc.a. Here's what I did:
I compiled the new definition of mulsi3, made the object and then converted it to libgcc.a using "ar".
Now, to test this, I wrote a small program that multiplies two numbers. When I do "gcc test_program.c libgcc.a" it compiles and the output is correct.
But when I do : "gcc test_program.c", it throws an error complaining about undefined reference to __mulsi3, although I did put the libgcc.a in the path (and the linker doesn't complain there's no libgcc when I tried -lgcc).
Could you help e understand why the definition of __mulsi3 is not used from libgcc.a when I test "gcc test_program.c"?
Best regards
Navid