Re: [patch] Set bfd field in target_section

Aleksandar Ristovski
2009-07-28T14:46:32Z

Pedro Alves wrote:
> On Tuesday 28 July 2009 15:28:33, Aleksandar Ristovski wrote:
>> Hello,
>>
>> I believe this is related to Pedro's patch from 03-Jun-09. I
>> didn't see where we set target_section.bfd field - maybe I
>> am overlooking something, but in bfd-target, in function
>> target_bfd_xclose we will call bfd_close
>> (table->sections->bfd); bfd_close doesn't like NULL argument.
>>
>> Am I missing something, or is this (the patch) missing?
>
> Doesn't add_to_section_table set the bfd in each new
> target section?

Indeed it does. However, the problem is if we don't find any
sections in a bfd, it will exit and will leave bfd field 0.

I get this situation at the moment because I broke my
xfer_partial, but I think it could happen in general?

---
Aleksandar