File tree Expand file tree Collapse file tree 1 file changed +4
-20
lines changed Expand file tree Collapse file tree 1 file changed +4
-20
lines changed Original file line number Diff line number Diff line change @@ -1306,7 +1306,6 @@ static int load_elf_library(struct file *file)
1306
1306
{
1307
1307
struct elf_phdr * elf_phdata ;
1308
1308
struct elf_phdr * eppnt ;
1309
- unsigned long elf_bss , bss , len ;
1310
1309
int retval , error , i , j ;
1311
1310
struct elfhdr elf_ex ;
1312
1311
@@ -1351,30 +1350,15 @@ static int load_elf_library(struct file *file)
1351
1350
eppnt ++ ;
1352
1351
1353
1352
/* Now use mmap to map the library into memory. */
1354
- error = vm_mmap (file ,
1355
- ELF_PAGESTART (eppnt -> p_vaddr ),
1356
- (eppnt -> p_filesz +
1357
- ELF_PAGEOFFSET (eppnt -> p_vaddr )),
1353
+ error = elf_load (file , ELF_PAGESTART (eppnt -> p_vaddr ),
1354
+ eppnt ,
1358
1355
PROT_READ | PROT_WRITE | PROT_EXEC ,
1359
1356
MAP_FIXED_NOREPLACE | MAP_PRIVATE ,
1360
- (eppnt -> p_offset -
1361
- ELF_PAGEOFFSET (eppnt -> p_vaddr )));
1362
- if (error != ELF_PAGESTART (eppnt -> p_vaddr ))
1363
- goto out_free_ph ;
1357
+ 0 );
1364
1358
1365
- elf_bss = eppnt -> p_vaddr + eppnt -> p_filesz ;
1366
- if (padzero (elf_bss )) {
1367
- error = - EFAULT ;
1359
+ if (error != ELF_PAGESTART (eppnt -> p_vaddr ))
1368
1360
goto out_free_ph ;
1369
- }
1370
1361
1371
- len = ELF_PAGEALIGN (eppnt -> p_filesz + eppnt -> p_vaddr );
1372
- bss = ELF_PAGEALIGN (eppnt -> p_memsz + eppnt -> p_vaddr );
1373
- if (bss > len ) {
1374
- error = vm_brk (len , bss - len );
1375
- if (error )
1376
- goto out_free_ph ;
1377
- }
1378
1362
error = 0 ;
1379
1363
1380
1364
out_free_ph :
You can’t perform that action at this time.
0 commit comments