This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
RE: reloc against common symbols
- From: "Vineet Sharma, Noida" <vineets at noida dot hcltech dot com>
- To: Ian Lance Taylor <ian at wasabisystems dot com>, "Vineet Sharma, Noida" <vineets at noida dot hcltech dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Thu, 12 Feb 2004 17:25:16 +0530
- Subject: RE: reloc against common symbols
>Thanks, but I need more. Can you provide the full backtrace?
This is full trace for coff_XXX_reloc()
ldwrite ();
bfd_final_link()
default_indirect_link_order()
bfd_get_relocated_section_contents ()
bfd_perform_relocation ()
coff_XXX_reloc ()
/****************************/
For the code below
_y:
.short _x+0
.short _xx+0
.short _xxx+0
.global _z
.align 1
_z:
.short 1
.comm _xxx, 4
.comm _xx,5
.comm _x,6
For the background of the problem
Vineet:
> >What is the actual problem?
>
> How to calculate the final address of the common symbol in
coff_XXX_reloc()?
>
> The above method get_symbol_value() does not work for common symbols.Whats
> wrong?
Ian:
It's hard to say without more information. What is the backtrace when
coff_XXX_reloc() is called? There are several possible paths to that
point, and I'm not sure which you are using.
Regards
Vineet
-----Original Message-----
From: Ian Lance Taylor [mailto:ian@wasabisystems.com]
Sent: Wednesday, February 11, 2004 6:04 PM
To: Vineet Sharma, Noida
Cc: binutils@sources.redhat.com
Subject: Re: reloc against common symbols
"Vineet Sharma, Noida" <vineets@noida.hcltech.com> writes:
> >It's hard to say without more information. What is the backtrace when
> >coff_XXX_reloc() is called? There are several possible paths to that
> >point, and I'm not sure which you are using.
>
> It is called from
>
> bfd_perform_relocation()
>
> which in turn is called from
>
> bfd_generic_get_relocated_section_contents()
>
> Hope that gives you the idea?
Thanks, but I need more. Can you provide the full backtrace?
> Dont you thinks some thing wrong in this _xx being declared first(before
_x)
> should start at lower address
> than that of (_x).
I don't think that indicates a problem. You can't predict the order
of common variables.
Ian