Yaakov (Cygwin/X)
2013-03-31 03:32:08 UTC
The following code links behaves on i686 and x86_64:
/* from gcc config/weakref.m4, used in libitm */
extern void fNotToBeFound(void) __attribute__((weak));
int main ()
{
if (fNotToBeFound)
return 1;
else
return 0;
}
On i686 with gcc-4.5.3, this links and returns 0. On x86_64 with
gcc-4.8.0, this produces an error:
/tmp/ccPWiz9s.o:test.c:(.rdata$.refptr.fNotToBeFound[.refptr.fNotToBeFound]+0x0):
undefined reference to `fNotToBeFound'
collect2: error: ld returned 1 exit status
--
Yaakov
/* from gcc config/weakref.m4, used in libitm */
extern void fNotToBeFound(void) __attribute__((weak));
int main ()
{
if (fNotToBeFound)
return 1;
else
return 0;
}
On i686 with gcc-4.5.3, this links and returns 0. On x86_64 with
gcc-4.8.0, this produces an error:
/tmp/ccPWiz9s.o:test.c:(.rdata$.refptr.fNotToBeFound[.refptr.fNotToBeFound]+0x0):
undefined reference to `fNotToBeFound'
collect2: error: ld returned 1 exit status
--
Yaakov