This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC 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]

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



      


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