On 12/21/2010 09:43 PM, Nicholas Miell wrote:
> 
> ld.so isn't happy with that (lookups aren't based on filenames, so
> symlinks won't do anything and it will never find the library).
> 
> You need to create an empty shared library with the
> libmysqlclient_r.so.16 SONAME that has a DT_AUXILIARY entry for
> libmysqlclient.so.16.

In theory, the following should produce a usable library:

eu-readelf -s /usr/lib64/mysql/libmysqlclient_r.so.16.0.0 |
./mysql_filter.gawk > hack.c
gcc $(rpm --eval %optflags) -fPIC -shared -fno-toplevel-reorder
-Wl,-soname,libmysqlclient_r.so.16 -Wl,--filter,libmysqlclient.so.16
hack.c -o libmysqlclient_r.so.16

but in practice, it gives me:

/usr/bin/ld: libmysqlclient_r.so.16: version node not found for symbol
sf_malloc_mem_limit@@libmysqlclient_16
/usr/bin/ld: failed to set dynamic section sizes: Bad value
collect2: ld returned 1 exit status

and nobody on the internet has any idea what that error means.
#!/usr/bin/gawk -f

BEGIN { seq = 0; }

/GLOBAL/ && !/UNDEF/ { 
        size = $3;
        type = $4;
        split($8, nv, "@@");
        name = nv[1];
        version = nv[2];
        name_seq = sprintf("%s_%d", name, seq++);
                
        if (name == "_init" || name == "_fini") {
                next;
        }
        
        if (type == "FUNC") {
                printf "void %s() { }\n", name_seq;
        } else if (type == "OBJECT") {
                printf "char %s[%s];\n", name_seq, size;
        }
        printf "asm(\".symver %s, %s@@%s\");\n\n", name_seq, name, version;
}
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Reply via email to