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: PATCH: Properly dump addend in readelf


On Sat, Oct 02, 2010 at 03:27:17PM -0700, H.J. Lu wrote:
> diff --git a/binutils/readelf.c b/binutils/readelf.c
> index b91c5ba..12d0314 100644
> --- a/binutils/readelf.c
> +++ b/binutils/readelf.c
> @@ -734,7 +734,8 @@ slurp_rela_relocs (FILE * file,
>  	{
>  	  relas[i].r_offset = BYTE_GET (erelas[i].r_offset);
>  	  relas[i].r_info   = BYTE_GET (erelas[i].r_info);
> -	  relas[i].r_addend = BYTE_GET (erelas[i].r_addend);
> +	  relas[i].r_addend
> +	    = (bfd_signed_vma) (int) BYTE_GET (erelas[i].r_addend);
>  	}
>  
>        free (erelas);

byte_get_signed is better here.  Patch otherwise OK.

-- 
Alan Modra
Australia Development Lab, IBM


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