#
1e43641e |
| 18-Nov-2023 |
deraadt <deraadt@openbsd.org> |
crt0 uses a helper function in a MD src/libexec/ld.so .h file (rather than reproducing the relevant defines and code in a different place) to perform minor relocations. If things go very wrong, it w
crt0 uses a helper function in a MD src/libexec/ld.so .h file (rather than reproducing the relevant defines and code in a different place) to perform minor relocations. If things go very wrong, it would call _dl_exit() -- a locally defined crt0 function which is syscall exit(2). We don't need to call exit(2) for this obscure case which doesn't happen and provides no debugging information. An 'abort' is going to provide better information. So let's change the function name to _dso_abort() and make it a single illegal instruction. ok guenther
show more ...
|
#
b0714f38 |
| 17-Jan-2022 |
guenther <guenther@openbsd.org> |
Nothing depends on archdep.h pulling in other #includes anymore, so delete the #includes and hide the RELOC_* functions that are only used by lib/csu behind "#ifdef RCRT0"
these are the ones I teste
Nothing depends on archdep.h pulling in other #includes anymore, so delete the #includes and hide the RELOC_* functions that are only used by lib/csu behind "#ifdef RCRT0"
these are the ones I tested; kettenis@ was on board with the concept
show more ...
|
#
246ef78e |
| 14-Nov-2021 |
guenther <guenther@openbsd.org> |
Delete all the no-op RELOC_GOT() macros and their uses. Annotate RELOC_DYN() on non-hppa as only used in lib/csu. Delete some inconsistent comments, adjust whitespace, and reorder mips64's archdep.
Delete all the no-op RELOC_GOT() macros and their uses. Annotate RELOC_DYN() on non-hppa as only used in lib/csu. Delete some inconsistent comments, adjust whitespace, and reorder mips64's archdep.h so that the ld.so/*/archdep.h files look (almost) the same.
ok visa@ kettenis@
show more ...
|
#
e3b0f1d9 |
| 23-Oct-2019 |
guenther <guenther@openbsd.org> |
Prefer the size-independent ELF identifiers over the size-specific ones. Strip superfluous parens from return statements while here.
Done programatically with two perl invocations
idea ok kettenis@
Prefer the size-independent ELF identifiers over the size-specific ones. Strip superfluous parens from return statements while here.
Done programatically with two perl invocations
idea ok kettenis@ drahn@ ok visa@
show more ...
|
#
e9d517b1 |
| 27-Oct-2017 |
mpi <mpi@openbsd.org> |
Use <elf.h> instead of <elf_abi.h>
ok jasper@, jca@, deraadt@
|
#
3b50b772 |
| 24-Jan-2017 |
guenther <guenther@openbsd.org> |
On fatal errors, kill ourselves with thrkill(0,9,NULL) instead of simply exiting, via helper functions _dl_die(), _dl_diedie(), and _dl_oom().
prompted by a complaint from jsing@ ok jsing@ deraadt@
|
#
6abcb730 |
| 20-Jan-2017 |
guenther <guenther@openbsd.org> |
Delete ancient macros and unnecessary #includes
ok deraadt@
|
#
41acbfd8 |
| 09-Jan-2017 |
kettenis <kettenis@openbsd.org> |
Remove dependency on __got_{start,end} symbols and look at PT_GNU_RELRO instead. Result in a few more pages that aren't writable on some platforms (such as hppa). Based on an initial diff from guen
Remove dependency on __got_{start,end} symbols and look at PT_GNU_RELRO instead. Result in a few more pages that aren't writable on some platforms (such as hppa). Based on an initial diff from guenther@.
Thanks to deraadt@ for testing.
ok guenther@
show more ...
|
#
01804a41 |
| 06-Dec-2015 |
guenther <guenther@openbsd.org> |
Simplify the relocation code for the ld.so bootstrap and static pie: track just the dynamic tags are needed instead of reusing the generic elf_object_t structure.
testing and feedback from miod@ ok
Simplify the relocation code for the ld.so bootstrap and static pie: track just the dynamic tags are needed instead of reusing the generic elf_object_t structure.
testing and feedback from miod@ ok kettenis@
show more ...
|
#
071856ce |
| 19-Sep-2015 |
kettenis <kettenis@openbsd.org> |
Remove PROT_EXEC bit from GOT_PERMS. ld.so doesn't need it anymore, and rcrt0.o will add it for BSS-PLT binaries if necessary.
ok guenther@
|
#
379d9589 |
| 03-Nov-2014 |
guenther <guenther@openbsd.org> |
Eliminate RTLD_PROTECT_PLT: ld.so is built with -Bsymbolic so the PLT is empty/unused. On at least macppc and sparc64, ld.so's attempt to mprotect its PLT could instead hit its own allocated data an
Eliminate RTLD_PROTECT_PLT: ld.so is built with -Bsymbolic so the PLT is empty/unused. On at least macppc and sparc64, ld.so's attempt to mprotect its PLT could instead hit its own allocated data and cause a segfault shortly there after.
While here, take a shot at preventing the same issue with the GOT by checking for __got_start != __got_end.
reproduction *with ktracing* by afresh1@ provided the key data ok miod@ deraadt@
show more ...
|
#
475293bb |
| 05-Jul-2014 |
miod <miod@openbsd.org> |
No need to redefine DT_PROCNUM and DT_BIND_NOW here, these are provided by MI <elf_abi.h>.
|
#
478ba79d |
| 02-Jan-2010 |
kettenis <kettenis@openbsd.org> |
Fix handling of hppa RELOC_IPLT relocations during 'bootstrap relocation'.
ok miod@, deraadt@, jsing@
|
#
ab396018 |
| 24-May-2004 |
drahn <drahn@openbsd.org> |
Change define used to deal with PLT protection, use postive logic not negative. ok mickey@
|
#
5d1c74ea |
| 09-Jun-2003 |
deraadt <deraadt@openbsd.org> |
pefo 3/4 licence cleanups
|
#
1d1aa375 |
| 15-Feb-2003 |
drahn <drahn@openbsd.org> |
After relocation is completed, remove write protection from GOT/PLT in ld.so.
|
#
1a25d5a9 |
| 25-Oct-2002 |
pefo <pefo@openbsd.org> |
Some small fixes in MI code for mips backport. A new reloc md function, RELOC_GOT, was added to handle mips got bootstrap reloc.
Also remove workaround used on previous versions of binutils for mips.
|
#
c20107e0 |
| 12-Aug-2002 |
drahn <drahn@openbsd.org> |
Add support for REL type relocations, all currently supported arch use only RELA type relocations, but that could change. ok art@
|
#
bcbffc12 |
| 12-Jul-2002 |
drahn <drahn@openbsd.org> |
Change ld.so search order/method to match the a.out ld.so.
run destructors on dlclose()
Move more symbols into _dl_ private space, so that the proper (libc) version of the function will be used.
A
Change ld.so search order/method to match the a.out ld.so.
run destructors on dlclose()
Move more symbols into _dl_ private space, so that the proper (libc) version of the function will be used.
Add readdir() functionality to perform the proper library searching.
Support DL_PRELOAD
Do not relocate symbols if ld.so is being traced (and will exit).
Misc lint cleanup.
ok art@
show more ...
|
#
f076da76 |
| 24-May-2002 |
deraadt <deraadt@openbsd.org> |
more KNF
|
#
39b7d201 |
| 24-May-2002 |
deraadt <deraadt@openbsd.org> |
various KNF
|
#
19b70b43 |
| 29-Apr-2002 |
drahn <drahn@openbsd.org> |
Clean up RELOC_RELATIVE reloction type, do correct relocation instead of incorrect symbol handling for it. RELOC_RELA() is not a macro, so remove extra () from the code, try to print error and exit i
Clean up RELOC_RELATIVE reloction type, do correct relocation instead of incorrect symbol handling for it. RELOC_RELA() is not a macro, so remove extra () from the code, try to print error and exit if unknown relocation type is encountered.
show more ...
|
#
41c230b7 |
| 21-Feb-2002 |
drahn <drahn@openbsd.org> |
cleanup of MD/MI ld.so (elf), most changes by art@ cleanup by me. tested on alpha sparc64 powerpc.
|
#
b0d56129 |
| 19-Oct-2000 |
drahn <drahn@openbsd.org> |
Fix bug in dl_strcmp, it is not always legal to access a pointer at offset -1, the code that was here was very odd, the corrected code was basically copied from the libsa version.
|
#
c6ba0247 |
| 01-Oct-2000 |
rahnds <rahnds@openbsd.org> |
Sync the cache as specified by the powerpc manuals, didn't change anything. but is more correct.
|