This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

target/5842: g++/collect2 extracts all static objects from archives



>Number:         5842
>Category:       target
>Synopsis:       g++/collect2 extracts all static objects from archives
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          pessimizes-code
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 05 11:26:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Len Lattanzi
>Release:        3.0.4
>Organization:
Interwoven
>Environment:
System: AIX flooz 1 5 0009274F4C00


host: powerpc-ibm-aix5.1.0.0
build: powerpc-ibm-aix5.1.0.0
target: powerpc-ibm-aix5.1.0.0
configured with: ../gcc-3.0.4/configure 
>Description:
	Static object in archive files are searched by collect2 and added
	to export list
>How-To-Repeat:
	See attached tarball
	The object test2 will be constructed when running ./test
	even though libtest(test2.o) is not needed for the executable

begin 664 tar.bz2
M0EIH.3%!629368A>?QD``G]_@]PP#`!=[_^?;J].Q/_O_]\@``0```A0`_YK
M;';&AH!KAI4]3U&FF0!D#0-``T!HR``!H`!E)Z"::IY-JGJ:>H>IH81H`T``
M````&324]2#TQ1H&#4T`!H-,30T````.-&3(PC$`PF@P":#0,F31DR&$!A%(
M4P@T)H)Y4WE/0T1E-H:F@\IM`0TVFIY1M-3P[D@^;[8SI/M2,!$$*Q6(#IU:
MHB=:3$UWO)KH;\3LL4W$@%UE^<!`GLPIGAB(('8?;Z2J`]L(5+]`(UI]W:YP
M,F-YSRH!#-V77:=#_)]DD2*&L0#&Q9,,3NCM@':D"E2G(MA<;YC&LE@HJ0+(
M"O!PZ"Q3#(!(P4Q$BBX(Y#L7F(`D()+KK8!#=G.8TCW#TO_%(@EZQM_BS8:(
M/V]<P8DRI6,8MBRM$0!8EA.#'DR3&>P=O1:)T[!CAE!L'[P0'3R`7@Y.XD:!
M+L&7+,D2)%Q$^PZ1.Q/?\#29A*B/0$-PP<JY$-,GS>0XRLI`\D`<!7)=)"'N
M@\_,?RP'"3"BM=OQ$TLK!)6J=F@).'=[NT!2<,:46B8(!*'!@YL-9%D#BVG3
MD3@.J<CM7,':&6ZV772Z`>1D$0(>%!,RL)N)"4XSL;R=%*HBI7HO)+/]0^6[
M(APPMY*ZI))MG:$0'F*KJ]9?"D$`8DH?#5?O6/5BY+X7H(`MOVD%LI3&A@G:
MEJ2Q$DLHE$NIWUQC3"#N1CD01"(1@0D7@Y'-JZ$EK3:XPUNMFD$\7>YY0)T)
M#O!J>>.,B7_!5ZSK.#*OI>L\@AYT]27'/ZHV'T(;U*2*=:=J=`AVB%?.7^7[
MTH4I2E"E*=J9F[.DB$PB<1Z2#UCJ-_RXFU*P-1\_L<!U*8]=VYA*N43H^J<*
M9#O=\8PPF"0?U[9M8>CX!GQ",0;0K(*[7Z5&J"Q34T%0"!I9$1(I04$);$A/
MGDGRT$&`WH!2Z\XTS;T[JA+TBB>X]\C%Q2?'."_^F\$&4PE3@A/P\7\.$,XF
M$8Q<P18-QH@S`YP_U+-(>,E(L/C.74L)`8-#7F,1XB&[;"1H,&Q+]C:/`;1M
MV^$+AB^6%07!'Q$D`4BA`-D($TTA0@(@"85)(-KCUAC3=TCJRH[1!?GQ5WA<
M1E'B#>2E-V`GM)!*5K/>@B-=$V&^G,V9`<)6VG>D;3OE.XR_F=U`K!2$T]X:
MVFVFZZ%DF1($"Y($X35HQR,(2-R#'"8OO(ML0[K]8%W2E!%P3YS!A,;)%4R`
M6S."J,PN*I\$TRR;$OI98$_*5;59R_Y2(M-M+PM00,/B=B@OXNY(IPH2$0O/
"XR``
`
end

>Fix:
	Workaround
	If you use GNU ld to pre-link the objects then the resulting
	object can be fed to g++

	/opt/freeware/GNUPro/bin/gld -r -o test.o main.o test3.o -L. -ltest
	g++ -o test test.o

>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]