This is the mail archive of the
binutils@sources.redhat.com
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: <xwufzyzt0xd.fsf@tonopah.toronto.redhat.com>
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