This is the mail archive of the binutils@sourceware.org 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: RFA: Add readelf --unwind support for ARM


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


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