This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: RFA: Add readelf --unwind support for ARM
- From: Nick Clifton <nickc at redhat dot com>
- To: binutils at sourceware dot org, Richard Earnshaw <Richard dot Earnshaw at arm dot com>, Paul Brook <paul at codesourcery dot com>
- Date: Tue, 02 Mar 2010 08:01:08 +0000
- Subject: Re: RFA: Add readelf --unwind support for ARM
- References: <20100226184508.GA11763@caradoc.them.org>
Hi Daniel,
A few comments on the patch:
> +/* Read an unsigned LEB128 encoded value from p. Set *PLEN to the
> number of
> + bytes read. */
> +
> +static unsigned int
> +read_uleb128 (unsigned char * p, unsigned int * plen)
This function is duplicated in binutils/dwarf.c. I think that it would
be better to just export it from there, rather than continuing with a
second implementation in readelf.c.
> + if (elf_header.e_machine == EM_ARM)
> + addr.offset &= ~1;
I suspect that this behaviour might be needed for other architectures as
well (MIPS16 maybe ?). So you might as well use a macro that tests
e_machine and returns an unmangled offset.
+ int wrapped;
If you are using a variable as a boolean quantity then it is better to
declare it as a bfd_boolean and use the TRUE/FALSE macros as its values.
+ if (relsec->sh_type == SHT_REL)
Just curious - are there any ARM binaries that use REL relocations and
have unwind tables ?
But apart from those few minor niggles the patch looks good to me.
Approved for installation into the mainline.
Cheers
Nick