In creating a static object is it possible to rename the symbols at compile time (without changing the code) in a cross platform way? I have recently had objcopy recommended, but linux is not the only target platform it must also work on a mac. I am compiling using gcc, so I was hoping that there was a gcc option of some sort.
I have heard about .def files, but this may have been misleading as the information about them that I have found seems to be for windows.
Edit: I'm trying to change the name of C and Fortran functions, specifically pre-pending them with the word "wrap" in order to avoid symbol conflicts at link time.