Subject: Re: [RFC v3 PATCH 1/4] Extract list of relocation offsets

From: Mohan Kumar M <[email-masked]>
Date: Tue, 22 Jul 2008 13:28:36 +0530

Paul Mackerras wrote:
> Mohan Kumar M writes:
> 
>> diff --git a/arch/powerpc/boot/relocs.c b/arch/powerpc/boot/relocs.c
>> new file mode 100644
>> index 0000000..31ca903
> 
> Where did this file come from?  Did you write it all yourself?  If
> not, then you need to credit the original author in the patch
> description at least.  Also it needs a copyright notice.
> 
> There is some evidence that this has been copied from a similar
> program for x86.  For instance, this:

Hi Paul,

Yes, its taken from x86 relocs.c. I will include proper credits to the 
original author in the next patch.

> 
> Also, this:
> 
> +		if (shdr[i].sh_type == SHT_REL) {
> +			reltab[i] = malloc(shdr[i].sh_size);
> +			if (!reltab[i]) {
> +				die("malloc of %d bytes for relocs failed\n",
> +					shdr[i].sh_size);
> +			}
> +			relp = reltab[i];
> 
> is, I think, unnecessary, since as far as I know we never get SHT_REL
> sections on powerpc.

Ok, I will remove SHT_REL code in the relocs.c file.

Regards,
Mohan.