[U-Boot] [PATCH] relocate-rela: replace a magic number with sizeof(Elf64_Rela)
Albert ARIBAUD
albert.u.boot at aribaud.net
Thu Feb 13 15:19:00 CET 2014
Hi Masahiro,
On Tue, 4 Feb 2014 10:58:31 +0900, Masahiro Yamada
<yamada.m at jp.panasonic.com> wrote:
> Signed-off-by: Masahiro Yamada <yamada.m at jp.panasonic.com>
> Cc: Scott Wood <scottwood at freescale.com>
> Cc: David Feng <fenghua at phytium.com.cn>
> ---
> tools/relocate-rela.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/relocate-rela.c b/tools/relocate-rela.c
> index 93b4c39..670b9fd 100644
> --- a/tools/relocate-rela.c
> +++ b/tools/relocate-rela.c
> @@ -120,7 +120,7 @@ int main(int argc, char **argv)
> }
>
> if (rela_start > rela_end || rela_start < text_base ||
> - (rela_end - rela_start) % 24) {
> + (rela_end - rela_start) % sizeof(Elf64_Rela)) {
> fprintf(stderr, "%s: bad rela bounds\n", argv[0]);
> return 3;
> }
Applied to u-boot-arm/master, thanks!
Amicalement,
--
Albert.
More information about the U-Boot
mailing list