link_elf.c (ecb01c64d22a8099bd0b1f7ba85a76375d65c3a3) | link_elf.c (65a311fcb2f44fce7eb05160d3198cefed5c27f9) |
---|---|
1/*- 2 * Copyright (c) 1998-2000 Doug Rabson 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 478 unchanged lines hidden (view full) --- 487#endif 488 dp = (vm_offset_t)ef->address + *(vm_offset_t *)dynptr; 489 ef->dynamic = (Elf_Dyn *)dp; 490 lf->address = ef->address; 491 lf->size = *(size_t *)sizeptr; 492 493 error = parse_dynamic(ef); 494 if (error) { | 1/*- 2 * Copyright (c) 1998-2000 Doug Rabson 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 478 unchanged lines hidden (view full) --- 487#endif 488 dp = (vm_offset_t)ef->address + *(vm_offset_t *)dynptr; 489 ef->dynamic = (Elf_Dyn *)dp; 490 lf->address = ef->address; 491 lf->size = *(size_t *)sizeptr; 492 493 error = parse_dynamic(ef); 494 if (error) { |
495 linker_file_unload(lf); | 495 linker_file_unload(lf, LINKER_UNLOAD_FORCE); |
496 return error; 497 } 498 link_elf_reloc_local(lf); 499 *result = lf; 500 return (0); 501} 502 503static int --- 337 unchanged lines hidden (view full) --- 841 goto out; 842 843nosyms: 844 845 *result = lf; 846 847out: 848 if (error && lf) | 496 return error; 497 } 498 link_elf_reloc_local(lf); 499 *result = lf; 500 return (0); 501} 502 503static int --- 337 unchanged lines hidden (view full) --- 841 goto out; 842 843nosyms: 844 845 *result = lf; 846 847out: 848 if (error && lf) |
849 linker_file_unload(lf); | 849 linker_file_unload(lf, LINKER_UNLOAD_FORCE); |
850 if (shdr) 851 free(shdr, M_LINKER); 852 if (firstpage) 853 free(firstpage, M_LINKER); 854 VOP_UNLOCK(nd.ni_vp, 0, td); 855 vn_close(nd.ni_vp, FREAD, td->td_ucred, td); 856 857 return error; --- 463 unchanged lines hidden --- | 850 if (shdr) 851 free(shdr, M_LINKER); 852 if (firstpage) 853 free(firstpage, M_LINKER); 854 VOP_UNLOCK(nd.ni_vp, 0, td); 855 vn_close(nd.ni_vp, FREAD, td->td_ucred, td); 856 857 return error; --- 463 unchanged lines hidden --- |