When building the Mesa library with the gcc bundled with Solaris,
I get a fatal ld error of the form:

ld: fatal: relocation error: R_386_GOTOFF: file indirect_init.o: symbol 
__indirect_glNewList: relocation must bind locally

Googling for this error suggests that the fix in other projects has been
to disable gcc's symbol visibility attributes on Solaris, but that doesn't
seem to help here.   Any suggestions for how to fix?

The header file defines the function as:
  #    define HIDDEN  __attribute__((visibility("hidden")))
[...]
extern HIDDEN void __indirect_glNewList(GLuint list, GLenum mode);

The definition in indirect.c looks like:
void
__indirect_glNewList(GLuint list, GLenum mode)
{
[...]
}

The reference in indirect_init.c uses it as a function pointer, not
a direct call:

    glAPI->NewList = __indirect_glNewList;

% elfdump indirect.o | grep glNewList:

       [34]  0x00000720 0x00000068  FUNC GLOB  D    0 .text 
__indirect_glNewList

% elfdump build_32/Mesa-6.5.1/src/glx/x11/indirect_init.o | grep glNewList
       [11]  0x00000000 0x00000000  NOTY GLOB  D    0 UNDEF 
__indirect_glNewList
   R_386_GOTOFF                   0x5a             .rel.text 
__indirect_glNewList

Any suggestions?   Anyone able to translate the error message into something
understandable by those without the ELF spec memorized?

-- 
        -Alan Coopersmith-           alan.coopersmith at sun.com
         Sun Microsystems, Inc. - X Window System Engineering

Reply via email to