From: Volkan YAZICI (yazicivo@ttnet.net.tr)
Date: Tue 17 Jan 2006 - 13:32:21 EET
On Jan 17 09:57, Cem Vedat ISIK wrote:
> Cok tesekkur ederim, her iki durum da, isime yarayacak .so'yu uretti...
> Ancak merak ettigim, sizin onerdiginiz yontem ile olusan .so
> dosyasinin buyuklugu yaklasik 120KB olurken, Erwin'in yontemi ile
> olusan .so dosyasi 6KB oluyor, bunun nedeni ne olabilir?
Bu benim -Wl,--no-whole-archive parametresini unutmamdan kaynaklanıyor.
gcc'ye -Wl parametresi ile linker'a verilecek seçenekleri
belirlersiniz. Ve man ld dedikten sonra ÅŸu paragrafa bakacak olursak:
[BEGIN]
--whole-archive
For each archive mentioned on the command line after the
--whole-archive option, include every object file in the archive in
the link, rather than searching the archive for the required object
files. This is normally used to turn an archive file into a shared
library, forcing every object to be included in the resulting
shared library. This option may be used more than once.
Two notes when using this option from gcc: First, gcc doesn't know
about this option, so you have to use -Wl,-whole-archive. Second,
don't forget to use -Wl,-no-whole-archive after your list of
archives, because gcc will add its own list of archives to your
link and you may not want this flag to affect those as well.
[END]
Özellikle şu satır sorunuza cevap veriyor:
Second, don't forget to use -Wl,-no-whole-archive after your
list of archives, because gcc will add its own list of archives
to your link and you may not want this flag to affect those as
well.
İyi çalışmalar.
_______________________________________________
Linux-programlama mailing list
Linux-programlama@liste.linux.org.tr
http://liste.linux.org.tr/mailman/listinfo/linux-programlama