Xrandr

Alexander Gottwald Alexander.Gottwald@informatik.tu-chemnitz.de
Wed Aug 1 07:56:00 GMT 2001


On Wed, 1 Aug 2001, Alexander Gottwald wrote:

> On Wed, 1 Aug 2001, Suhaib Siddiqi wrote:
> 
> 
> The problems seem to come from the C++ objects. I now filter everything that
> has a "(" or ":" in the name and the typeinfos. It works for libGLU. 
> I also checked against the orignal libname-def.cpp to see if something was
> missing or added.
> 
> Some export defines use the syntax "name @ number". What does this mean. 
> Also some librarynames changed from lower to uppercase and the libraryname
> for libX11 changed from libX11 to X11.
> 

I tested a bit and found that 
nm --demangle --defined-only *.o | sed -n 's/^.* T //p' is not enough. Some
exports are in other sections. I found two ways to get the exports to the def
file. First is the filter all demangled C++ and type names, which is very 
insecure since I could only fix the strings I already found in the current 
export nm-list. Maybe a newer version of binutils will change the names and
the filter is broken again. The second way is to not use --demangle and fix
the leading underscore with a sed script. This is less insecure, but is still
bad since a change in the binary names will break the script again.

1. nm --demangle --defined-only *.o | sed -n 's/^.* [A-Z] //p' | \
        sed '/^typeinfo name\|^typeinfo for\|^vtable for\|^constrution \
        vtable for\|^VTT\|:\|)/ d'
2.  nm --defined-only *.o | sed -n 's/^.* [A-Z] _//p'

the [A-Z] names all exported sections eg. code, bss, common, data and much
more (see info binutils for the exact meanings)

I added the first to the patch. This time a checked that lib and programs 
compile but have not completely checked runtime of all binaries.

bye
    ago
-- 
Alexander.Gottwald@s1999.tu-chemnitz.de
http://www.gotti.org
phone: +49 3725 3498080     mobile: +49 172 7854017


More information about the Cygwin-xfree mailing list