Some more insight or some more confusion, I do not know.<div><br></div><div>Using -Wl,-ztext we can force the linker to emit a warning about text relocations. The advantage is that it shows the actual symbols. For an ECL with an external GMP (not its own) it shows the ones below. I would say they are pretty harmless, aren't they? GMP has the same relocation "problems" so to say.<div>
<br></div><div><div>;;; gcc -o "libecl.so" -L"/export/home/jjgarcia/tmp/opensolaris64/" "c/main.o" "c/all_symbols2.o" "liblsp.a" "libeclmin.a" "-Wl,-R,/export/home/jjgarcia/lib/" -dy -G -fPIC -Wl,-ztext -leclgc -ldl -lm -lsocket -lnsl -lintl -lgmp</div>
<div>Text relocation remains referenced</div><div> against symbol offset in file</div><div>__get_exit_frame_monitor_ptr 0x27 /usr/lib/crt1.o</div><div>__do_exit_code_ptr 0x33 /usr/lib/crt1.o</div>
<div>__fsr_init_value_ptr 0xa6 /usr/lib/crt1.o</div><div>trap_table 0xbf /usr/lib/crt1.o</div><div>main 0x7f /usr/lib/crt1.o</div>
<div>_DYNAMIC 0x7 /usr/lib/crt1.o</div><div>_environ 0x4b /usr/lib/crt1.o</div><div>_environ 0x59 /usr/lib/crt1.o</div>
<div>___Argv 0x69 /usr/lib/crt1.o</div><div>_fini 0x19 /usr/lib/crt1.o</div><div>__fsr 0x75 /usr/lib/crt1.o</div>
<div>_init 0x7a /usr/lib/crt1.o</div><div>__fpstart 0x70 /usr/lib/crt1.o</div><div>exit 0x8b /usr/lib/crt1.o</div>
<div>_exit 0x97 /usr/lib/crt1.o</div><div>atexit 0x11 /usr/lib/crt1.o</div><div>atexit 0x1e /usr/lib/crt1.o</div>
<div>atexit 0x3f /usr/lib/crt1.o</div><div><br></div><div>Now the funny thing is that if I copy the *.so file to a Linux box with "scanelf' (none of the Solaris boxes have this program), I get different results which I do not know how to interpret. scanelf -qtT is supposed to reveal the text relocations, but all it shows is function calls and global variables and they are tagged "optimized out" which I do not know how to interpret.</div>
<div><br></div><div><div> libecl.so: (memory/data?) [0x39467] in (optimized out) [0x39440]</div><div> libecl.so: (memory/data?) [0x39473] in (optimized out) [0x39440]</div><div> libecl.so: (memory/data?) [0x394E6] in (optimized out: previous __fsr) [0x394DC]</div>
<div> libecl.so: (memory/data?) [0x394FF] in (optimized out: previous __fsr) [0x394DC]</div><div> libecl.so: c_register_block [0x394BF] in (optimized out) [0x39440]</div><div> libecl.so: LC30cadadr [0x39447] in (optimized out) [0x39440]</div>
<div> libecl.so: VV [0x3948B] in (optimized out) [0x39440]</div><div> libecl.so: VV [0x39499] in (optimized out) [0x39440]</div><div> libecl.so: L8find_restart_never_fail [0x394A9] in (optimized out) [0x39440]</div><div>
libecl.so: LC117__g1448 [0x39459] in (optimized out) [0x39440]</div><div> libecl.so: .LC0 [0x394B5] in (optimized out) [0x39440]</div><div> libecl.so: LC98__g1345 [0x394BA] in (optimized out) [0x39440]</div><div> libecl.so: L4_convert_to_ffi_type [0x394B0] in (optimized out) [0x39440]</div>
<div> libecl.so: .L112 [0x394CB] in (optimized out) [0x39440]</div><div> libecl.so: compiler_data_text [0x394D7] in (optimized out) [0x39440]</div><div> libecl.so: LC64rotatef [0x39451] in (optimized out) [0x39440]</div>
<div> libecl.so: LC64rotatef [0x3945E] in (optimized out) [0x39440]</div><div> libecl.so: LC64rotatef [0x3947F] in (optimized out) [0x39440]</div><div> 0755 LE --- --- RWX TEXTREL /usr/ccs/lib:/lib:/usr/lib:/usr/sfw/lib:/export/hom</div>
</div><br>-- <br>Instituto de Física Fundamental, CSIC<br>c/ Serrano, 113b, Madrid 28006 (Spain) <br><a href="http://juanjose.garciaripoll.googlepages.com" target="_blank">http://juanjose.garciaripoll.googlepages.com</a><br>
</div></div>