Re: Building sharable object libraries for CALL_EXTERNAL [message #14727 is a reply to message #14591] |
Thu, 18 March 1999 00:00  |
Octavi Fors
Messages: 13 Registered: March 1999
|
Junior Member |
|
|
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
"Eric J. Korpela" wrote:
<blockquote TYPE=CITE>In article <36EAAE98.8F975873@fajnm1.am.ub.es>,
<br>Octavi Fors <octavi@fajnm1.am.ub.es> wrote:
<br>>
<br>>I tried your advice with -G flag:
<br>>
<br>>$ld -o routine.so -z text -G routine.o
<br>>Text relocation remains &am p;nbsp; &am p;nbsp; &am p;nbsp;
referenced
<br>> against symbol & ;nbsp; & ;nbsp;
offset in file
<br>><unknown>
0x1c &n bsp; routine.o
<br>><unknown>
0x20 &n bsp; routine.o
<br>> .mul &n bsp; &n bsp; &n bsp; &n bsp; &n bsp;
0xb0 &n bsp; routine.o
<br>> .mul &n bsp; &n bsp; &n bsp; &n bsp; &n bsp;
0x120 & nbsp; routine.o
<br>> mcount & ;nbsp; & ;nbsp; & ;nbsp; & ;nbsp;
0x28 &n bsp; routine.o
<br>>ld: fatal: relocations remain against allocatable but non-writable
sections
<p>Hmmmm. I just tried your routine with gcc, (we don't have Sun's
compilers)
<br>% uname -a
<br>SunOS sagan 5.6 Generic_105181-09 sun4u sparc SUNW,Ultra-5_10
<br>% gcc -fPIC -c routine.c
<br>% /usr/ucb/ld -o t1.so -z text -G routine.o
<p>Under gcc, -fPIC and -fpic generate different code. Could that
be the
<br>problem?
<p>Eric
<br>--
<br>Eric Korpela &am p;nbsp; &am p;nbsp; &am p;nbsp;
| An object at rest can never be
<br>korpela@ssl.berkeley.edu
| stopped.
<br><a href="<a href="http://sag-www.ssl.berkeley.edu/~korpela">http://sag-www.ssl.berkeley.edu/~korpela</a>">Click
for home page.</a></blockquote>
Hello!
<p>Talking with my system manager, he told me that the right compilation
option is SunSolaris instead SusOs (in IDL Users Guide 4.0 they are considered
separately). In that way, I proceed with the SunSolaris options, described
in the IDL Users Guide:
<p><font size=-1>$ uname -a</font>
<br><font size=-1>SunOS mizar 5.5.1 Generic_103640-05 sun4u sparc SUNW,Ultra-Enterprise</font>
<p><font size=-1>$ cc -G -Kpic -c routine.c</font>
<br><font size=-1>$ ld -G -o routine.so routine.o</font><font size=-1></font>
<p>and no problem!
<p>Thanks all!
<pre>--
============================================================ =====
Octavi Fors Aldrich
Departament d'Astronomia i Meteorologia
Facultat de Fisica
Avgda. Diagonal 647
08028 Barcelona
SPAIN
Telf: 34-934021122
Fax: 34-934021133
e-mail: octavi@fajnm1.am.ub.es
============================================================ ===== </pre>
</html>
|
|
|