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]

ABI compatibility issue with SUN forte compiler


I have a object file, which was compiled with SUN's Forte compiler v.5.0.
There are certain API function calls provided in that object file which I'm
using in another program. I'm using the GNU compiler v.3.2 to compile my
sample program. During the linking phase, I get receive undefined symbol
errors for the function calls. 

After reading some of the documentation and some playing around, I believe
my issue has to do with name mangling due to two compilers' implementation
of their application binary interface (API)? Is that correct?

I have currently two ways of getting around this problem:
1. Simply use the SUN forte compiler.
2. Create a mapfile for ld(1) to use. I used nm(1) to grab the explicit
values from the provided object 
    file and then mapped my function's symbols to those values.

I'd like to pursue option #2 further, because I don't directly own the
source code which produced the original object file. Yet, I'm still looking
for a more eligant way to resolve the symbol resolution. Is there a way to
influence the symbol generated for an object by certain directives within
the source code? Perhaps some sort of "#pragma" or some asm call?

Thanks,
Jon Miller
Unix Systems Engineer



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