On 10/29/10 08:17 AM, Piotr Jasiukajtis wrote:

It's not working since b135.
....

Build 135:

ldd libapr-0.so.0.9.17
./libapr-0.so.0.9.17: unknown capability: 0     libsendfile.so.1 =>
   /lib/libsendfile.so.1
         librt.so.1 =>     /lib/librt.so.1
         .....

If you have no idea how you came by this file, or who built it, then
I think your only recourse is to edit the file into submission.

The ELF file is very suspicious, as there are so many errors generated
from elfdump().  Prior to 135, capabilities processing was very simple.
But with 135 we added symbol capabilities (6918143).  This expanded on
the capabilities definitions, and what we can now do with them.  It seems
that prior to 135, our simple capabilities processing was not adversely
affected by the information in this file, but since 135 we are falling foul
of the invalid information in the file.

You could edit the files PT_SUNWCAP to point to a "null" series of bytes.
This can be done by pointing to the NULL program header entry.  So try
this:

% elfedit  libapr-0.so.0.9.17
> phdr:p_offset PT_SUNWCAP 0xb4
...
> phdr:p_vaddr PT_SUNWCAP 0xb4
...
> phdr:p_filesz PT_SUNWCAP 0x10
...
> phdr:p_memsz PT_SUNWCAP 0x10
...
> write
> quit

You'll still get a complaint from elfdump(), because we assume that if a
PT_SUNWCAP exists, there should also be an underlying .SUNW_cap section.

% elfdump -H libapr-0.so.0.9.17
libapr-0.so.0.9.17: PT_SUNWCAP header has no associated section

But, using ldd() or executing the library gets past the capabilities error,

% ldd libapr-0.so.0.9.17
        libsendfile.so.1 =>   /lib/libsendfile.so.1
        librt.so.1 =>         /lib/librt.so.1
        libm.so.2 =>  /lib/libm.so.2
        libsocket.so.1 =>     /lib/libsocket.so.1
        libnsl.so.1 =>        /lib/libnsl.so.1
        libresolv.so.2 =>     /lib/libresolv.so.2
        libpthread.so.1 =>    /lib/libpthread.so.1
        libc.so.1 =>  /lib/libc.so.1
        libmp.so.2 =>         /lib/libmp.so.2
        libmd.so.1 =>         /lib/libmd.so.1

Given how many error diagnostics are generated from elfdump() for this file,
I'd still be a little suspicious of its use.  I'd try and find a better copy.

If you can find how the file was created then please pass use the information
as it would be enlightening to get to the bottom of this.

--

Rod.
_______________________________________________
tools-linking mailing list
[email protected]

Reply via email to