Article View: es.comp.os.linux.programacion
Article #11777Re: [Re] Problemas al enlazar
From: J.A. Gutierrez
Date: Thu, 04 Oct 2001 08:41
Date: Thu, 04 Oct 2001 08:41
49 lines
2686 bytes
2686 bytes
Salva <salause@teleco.upv.es> wrote: : In article <9p1mp8$qct$1@news.unizar.es>, "J.A. Gutierrez" <spd@daphne.cps.unizar.es> wrote: :> en el HP le pasas al gcc la opcion :> -Wl,-a,archive :> no? : No, no lo hago. �Que ocurre si lo hago? pues que es cuando se genera un ejecutable linkado estaticamente, como se puede ver si se ejectua el comando file: $ gcc -o hello hello.c $ file hello $ PA-RISC1.1 shared executable dynamically linked -not stripped $ ls -ln hello -rwxr-xr-x 1 9220 612 25268 Oct 4 10:08 hello $ gcc -Wl,-a,archive -o hello hello.c $ file hello hello: PA-RISC1.1 shared executable -not stripped $ ls -ln hello -rwxr-xr-x 1 9220 612 254644 Oct 4 10:09 hello de todas formas veo que con -static, en gcc, tambien tira :> :> Para lo de la portabilidad del ejecutable, lo que puedes hacer :> es linkar dinamicamente todo excepto la ncurses y la gpm. : �Como lo hago? pues una forma seria: gcc -o hello hello.c /path/to/libncurses.a libgpm.a -lloquesea en teoria se podria hacer tambien: gcc -o hello hello.c -Wl,-a,archive -lncurses -Wl,-a,shared -lotra para alternar entre shared y archive (en HP-UX, obviamente). (man ld) -- PGP and other useless info at \ http://www.cps.unizar.es/~spd/ \ finger://daphne.cps.unizar.es/spd \ Timeo Danaos et dona ferentes ftp://ivo.cps.unizar.es/pub/ \ (Virgilio)
Technical Details
Message-ID:
<9ph7c5$sdu$2@news.unizar.es>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!news-ge.switch.ch!news.rediris.es!news.unizar.es!not-for-mailReferences:
<9oaodc$s7e$1@polaris.cc.upv.es> <9ot2qh$g93$1@polaris.cc.upv.es> <9ov0jh$l8i$1@news.unizar.es> <9ovl2i$ujq$1@polaris.cc.upv.es> <9p1mp8$qct$1@news.unizar.es> <9pd2ol$qlk$1@polaris.cc.upv.es>Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,dfa4a2acb5227149
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2001-10-04 01:23:39 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!news-ge.switch.ch!news.rediris.es!news.unizar.es!not-for-mail
From: "J.A. Gutierrez" <spd@daphne.cps.unizar.es>
Newsgroups: es.comp.os.linux.programacion
Subject: Re: [Re] Problemas al enlazar
Date: 4 Oct 2001 08:41:41 GMT
Organization: Rank
Lines: 49
Message-ID: <9ph7c5$sdu$2@news.unizar.es>
References: <9oaodc$s7e$1@polaris.cc.upv.es> <9ot2qh$g93$1@polaris.cc.upv.es> <9ov0jh$l8i$1@news.unizar.es> <9ovl2i$ujq$1@polaris.cc.upv.es> <9p1mp8$qct$1@news.unizar.es> <9pd2ol$qlk$1@polaris.cc.upv.es>
NNTP-Posting-Host: daphne.cps.unizar.es
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: news.unizar.es 1002184901 29118 155.210.152.20 (4 Oct 2001 08:41:41 GMT)
X-Complaints-To: usenet@news.unizar.es
NNTP-Posting-Date: 4 Oct 2001 08:41:41 GMT
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (IRIX/6.2 (IP22))