modifying libgcc.a
Navid Toosizadeh
navid_toosizadeh@yahoo.com
Thu Jan 22 18:08:00 GMT 2009
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
More information about the Gcc-help
mailing list