cmake cvs and runtime path resolution

Brad King brad.king at
Wed Feb 27 22:33:04 CET 2008

Brad King wrote:
> Thiago Macieira wrote:
>> You could also simply read the ELF header from inside cmake. That would 
>> make the process A LOT faster. Unlike chrpath, which actually modifies 
>> the target executable, this is simply reading (load header, load 
>> sections, find the DYNAMIC section, find DT_SONAME in there, then read 
>> the string at the address on the STRTAB section). /usr/include/elf.h is 
>> present in all platforms.
> I'm actually working on that right now :)

I've just committed changes to parse ELF files and read the SONAME 
directly.  The implementation supports both 32-bit and 64-bit ELF files. 
  I also implemented byte swapping so that MSB files can be read on LSB 
host platforms and vice versa.

Shared library ordering should now always use the real soname for shared 
libraries on ELF target platforms.


More information about the Kde-buildsystem mailing list