This is the mail archive of the mailing list for the binutils project.

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

RE: Linking GCC obgject files with Intel FORTRAN for linux

Intel 5.0 Compiler relies on .gdt section for correct C++
exception handling. libintrins is a Fortran library written 
in C++. Looks to me you are using gcc to link the library.
I do not know why beta works unless you were using icc at the final 
link state. Even using gcc as link driver works, the C++ exception
handling mechanism will not be functioning. I guess
you do not care for this case since fortran does not throw 
exceptions, nor it knows how to handle exception if its library throws. 

To fix the problem under gcc, you can either add the file as 
one object and link it into your finial application (it will be treated 
as linker script), or define this symbol through either assembly file 
or linker command. However, I would suggest stick with icc as linker driver.

Intel 6.0 compiler is using a different object model for C++, and 
objects produced from icc and gcc should be able to mix and match 
(with some constrains, like same set of headers are used). 

Yinwei Zhang
Intel Compiler Lab

-----Original Message-----
From: Narayanaswamy, Ravi 
Sent: Friday, September 28, 2001 5:11 PM
To: Zhang, Yingwei
Cc: Rao, Suresh K
Subject: FW: Linking GCC obgject files with Intel FORTRAN for linux

   Is this your work or Milind's group.

-----Original Message-----
From: W Bauske []
Sent: Friday, September 28, 2001 5:09 PM
Subject: Linking GCC obgject files with Intel FORTRAN for linux


Hopefully someone can help me understand what I've done wrong.
I have an application that uses C for the main program and calls
FORTRAN subroutines to do the real work. I had been using the
Intel FORTRAN Beta compiler without difficulty. Just had to add
the Intel libraries to the link libs when I linked. Now that Intel
have released the real compiler, the links fail with missing

/z/home/intel.compilers/ undefined
reference to
/z/home/intel.compilers/ undefined
reference to
collect2: ld returned 1 exit status

I found a file in the Intel directories called

/* static char cvs_id[] = "$Id:,v 1.1 2001/02/16 09:16:06 grigory
Exp $"; */
/* for ICC C++ exception handling */
    .data1 :
        *(.data1)                       /* Original .data1 section */

        PROVIDE(__gdt_firstone = .);    /* _GDT *__gdt_firstone */


        PROVIDE(__gdt_lastone = .);     /* _GDT *__gdt_lastone */


This appears to me to be some sort of linker directives where they provide
symbols for the front and back of the thing called a 'gdt'. If someone has
an idea about what Intel did and how to translate it to ld type info, please
let me know. Perhap a snippet of asm/directives could do the same thing?


Wes Bauske (please reply directly to me at

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