> On Sat, 24 Jan 2009 13:35:30 +0000 Lee Noar wrote: > > alan buckley wrote: >> I'm trying out a test program that links to glib-2.0 as a >> shared library. The shared library and testprogram >> (testlib.c) are both cross-compiled. >> >> When I run the program I get the following error: >> >> HostFS:$.DEV.glib.testglib: Text relocation of data symbol '' found: >> SharedLibs:lib.libglib-2/0/so/0 (offset 0xCD57C) >> >> Any ideas of how I get it to work? Or where I need to look >> to find out what is going on. >> >> Is it something that may have been fixed recently in GCCSDK in >> which case what do I need to rebuild? > > Have you tried rebuilding libglib from scratch again recently? It's also > quite easy to rebuild bug fixed libraries, forget to transfer them to > !SharedLibs and then wonder why nothing has changed. I've done that > myself :-) So have I. I'm also testing on an emulated machine and an Iyonix so it's very easy to get confused. I did rebuild it and check what I copied so I'm pretty sure I'm testing the correct things.
> I've just tried building libglib2.0-0 in the autobuilder and have been > able to run a number of the test programs that are linked to it, so I > think the problem may be local to your build environment. If you do a > 'readelf -d' on the library, do you see a TEXTREL entry? If so, then > this together with the error indicates that part of the library (if not > all) was compiled without -fPIC. How this is possible though, when it > builds correctly for me, I don't know. > readelf -d gives Dynamic section at offset 0x12144c contains 21 entries: Tag Type Name/Value 0x00000001 (NEEDED) Shared library: [libintl.so.8] 0x00000001 (NEEDED) Shared library: [libgcc_s.so.1] 0x00000001 (NEEDED) Shared library: [libunixlib.so.5] 0x0000000e (SONAME) Library soname: [libglib-2.0.so.0] 0x0000000c (INIT) 0x16420 0x0000000d (FINI) 0xdfadc 0x00000004 (HASH) 0xa8 0x00000005 (STRTAB) 0x7c9c 0x00000006 (SYMTAB) 0x265c 0x0000000a (STRSZ) 25148 (bytes) 0x0000000b (SYMENT) 16 (bytes) 0x00000002 (PLTRELSZ) 1472 (bytes) 0x00000014 (PLTREL) REL 0x00000017 (JMPREL) 0x15e60 0x00000011 (REL) 0xded8 0x00000012 (RELSZ) 32648 (bytes) 0x00000013 (RELENT) 8 (bytes) 0x00000003 (PLTGOT) 0x121514 0x00000016 (TEXTREL) 0x0 0x6ffffffa (RELCOUNT) 4015 0x00000000 (NULL) 0x0 There is a TEXTREL section so I guess that is the problem. Can you send me the last-success file from your build of libglib-2.0 so I can compare it to mine to see what is different? It would help me track down the problem in my build environment faster. Thanks, Alan _________________________________________________________________ Check out the new and improved services from Windows Live. Learn more! http://clk.atdmt.com/UKM/go/132630768/direct/01/ _______________________________________________ GCCSDK mailing list [email protected] Bugzilla: http://www.riscos.info/bugzilla/index.cgi List Info: http://www.riscos.info/mailman/listinfo/gcc Main Page: http://www.riscos.info/index.php/GCCSDK
