Re: [PATCH 3/6] h8300 address space is 24bit.

Greg Ungerer <[email protected]> Mon, 4 Jan 2016 17:30:24 +1000
Newsgroups gmane.linux.uclinux.devel
Message-ID <[email protected]>
Hi Waldemar,

On 31/12/15 09:55, Waldemar Brodkorb wrote:
> From: Yoshinori Sato <[email protected]>
> 
> Signed-off-by: Yoshinori Sato <[email protected]>
> Signed-off-by: Waldemar Brodkorb <[email protected]>
> ---
>  flthdr.c |    8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/flthdr.c b/flthdr.c
> index 8a8b97c..0401e20 100644
> --- a/flthdr.c
> +++ b/flthdr.c
> @@ -167,8 +167,16 @@ process_file(const char *ifile, const char *ofile)
>  				r = ntohl(relocs[i]);
>  				raddr = flat_get_relocate_addr(r);
>  				printf("    %u\t0x%08lx (0x%08"PRIx32")\t", i, r, raddr);
> +#if defined(TARGET_h8300)
> +				raddr &= ~0x00000001;
> +#endif
>  				fseek_stream(&ifp, sizeof(old_hdr) + raddr, SEEK_SET);
>  				fread_stream(&addr, sizeof(addr), 1, &ifp);
> +#if defined(TARGET_h8300)
> +				addr = ntohl(addr);
> +				if (r & 1)
> +					addr &= 0x00ffffff;
> +#endif
>  				printf("%"PRIx32"\n", addr);
>  			}
>  

The current flthdr.c code is essentially arch clean at the
moment (no other #ifdef arch special cases). Is this change
really necessary?

Regards
Greg


_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev