This is the mail archive of the
mailing list for the binutils project.
Re: bfd/syms.c bfd_decode_symclass patch proposal for gprof problem
- From: Nick Clifton <nickc at cambridge dot redhat dot com>
- To: Jim Wilson <wilson at redhat dot com>
- Cc: binutils at sources dot redhat dot com
- Date: 05 Jul 2002 15:36:48 +0100
- Subject: Re: bfd/syms.c bfd_decode_symclass patch proposal for gprof problem
- References: <email@example.com>
> 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
> 2002-07-04 Jim Wilson <firstname.lastname@example.org>
> * 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.