This is the mail archive of the
crossgcc@cygnus.com
mailing list for the crossgcc project.
Re: Help needed with linking
- To: crossgcc@cygnus.com
- Subject: Re: Help needed with linking
- From: Art Berggreen <art@acc.com>
- Date: Tue, 18 May 1999 12:52:12 -0700
- Organization: Advanced Computer Communications
- References: <199905181735.NAA20176@wmi0.wmi.com>
- Reply-To: crossgcc@cygnus.com
Have you tried initializing x?
Since it is uninitialized, x is probably being allocated to .bss or
COMMON. Putting an initializer on x should cause it to be allocated
in .data. You might try that if you haven't already.
Art
Joel Coltoff wrote:
> ...
> When I compile this program
>
> int x;
> int *y = &x;
>
> int
> main()
> {
> return(1);
> }
> ...
> As best as I can tell it has to do with the statement, int *y = &x;
> i.e. The linker bombs anytime I try to resolve a reference to another
> variable at link time rather than at run time.
_______________________________________________
New CrossGCC FAQ: http://www.objsw.com/CrossGCC
_______________________________________________
To remove yourself from the crossgcc list, send
mail to crossgcc-request@cygnus.com with the
text 'unsubscribe' (without the quotes) in the
body of the message.