diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/binfmt_elf_fdpic.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c index 5810aa1339fd..47d6d49d1fb9 100644 --- a/fs/binfmt_elf_fdpic.c +++ b/fs/binfmt_elf_fdpic.c | |||
@@ -179,6 +179,8 @@ static int load_elf_fdpic_binary(struct linux_binprm *bprm, | |||
179 | int executable_stack; | 179 | int executable_stack; |
180 | int retval, i; | 180 | int retval, i; |
181 | 181 | ||
182 | kdebug("____ LOAD %d ____", current->pid); | ||
183 | |||
182 | memset(&exec_params, 0, sizeof(exec_params)); | 184 | memset(&exec_params, 0, sizeof(exec_params)); |
183 | memset(&interp_params, 0, sizeof(interp_params)); | 185 | memset(&interp_params, 0, sizeof(interp_params)); |
184 | 186 | ||
@@ -941,8 +943,11 @@ static int elf_fdpic_map_file_constdisp_on_uclinux( | |||
941 | 943 | ||
942 | if (mm) { | 944 | if (mm) { |
943 | if (phdr->p_flags & PF_X) { | 945 | if (phdr->p_flags & PF_X) { |
944 | mm->start_code = seg->addr; | 946 | if (!mm->start_code) { |
945 | mm->end_code = seg->addr + phdr->p_memsz; | 947 | mm->start_code = seg->addr; |
948 | mm->end_code = seg->addr + | ||
949 | phdr->p_memsz; | ||
950 | } | ||
946 | } else if (!mm->start_data) { | 951 | } else if (!mm->start_data) { |
947 | mm->start_data = seg->addr; | 952 | mm->start_data = seg->addr; |
948 | #ifndef CONFIG_MMU | 953 | #ifndef CONFIG_MMU |
@@ -1123,8 +1128,10 @@ static int elf_fdpic_map_file_by_direct_mmap(struct elf_fdpic_params *params, | |||
1123 | 1128 | ||
1124 | if (mm) { | 1129 | if (mm) { |
1125 | if (phdr->p_flags & PF_X) { | 1130 | if (phdr->p_flags & PF_X) { |
1126 | mm->start_code = maddr; | 1131 | if (!mm->start_code) { |
1127 | mm->end_code = maddr + phdr->p_memsz; | 1132 | mm->start_code = maddr; |
1133 | mm->end_code = maddr + phdr->p_memsz; | ||
1134 | } | ||
1128 | } else if (!mm->start_data) { | 1135 | } else if (!mm->start_data) { |
1129 | mm->start_data = maddr; | 1136 | mm->start_data = maddr; |
1130 | mm->end_data = maddr + phdr->p_memsz; | 1137 | mm->end_data = maddr + phdr->p_memsz; |