[csw-maintainers] amds64/libz.so.1 problem on unstable10x

Rafael Ostertag raos at opencsw.org
Thu Jun 14 19:54:27 CEST 2012


On Thu, Jun 14, 2012 at 04:56:32PM +0100, Maciej (Matchek) Blizi??ski wrote:
> Heads up: A serious issue with the libz library was reported by raos
> yesterday. The issue was linking related. Under the risk of being
> excommunicated, I've rebuilt the library with GCC and using the GNU
> linker, pushed to unstable, and installed on unstable10x.
> 
> Let's talk about a proper fix. Rafael, could you repeat your
> investigation results so far?

while building libz for amd64, the compiler emitted code that cannot be
relocated properly when the library is mapped into the address space of the
executable, resulting in error messages like

 ld.so.1: conftest: fatal: relocation error: R_AMD64_32: file /opt/csw/lib/amd64/libz.so.1: symbol (unknown): value 0xfffffd7fff040000 does not fit

Inspecting libz using elfdump(1) (`elfdump -r`) shows many

 /opt/csw/lib/amd64/libz.so.1: bad relocation entry: R_AMD64_32: relocation requires symbol

messages. Also, the relocation section has many

    R_AMD64_PC32                         0xb9ae 0xfffffffffffffffc  .rela.text     <symbolname>

where the value (addend) 0xfffffffffffffffc is out of bounds, since
R_AMD64_PC32 is 32bit (see [1]; please correct me if I'm wrong on this), thus
resulting in the dynamic linker error message

 ... value 0x<64bit value> does not fit

Long story short, libz on amd64 is fubar.o


If that's ok, I can dig into the problem tonight...


cheers
rafi


[1] http://www.x86-64.org/documentation/abi.pdf

> 
> Maciej
> _______________________________________________
> maintainers mailing list
> maintainers at lists.opencsw.org
> https://lists.opencsw.org/mailman/listinfo/maintainers
> .:: This mailing list's archive is public. ::.
> 


More information about the maintainers mailing list