Daniel Jacobowitz escreveu: > On Fri, Nov 17, 2006 at 01:13:14AM +0000, Pedro Alves wrote: > >> * symtab.h (prim_record_minimal_symbol_and_bfd_section): Declare. >> > > I don't think you need yet another variant of this function. Can't you > use prim_record_minimal_symbol_and_info? You're getting the section > from the cs, and there's cs_to_section, so you ought to have the > "section" integer available too. > > > You are right. My thinking was that prim_record_minimal_symbol will only pass .text .data or .bss section to prim_record_minimal_symbol_and_info, and the way you say, and in the patch attached, we are passing a wider range of values. I didn't want to change more than needed, but looking again, I don't think it harms in this case. The attached patch does that, and also, I took the opportunity to a little extra cleanup on coffread.c by making all minimal symbol creations through record_minimal_symbol. Cheers, Pedro Alves --- 2006-11-19 Pedro Alves * coffread.c (cs_to_bfd_section): New function. (cs_to_section): Use cs_to_bfd_section. (record_minimal_symbol): Take the coff_symbol* parameter instead of the symbol's name as a char*. Add 'int section' parameter. Call prim_record_minimal_symbol_and_info instead of prim_record_minimal_symbol_and_info. Change return type to struct minimal_symbol *. (coff_symtab_read): Adapt to new record_minimal_symbol's signature. Make all minimal symbol creations go through record_minimal_symbol.