diff options
author | Vineet Gupta <vgupta@synopsys.com> | 2016-10-19 17:38:50 -0400 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2016-10-19 17:38:53 -0400 |
commit | 1dec78585328db00e33fb18dc1a6deed0e2095a5 (patch) | |
tree | 9b9a62753702bdceffcab1e497ab47961ddb24e3 /arch/arc | |
parent | 3da43104d3187184d7417569cb3360511229f761 (diff) |
ARC: fix build warning in elf.h
The cast valid since TASK_SIZE * 2 will never actually cause overflow.
| CC fs/binfmt_elf.o
| In file included from ../include/linux/elf.h:4:0,
| from ../include/linux/module.h:15,
| from ../fs/binfmt_elf.c:12:
| ../fs/binfmt_elf.c: In function load_elf_binar:
| ../arch/arc/include/asm/elf.h:57:29: warning: integer overflow in expression [-Woverflow]
| #define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3)
| ^
| ../fs/binfmt_elf.c:921:16: note: in expansion of macro ELF_ET_DYN_BASE
| load_bias = ELF_ET_DYN_BASE - vaddr;
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc')
-rw-r--r-- | arch/arc/include/asm/elf.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arc/include/asm/elf.h b/arch/arc/include/asm/elf.h index 7096f97a1434..aa2d6da9d187 100644 --- a/arch/arc/include/asm/elf.h +++ b/arch/arc/include/asm/elf.h | |||
@@ -54,7 +54,7 @@ extern int elf_check_arch(const struct elf32_hdr *); | |||
54 | * the loader. We need to make sure that it is out of the way of the program | 54 | * the loader. We need to make sure that it is out of the way of the program |
55 | * that it will "exec", and that there is sufficient room for the brk. | 55 | * that it will "exec", and that there is sufficient room for the brk. |
56 | */ | 56 | */ |
57 | #define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3) | 57 | #define ELF_ET_DYN_BASE (2UL * TASK_SIZE / 3) |
58 | 58 | ||
59 | /* | 59 | /* |
60 | * When the program starts, a1 contains a pointer to a function to be | 60 | * When the program starts, a1 contains a pointer to a function to be |