This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: BFD questions
- To: ian AT zembu dot com (Ian Lance Taylor)
- Subject: Re: BFD questions
- From: Toshi Morita <tm2 AT best dot com>
- Date: Fri, 17 Sep 1999 16:29:20 -0700 (PDT)
- Cc: binutils AT sourceware.cygnus dot com
> From: Toshi Morita <tm2@best.com>
> Date: Fri, 17 Sep 1999 15:06:10 -0700 (PDT)
>
> > Yes, it should. However, I'm thinking about the case where we have a
> > relocation in a .debug section which refers to a symbol which has been
> > deleted. The symbol doesn't have a value. We can't simply remove the
> > address being relocated, because who knows what that would do.
>
> Whoa, stop the presses.
>
> Is this case known to happen?
>
> No. I mention it as a possibility you may want to consider.
>
> If this case happens, what does the data look like?
> Will the AT_pc_high have a funky value like 0x00000010 in this case?
>
> It's possible. If it's trying to store SYM + 0x10, and SYM is in a
> linkonce section which has been discarded, then it's quite possible
> that the debugging information will wind up with the value 0x10.
If I understand correctly, the AT_pc_low and AT_pc_high should be referencing
labels within the same section. If the referenced section was discarded,
then wouldn't both the AT_pc_low and AT_pc_high point to invalid labels?
This case which i'm investigating now has a valid AT_pc_low, but an
invalid AT_pc_high, which doesn't sound like it fits the symptoms of a
discarded section.
Toshi