#
b722ba42 |
| 08-Jan-2022 |
guenther <guenther@openbsd.org> |
Prep .c files for removing the #includes from */archdep.h * replace #include "archdep.h" with #includes of what is used, pulling in "syscall.h", "util.h", and "archdep.h" as needed * delete #inc
Prep .c files for removing the #includes from */archdep.h * replace #include "archdep.h" with #includes of what is used, pulling in "syscall.h", "util.h", and "archdep.h" as needed * delete #include <sys/syscall.h> from syscall.h * only pull in <sys/stat.h> to the three files that use _dl_fstat(), forward declare struct stat in syscall.h for the others * NBBY is for <sys/select.h> macros; just use '8' in dl_printf.c * <machine/vmparam.h> is only needed on i386; conditionalize it * stop using __LDPGSZ: use _MAX_PAGE_SHIFT (already used by malloc.c) where necessary * delete other bogus #includes, order legit per style: <sys/*> then <*/*>, then <*>, then "*"
dir.c improvement from jsg@ ok and testing assistance deraadt@
show more ...
|
#
d9337de3 |
| 07-Dec-2019 |
guenther <guenther@openbsd.org> |
Disable ltrace for objects linked with -znow, as at least on amd64, linking that was deletes the lazy relocation trampoline which ltrace currently depends on
problem reported by tb@ directional feed
Disable ltrace for objects linked with -znow, as at least on amd64, linking that was deletes the lazy relocation trampoline which ltrace currently depends on
problem reported by tb@ directional feedback kettenis@ ok mpi@
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 ...
|
#
d6b8755e |
| 05-Oct-2019 |
guenther <guenther@openbsd.org> |
Delete some obsolete debugging #ifdefs blocks
ok mlarkin@, mpi@, krw@, deraadt@
|
#
90273bfb |
| 06-Aug-2019 |
guenther <guenther@openbsd.org> |
Factor out TEXTREL mprotecting from the per-arch files into _dl_rtld(), hiding the actual grotty bits in inline functions
ok mpi@
|
#
143e5acc |
| 04-Aug-2019 |
guenther <guenther@openbsd.org> |
Simplify _dl_find_symbol(). Currently, it returns three values: - the symbol it found, returned via the second argument - the base offset of the the object it was found in, via the return value -
Simplify _dl_find_symbol(). Currently, it returns three values: - the symbol it found, returned via the second argument - the base offset of the the object it was found in, via the return value - optionally: the object it was found in, returned via the last argument
Instead, return a struct with the symbol and object pointers and let the caller get the base offset from the object's obj_base member. On at least aarch64, amd64, mips64, powerpc, and sparc64, a two word struct like this is passed in registers.
ok mpi@, kettenis@
show more ...
|
#
c9db2c6c |
| 22-Nov-2018 |
guenther <guenther@openbsd.org> |
Make alpha less special: _dl_boot_bind() is written to complete relocation of ld.so's GOT without using it, so _reloc_alpha_got() merely made the call to _dl_boot_bind() from asm simpler...while itse
Make alpha less special: _dl_boot_bind() is written to complete relocation of ld.so's GOT without using it, so _reloc_alpha_got() merely made the call to _dl_boot_bind() from asm simpler...while itself being a call that required special handling.
diff and muild baking by miod@ ok guenther@
show more ...
|
#
25205068 |
| 16-Nov-2018 |
guenther <guenther@openbsd.org> |
Finish ld.so's transition to GNU_RELRO: eliminate support for using __got_{start,end} to find a region to mark read-only. It was only used for binaries that didn't have a GNU_RELRO segment, but all
Finish ld.so's transition to GNU_RELRO: eliminate support for using __got_{start,end} to find a region to mark read-only. It was only used for binaries that didn't have a GNU_RELRO segment, but all archs have been using that for over a year. Since support for insecure-PLT layouts on powerpc and alpha have been removed, all archs handle GNU_RELRO the same way and the support can be moved from the MD code to the MI code.
ok mpi@
show more ...
|
#
9e9d93fd |
| 12-Nov-2018 |
guenther <guenther@openbsd.org> |
Delete support for non-secureplt binaries. The secure PLT format has been the default for years and ports doesn't appear to have anything patching to use the old format.
ok deraadt@
|
#
d6291a7b |
| 10-Oct-2017 |
guenther <guenther@openbsd.org> |
__plt_{start,end} are no longer generated or necessary, having been superseded by the generic ?WX and RELRO support. Stop trying to look up and use them.
ok kettenis@ deraadt@
|
#
d9d17dbf |
| 16-Feb-2017 |
deraadt <deraadt@openbsd.org> |
correct format strings, ok guenther
|
#
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@
|
#
c9b6ee73 |
| 21-Jun-2016 |
deraadt <deraadt@openbsd.org> |
When handling DT_TEXTREL only set the mapping to READ+WRITE, ignore possible EXEC permission for the section, because the proper permission is set late, and there are no thread concerns here. Avoids
When handling DT_TEXTREL only set the mapping to READ+WRITE, ignore possible EXEC permission for the section, because the proper permission is set late, and there are no thread concerns here. Avoids W^X issues in oddball cases. ok guenther kettenis
show more ...
|
#
702424ca |
| 20-Mar-2016 |
guenther <guenther@openbsd.org> |
Export environ and __progname, making the latter a copy of just the filename portion like crt0 does. This is prep for eliminating _dl_fixup_user_env() Mark almost everything in resolve.h as hidden,
Export environ and __progname, making the latter a copy of just the filename portion like crt0 does. This is prep for eliminating _dl_fixup_user_env() Mark almost everything in resolve.h as hidden, to improve code generation.
ok kettenis@ mpi@ "good time" deraadt@
show more ...
|
#
d64ca068 |
| 22-Dec-2015 |
mmcc <mmcc@openbsd.org> |
assign pointers to NULL rather than 0
|
#
e23a26ff |
| 02-Nov-2015 |
guenther <guenther@openbsd.org> |
Factor out the logic for mprotecting the memory between two symbols into a new MI routine _dl_protect_segment(), and use that for protecting the GOT and--on some archs--the PLT.
Amazing testing turn
Factor out the logic for mprotecting the memory between two symbols into a new MI routine _dl_protect_segment(), and use that for protecting the GOT and--on some archs--the PLT.
Amazing testing turnaround by miod@, who apparently violated relativity to get back results on some archs as fast as he did
show more ...
|
#
6d086794 |
| 23-Sep-2015 |
kettenis <kettenis@openbsd.org> |
Don't be too agressive write-protecting the GOT and PLT. If we have no clue where they end, there is a good chance they are sharing a page with .data, which obviously needs to remain writable. So o
Don't be too agressive write-protecting the GOT and PLT. If we have no clue where they end, there is a good chance they are sharing a page with .data, which obviously needs to remain writable. So only attempt to make them read-only if we know they have a non-zero size. Original diff from guenther@ based on an earlier diff from me. Fixes ld -Z on alpha.
ok miod@, guenther@
show more ...
|
#
7ad95679 |
| 26-Aug-2015 |
guenther <guenther@openbsd.org> |
Kbind 3: The Legend Continues! Use kbind for lazy binding GOT/PLT updates on alpha and mips64. While here add some gcc __predict hints.
Much discussion with and assistance from miod and deraadt ok d
Kbind 3: The Legend Continues! Use kbind for lazy binding GOT/PLT updates on alpha and mips64. While here add some gcc __predict hints.
Much discussion with and assistance from miod and deraadt ok deraadt@
show more ...
|
#
4131953d |
| 29-May-2015 |
miod <miod@openbsd.org> |
Make ld.so on alpha cope with binaries built with secureplt (where secure here means read-only, which our ld.so already enforced, but a smaller plt section).
|
#
511b1d37 |
| 27-Dec-2014 |
kettenis <kettenis@openbsd.org> |
Make ld.so process only R_ALPHA_RELATIVE relocations during early GOT relocation in _reloc_alpha_got(), and teach RELOC_RELA() to skip R_ALPHA_NONE relocations (which are just nops used to fill out t
Make ld.so process only R_ALPHA_RELATIVE relocations during early GOT relocation in _reloc_alpha_got(), and teach RELOC_RELA() to skip R_ALPHA_NONE relocations (which are just nops used to fill out the relocation table). Handling R_ALPHA_NONE relocations will be necessary for static PIE support and it is not inconceivable that ld.so will end up with such relocations at some point.
ok kurt@
show more ...
|
#
f6193dee |
| 16-Apr-2014 |
guenther <guenther@openbsd.org> |
It's been a quarter century: we can assume volatile is present with that name.
|
#
875211e1 |
| 13-Jun-2013 |
brad <brad@openbsd.org> |
Appease LLVM warning..
error: indirection of non-volatile null pointer will be deleted, not trap [-Werror,-Wnull-dereference]
Suggestion from matthew@ Ok matthew@ miod@
|
#
ae398163 |
| 01-Jun-2013 |
miod <miod@openbsd.org> |
Introduce ltrace(1). This tool works with ld.so to inject utrace record for each plt call, allowing to trace a binary linked against shared library at the public function call level.
To do so, ltrac
Introduce ltrace(1). This tool works with ld.so to inject utrace record for each plt call, allowing to trace a binary linked against shared library at the public function call level.
To do so, ltrace(1) sets up some environment variables to enable plt tracing in ld.so, and invokes ktrace(2) for utrace events. ld.so will force lazy binding and will send an utrace record in the plt resolver, without updating the plt.
Minimal filtering capabilities are provided, inspired by Solaris' truss -u, to limit tracing to libraries and/or symbol names. Non-traced libraries and symbols will have the regular resolver processing, with the expected plt update.
"Get it in" deraadt
show more ...
|
#
88098a4d |
| 08-May-2013 |
guenther <guenther@openbsd.org> |
Implement symbol caching and RELACOUNT/RELCOUNT optimizations. Much assistance and testing by miod
ok miod@
|
#
4a39ccd0 |
| 05-Dec-2012 |
deraadt <deraadt@openbsd.org> |
Remove excessive sys/cdefs.h inclusion ok guenther millert kettenis
|