This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc 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]

Re: [Dri-devel] Re: OpenGL and the LinuxThreads pthread_descr structure



> create either linker script like:
> { global: gl*; DRI*; XF86DRI*; local: *; }
> or
> GL_1.0 { global: gl*; DRI*; XF86DRI*; local: *; }
> then pass this file to linker at libGL.so link time, like
> gcc -shared ... -Wl,--version-script,libGL.map ...
> 
> This way you get rid of most R_386_PC32 relocations, etc.
> If libGL.so is compiled with -fpic, you should also in headers prototyping
> the internal functions add __attribute__((visibility("hidden")))
> to the prototypes, so that gcc can avoid setting up pic pointers
> when calling the internal functions. I think most of the functions are
> prototyped using macros, so it wouldn't be much work.


OK, trying the __attribute__ stuff doesn't seem to work for me:


f12.h:3: warning: `visibility' attribute directive ignored
f12.h:4: warning: `visibility' attribute directive ignored


Where f12.h looks like:

---------------------------
#define INTERNAL __attribute__((visibility("hidden")))

extern void foo1( void ) INTERNAL;
extern void foo2( void ) INTERNAL;
extern void glfoo2( void );
---------------------------


And gcc -v gives:

gcc version 2.96 20000731 (Mandrake Linux 8.1 2.96-0.62mdk)

Is this a versions thing or am I screwing up elsewhere?

Keith


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