| #
ce716eeb |
| 03-Aug-2024 |
riastradh <riastradh@NetBSD.org> |
ld.elf_so(1): Nix trailing whitespace.
No functional change intended.
|
| #
7d5e3ea3 |
| 04-Jan-2023 |
christos <christos@NetBSD.org> |
comment out a function that is only used in rtld
|
| #
45f12ca2 |
| 04-Dec-2021 |
skrll <skrll@NetBSD.org> |
Restore the fptr_t type of {init,fini}{,_array} that was removed when initial support for indirect functions was added. This fixes {init,fini}_array support on hppa where each member of the array is
Restore the fptr_t type of {init,fini}{,_array} that was removed when initial support for indirect functions was added. This fixes {init,fini}_array support on hppa where each member of the array is (already) a plabel.
Discussed with joerg.
4 files changed, 29 insertions(+), 39 deletions(-) : ----------------------------------------------------------------------
show more ...
|
| #
d736ede9 |
| 16-May-2020 |
skrll <skrll@NetBSD.org> |
Fix debug build
|
| #
da570a62 |
| 04-Mar-2020 |
thorpej <thorpej@NetBSD.org> |
PT_GNU_RELRO segments are arranged such that their vaddr + memsz ends on a linker common page size boundary. However, if the common page size used by the linker is less than the VM page size being u
PT_GNU_RELRO segments are arranged such that their vaddr + memsz ends on a linker common page size boundary. However, if the common page size used by the linker is less than the VM page size being used by the kernel, this can end up in the middle of a VM page and when the region is write- protected, this can cause objects in neighboring .data to get incorrectly write-protected, resulting in a crash.
Avoid this situation by calculating the end of the RELRO region not by rounding memsz up to the VM page size, but rather by adding vaddr + memsz and then truncating to the VM page size.
Fixes PR toolchain/55043.
XXX pullup-9
show more ...
|
| #
0b0e2ac4 |
| 29-Feb-2020 |
kamil <kamil@NetBSD.org> |
Add extra cast to suppress incompatible-pointer-types GCC warning
|
| #
e8e47701 |
| 29-Feb-2020 |
kamil <kamil@NetBSD.org> |
Implement DT_GNU_HASH
DT_GNU_HASH serves the same purpose as DT_HASH, however it is a distinct and faster apprach implemented and designed in the GNU toolchain in 2006.
DT_GNU_HASH is preferred whe
Implement DT_GNU_HASH
DT_GNU_HASH serves the same purpose as DT_HASH, however it is a distinct and faster apprach implemented and designed in the GNU toolchain in 2006.
DT_GNU_HASH is preferred whenever available.
Original GNU benchmarks claim 50% faster dynamic linking time. https://www.sourceware.org/ml/binutils/2006-06/msg00418.html
Code based on FreeBSD and OpenBSD, both were based on DragonFlyBSD.
show more ...
|
| #
e4d02a93 |
| 30-Dec-2018 |
martin <martin@NetBSD.org> |
Add support for DT_RUNPATH - it is just the same as we always have treated DT_RPATH. Approved by core.
|
| #
da0b2993 |
| 24-Jul-2018 |
joerg <joerg@NetBSD.org> |
Apply relocbase for tlsinit of the executable itself. Fixes PIE where relocbase typically is not zero.
PR bin/53465
|
| #
b5fd6cb2 |
| 24-May-2018 |
christos <christos@NetBSD.org> |
rename flag to the official name.
|
| #
a7f7db4a |
| 23-Jun-2017 |
joerg <joerg@NetBSD.org> |
Remove old assert that only two segments exist. The rest of the code has been changed to cope with more and at least Go actively creates them. Adjust the mapping size computation to use the maximum a
Remove old assert that only two segments exist. The rest of the code has been changed to cope with more and at least Go actively creates them. Adjust the mapping size computation to use the maximum and not depend on PT_LOAD segments to be in order.
show more ...
|
| #
0e6265fc |
| 14-Jun-2016 |
christos <christos@NetBSD.org> |
Add support for GNU RELRO headers from Matthias Weckbecker.
|
| #
6e49b777 |
| 22-May-2016 |
joerg <joerg@NetBSD.org> |
obj->phdr must be the absolute address, not the virtual offset from the main binary. Historically, this has been the same. For PIE though, relocbase can be pretty much anywhere. Fixes PR toolchain/51
obj->phdr must be the absolute address, not the virtual offset from the main binary. Historically, this has been the same. For PIE though, relocbase can be pretty much anywhere. Fixes PR toolchain/51159.
show more ...
|
| #
c1a71e80 |
| 26-Aug-2014 |
joerg <joerg@NetBSD.org> |
Restore parenthesis to cast in the right order.
|
| #
db25848c |
| 26-Aug-2014 |
christos <christos@NetBSD.org> |
fix set but not used.
|
| #
5d065997 |
| 26-Aug-2014 |
joerg <joerg@NetBSD.org> |
Go back to skipping init/fini handling for ldd, makes problems for 32bit compat on LP64.
|
| #
d9972a46 |
| 26-Aug-2014 |
christos <christos@NetBSD.org> |
Introduce a cast to fix the build for Elf32 on _LP64.
|
| #
7a1a6f1c |
| 25-Aug-2014 |
joerg <joerg@NetBSD.org> |
Add basic support for indirect functions. It allows providing a public function symbol with an implementation choosen at run time. Refactor calls to functions by address in ld.elf_so to create tempor
Add basic support for indirect functions. It allows providing a public function symbol with an implementation choosen at run time. Refactor calls to functions by address in ld.elf_so to create temporary function descriptors on the stack, if the address is not leaked outside.
Limitations: - no support for initialising static storage with function pointers - no support for unnamed resolver functions
Inspired by FreeBSD's r228435 by kib@freebsd.org.
show more ...
|
| #
9b490ebf |
| 07-Mar-2014 |
matt <matt@NetBSD.org> |
Make ldd happy
|
| #
1200e7d3 |
| 06-Mar-2014 |
matt <matt@NetBSD.org> |
More PPC64 changes. Nothing to do for lazy bindings. Record DT_PPC64_GLINK and make _rtld_bind return it. When resolving a JMP_SLOT, copy the source function descriptor into the PLTGOT
|
| #
ffcdb0b1 |
| 03-Aug-2013 |
skrll <skrll@NetBSD.org> |
Fix DEBUG build.
|
| #
a3fedff4 |
| 06-May-2013 |
christos <christos@NetBSD.org> |
Fixed handling of DT_SONAME:
- add function to add name aliases for shared libraries loaded XXX[1]: we don't add a name during load time, only when DT_SONAME is present. - search already loa
Fixed handling of DT_SONAME:
- add function to add name aliases for shared libraries loaded XXX[1]: we don't add a name during load time, only when DT_SONAME is present. - search already loaded objects in load_by_name for an already loaded object that matches our name and return it. - add missing initialization and cleanup for obj->names XXX[2]: should we make them SIMPLEQ? - Add XXX in rtld.c about getting the name of an object.
NB: This makes the jdk work again without resorting to a hack of putting the build path of libjvm.so into the run path (which is a security problem). XXX: Pullup-6?
show more ...
|
| #
b49eab8e |
| 06-May-2013 |
skrll <skrll@NetBSD.org> |
Trailing whitespace
|
| #
144fe47c |
| 06-May-2013 |
skrll <skrll@NetBSD.org> |
Add some DEBUG code.
|
| #
6b1442b0 |
| 02-May-2013 |
matt <matt@NetBSD.org> |
Print out PT_DYNAMIC address for objmain. Print out &_DYNAMIC too.
|