From: M. R. B. <mr...@0x...> - 2001-10-05 14:43:44
|
.hidden doesn't work with libstdc++. For example, if I compile and link a simple C++ program using unsigned integer division: #include <stdio.h> int main(void) { unsigned int a, b, c; printf("Hello, world\n"); a = 4; b = 4; c = a / b; return --c; } I get an undefined reference to __udivsi3_i4 at runtime when using the default shared libraries. If I back out the portion of kaz's patch that enables hidden, it executes normally. Can someone point me to a testcase where .hidden actually does something useful? So far, I've only gotten this with libstdc++ and by looking at the specs file, all normal apps/libs link with -libgcc unless -shared or -shared-libgcc are explicitly specified. Oh yeah, one more note about the .hidden hack, if it's meant to "hide" routines for shared libraries, it's implementors seemed to forget that the majority of libgcc functinality is in gcc/libgcc2.c, and none of those routines are "hidden". There's gotta be a better work around than the hidden hack, esp. since SH is the only arch that uses it. On an unrelated note, has anyone had any problems including the std C++ headers in programs? I get a bunch of `undefined' errors from the include files in bits/. I'm using the tools provided at ftp.m17n.org/pub/super-h/testing (binutils-2.11.2 + patches, gcc-3.0.1 + patches, glibc-2.2.4 + patches). M. R. |