OpenAmiga (838/959)

From:Rudi Chiarito
Date:30 Aug 2000 at 00:17:20
Subject:Re: AMIOPEN: vpcc complaints

On Tue, Aug 29, 2000 at 03:40:21PM -0700, artix wrote:
> mdata testi = {1, 2, idata};
>
> int main( int argc,char **argv) {
> /* ... */
> }

You define testi, but never use it (not even in the code you omitted,
right?). The VP linker notices that and optimises testi away. Still
there's an implicit reference to testi in the code that initialises
global data, which vpld forgets to omit.

The solution is easy and there are two choices:

a) remove testi, as you don't use it anyway
b) use testi, e.g. by adding "testi.j11=2". This prevents the structure
from being discarded.

This is already taken care of in newer releases of the linker, which do
the right thing, i.e. remove testi and the reference to it in the
initialisation code.



"Without deviation from the norm, progress is not possible." (F. Zappa)
Rudi Chiarito SGML/XML, user interface, i18n Amiga Inc.
rudi@amiga.com http://amiga.com/
Subscribe/Unsubscribe: open-request@amiga.com
Amiga FAQ: http://www.amiga.com/faq.html