This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: bfd/syms.c bfd_decode_symclass patch proposal for gprof problem


Hi Jim,

> I put my new code in the generic bfd_decode_symclass, since I
> thought it seemed reasonable to check section flags for all object
> type formats.  This code could instead go into the elf specific
> bfd_symbol_info function.

Actually your new function does not appear to have anything in it
that is ELF specific, so I would be in favour of keeping in bfd/syms.c
and just changing the name to, say, decode_section_type().  Or maybe
not even creating a new function at all, but just adding the new code
to the body of bfd_decode_symcalls().

> I'm not sure if the order that I check for flags is right, I didn't
> try very hard to check whether this handles all sections correctly.

The order looks correct to me.  If anyone creates pathological
sections (eg with SEC_CODE and SEC_DEBUGGING both set) then they
should not be surprised if this function takes the straightforward
approach.

> bfd/ChangeLog
> 2002-07-04  Jim Wilson  <wilson@redhat.com>
> 
> 	* syms.c (elf_section_type): New.
> 	(bfd_decode_symclass): Call elf_section_type.

You do not need my approval, but please do check this patch in.

Cheers
        Nick


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]