Detect and Compile?

Alexander Monakov amonakov at ispras.ru
Tue Mar 12 01:21:37 PDT 2013



On Tue, 12 Mar 2013, Shuang He wrote:

> Hi,
>     Just realized that apitrace may affect code path of 3D application, since
> 3D application may try different ways to probe for supported GL extension. One
> way would be dlsym()

Such application would be ignoring the OpenGL ABI.

In any case, such application must consult extension strings before actually
using the functions it obtained via dlsym, otherwise it has no possible way of
knowing if they will actually work.

But yes, the world is not perfect, and there are applications that probe libGL
with dlsym and also ignore extension strings.

>     Is it possible to make apitrace probe system for supported GL extensions,
> and only export those symbols when building?

Yes, but doing such decision at build time is far from ideal since it will
make the result different depending on the installed libGL.  A better approach
would be to implement visibility limiting at run time, either using
IFUNC-based redirection, or with an LD_AUDIT helper.

Alexander


More information about the apitrace mailing list