* linking problems with gcc3.0 on solaris8
@ 2001-08-01 15:04 ravi kol
2001-08-01 19:23 ` aoliva
0 siblings, 1 reply; 2+ messages in thread
From: ravi kol @ 2001-08-01 15:04 UTC (permalink / raw)
To: gcc-help
I am trying to compile a c file with GCC3.0 on a
solaris 8 sparc machine.the following is the command
and the output.
-----------------------------------------
gcc -I/usr/j2sdk1_3_1/include
-I/usr/j2sdk1_3_1/include/solaris -I/usr/local/include
-shared jpcap.c -o libjpcap.so -lnsl
-L/usr/local/lib/pcap.a
<unknown> 0x974
/var/tmp/ccJxZSFu.o
<unknown> 0x5fc
/var/tmp/ccJxZSFu.o
<unknown> 0xa80
/var/tmp/ccJxZSFu.o
.
.
......so on........
.
.
gx_snaplen 0xcdc
/var/tmp/ccklhQu4.o
pcap_setfilter 0xa28
/var/tmp/ccklhQu4.o
pcap_lookupdev 0x4e0
/var/tmp/ccklhQu4.o
INVALID_FILTER_EXCEPTION 0x9fc
/var/tmp/ccklhQu4.o
INVALID_FILTER_EXCEPTION 0xa54
/var/tmp/ccklhQu4.o
INVALID_FILTER_EXCEPTION 0xa58
/var/tmp/ccklhQu4.o
INVALID_FILTER_EXCEPTION 0x9f8
/var/tmp/ccklhQu4.o
INVALID_FILTER_EXCEPTION 0x988
/var/tmp/ccklhQu4.o
pcap_geterr 0xa48
/var/tmp/ccklhQu4.o
pcap_geterr 0x9ec
/var/tmp/ccklhQu4.o
pcap_geterr 0x7ac
/var/tmp/ccklhQu4.o
pcap_close 0xaa4
/var/tmp/ccklhQu4.o
ld: fatal: relocations remain against allocatable but
non-writable sections collect2: ld returned 1 exit
status
-----------------------------------------
I have recently shifted from gcc-2.95.2 .when i tried
using the -fPIC option ,it compiles ...ok...but the
resultant shared object is a wrong one.(very small
size fileand gets runtime errors with applications
using it)I tried other things like gcc -lc -lgcc with
no luck.
similar error(all same symbols ) came ...when i used
my gcc without linking the libraries nsl and and
pcap.a.
I will appreciate your help
.-kolli.
__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: linking problems with gcc3.0 on solaris8
2001-08-01 15:04 linking problems with gcc3.0 on solaris8 ravi kol
@ 2001-08-01 19:23 ` aoliva
0 siblings, 0 replies; 2+ messages in thread
From: aoliva @ 2001-08-01 19:23 UTC (permalink / raw)
To: ravi kol; +Cc: gcc-help
On Aug 1, 2001, ravi kol <kolli27@yahoo.com> wrote:
> ld: fatal: relocations remain against allocatable but
> non-writable sections collect2: ld returned 1 exit
> status
> I have recently shifted from gcc-2.95.2 .when i tried
> using the -fPIC option ,it compiles ...ok...but the
> resultant shared object is a wrong one.
It must be a different problem. -fPIC is the correct solution for the
problem you're running into. A work-around (that would cause the
generation of a less efficient shared library) is to link using
-mimpure-text.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-08-01 19:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-01 15:04 linking problems with gcc3.0 on solaris8 ravi kol
2001-08-01 19:23 ` aoliva
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).