RH AS2.1 Statically linked application gives reloc error in RH9.0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



All,

   I have a statically linked application which dynamically loads the
library. This application compiled in AS2.1 and runs fine with AS2.1 and
RH 8.0. But in RH 9.0 it gives relocation error.

AS2.1 uses GCC 2.96.
RH9.0 uses GCC 3.2.2.

Any ideas/comments?

Thanks

--T. Muthu Mohan.

 

-----[ mystatic.cpp ]----------------

#include <iostream.h>
#include <dlfcn.h>

#define LIBNAME "libz.so"

int main()
{
        void *pHandle = dlopen(LIBNAME, RTLD_NOW);
        cout << "After Loading " << LIBNAME << endl << dlerror() <<
endl;
        if (pHandle) {
                cout << "Loaded Successfully!" << endl;
                dlclose(pHandle);
                cout << "Unloaded Successfully!" << endl;
        }
        return 0;
}

-----[ output in AS2.1 & 8.0 ] --------------------

# g++ -static mystatic.cpp  -ldl
# ./a.out
After Loading libz.so
(null)
Loaded Successfully!
Unloaded Successfully!

----[ output in RH 9.0 ] --------------------------
# ./a.out
After Loading libz.so
/lib/tls/libc.so.6: unexpected reloc type 0x0e


-- 
Shrike-list mailing list
Shrike-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/shrike-list

[Index of Archives]     [Fedora Users]     [Centos Users]     [Kernel Development]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat Phoebe Beta]     [Yosemite Forum]     [Fedora Discussion]     [Gimp]     [Stuff]     [Yosemite News]

  Powered by Linux