diff options
| author | Alexey Dobriyan <adobriyan@gmail.com> | 2019-05-14 18:43:48 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-14 22:52:50 -0400 |
| commit | 852643165aea0999bb862b36511c5b9f6b11449f (patch) | |
| tree | d4c4d8e88264a57112104a3c0f7126fdb2b9c2a3 /fs/binfmt_elf.c | |
| parent | be0deb585e4c51d1c00e3f4862f95228ab72b7d8 (diff) | |
fs//binfmt_elf.c: move variables initialization closer to their usage
Link: http://lkml.kernel.org/r/20190416202002.GB24304@avx2
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/binfmt_elf.c')
| -rw-r--r-- | fs/binfmt_elf.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index 3f18a7f9d49e..512646da8255 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c | |||
| @@ -732,14 +732,6 @@ static int load_elf_binary(struct linux_binprm *bprm) | |||
| 732 | goto out; | 732 | goto out; |
| 733 | 733 | ||
| 734 | elf_ppnt = elf_phdata; | 734 | elf_ppnt = elf_phdata; |
| 735 | elf_bss = 0; | ||
| 736 | elf_brk = 0; | ||
| 737 | |||
| 738 | start_code = ~0UL; | ||
| 739 | end_code = 0; | ||
| 740 | start_data = 0; | ||
| 741 | end_data = 0; | ||
| 742 | |||
| 743 | for (i = 0; i < loc->elf_ex.e_phnum; i++, elf_ppnt++) { | 735 | for (i = 0; i < loc->elf_ex.e_phnum; i++, elf_ppnt++) { |
| 744 | char *elf_interpreter; | 736 | char *elf_interpreter; |
| 745 | loff_t pos; | 737 | loff_t pos; |
| @@ -887,6 +879,14 @@ out_free_interp: | |||
| 887 | if (retval < 0) | 879 | if (retval < 0) |
| 888 | goto out_free_dentry; | 880 | goto out_free_dentry; |
| 889 | 881 | ||
| 882 | elf_bss = 0; | ||
| 883 | elf_brk = 0; | ||
| 884 | |||
| 885 | start_code = ~0UL; | ||
| 886 | end_code = 0; | ||
| 887 | start_data = 0; | ||
| 888 | end_data = 0; | ||
| 889 | |||
| 890 | /* Now we do a little grungy work by mmapping the ELF image into | 890 | /* Now we do a little grungy work by mmapping the ELF image into |
| 891 | the correct location in memory. */ | 891 | the correct location in memory. */ |
| 892 | for(i = 0, elf_ppnt = elf_phdata; | 892 | for(i = 0, elf_ppnt = elf_phdata; |
