bug-libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HEAD fails stress test on darwin


From: Peter O'Gorman
Subject: Re: HEAD fails stress test on darwin
Date: Wed, 23 Feb 2005 23:22:26 +0900
User-agent: Mozilla Thunderbird 1.0 (Macintosh/20041206)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ralf Wildenhues wrote:

|> ld: multiple definitions of symbol _v1
|> .libs/main.o definition of _v1 in section (__DATA,__common)
|> sub2/.libs/liba.a(a.o) definition of _v1 in section (__DATA,__common)
|> ../../libtool/tests/stresstest.at:171: ./main
|> Because both main.c and a.c have:
|> int v1;
|
|
| .. but I'm not sure whether I wanted one of them to be extern or
| whether I wanted to see if the linker can in fact skip unused objects
| (which then may have extra instances of variables).
| Err, no.  I actually thought this was supported by C (i.e., have COMMON
| objects).  Since this may be an (infrequent) source of errors, we might
| want to check specifically for this..
| Will look closer later.
| Ralf

Just to follow up, so I don't forget.

The common refers to the variable v1 not beint initialized. i.e. it is "int
v1;" rather than "int v1=0;" the latter would put it in a different section,
but would still trigger the multiple definition error, as v1 is declared in
both main and as.c. I am almost certain that this is not supported by the
standards, but would be happy enough to be proven wrong. One or other needs
an extern.

If you intended to test this then we need to look at making this test
conditional on OS.

Peetr
- --
Peter O'Gorman - http://www.pogma.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (Darwin)

iQCVAwUBQhyQXriDAg3OZTLPAQLNFgP/TJ6fLqrJNL8xNf6R/0Ci5nPw2kmzyytQ
9xx9W88ErT+Y7gxBgx6WYNjivdz/iWpB8FdXHnZjU1SzPDyAKV6MYuP9zDtLK+Kx
o1gtuCzCQNT4PoqliS5xAgHJOtkqDmIvx0a4q0FZ5gKVUoYlMMbsRp1AcG+6jd/Q
YZspz7Ll5fQ=
=SjYR
-----END PGP SIGNATURE-----

--
Peter O'Gorman - http://www.pogma.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]