summaryrefslogtreecommitdiff
path: root/libexec
AgeCommit message (Collapse)Author
2018-04-03Rework ifunc support to address a number of short comings:joerg
- Move to a shared _rtld_call_ifunc for rel and rela architectures - Architectures using rel format must patch IRELATIVE non-PLT relocations like RELATIVE in additition to the later ifunc handling - Consistently record the delta to the end of the relocation group for non-PLT IRELATIVE relocations Hidden ifunc is now supported on all ifunc platforms, even when using -fno-plt. The combination of -fno-plt and relro is broken due to incorrect GNU ld output though.
2018-03-29Move the complex logic for dynamically writing branches from ld.elf_sojoerg
into a header for reuse in crt0.o for static ifunc support. Change the existing logic for sparc64 to use the Bicc variant of ba,a as it allows +-8MB displacement compared to the BPcc variant's +-1MB. Teach the sparc variant the same trick for using ba,a and not sethi+jmp when possible.
2018-03-25Don't skip PLT processing for the main binary. It can still containjoerg
ifunc references.
2018-03-09Like Sparc, PowerPC can use IRELATIVE relocations in non-PLT sections.joerg
2018-03-01delete now-irrelevant commentsnj
2018-02-28prune disabled XIDLE support. the required X server extension hasn't beensnj
around for a couple decades now. even if someone wanted to modernize this, it wouldn't be appropriate for NetBSD, since we don't want programs in base to be linked against X libs.
2018-02-25add LIBKRB5_LDADD/LIBKRB5_DPADD and their static counterpartsmrg
to bsd.prog.mk. use them instead of hard coding various lists of libraries for krb5. this fixes static builds.
2018-02-11Wrap PowerPC #pragma goop in #if __GNUC_PREREQ__(6,0).jakllsch
Our older GCC warns/errors on it.
2018-02-10We need authentication || encryption even when we are not buildingchristos
kerberos. They are needed for telnet_net_write() which is used in libtelnet.
2018-02-07update for GCC 6:mrg
ignore -Wframe-address warnings for the ppc hack.
2018-02-06- need string.hchristos
- cast options to long for OpenSSL-1.1
2018-02-04Various fixes / changes from Ryo Shimizu / Toru Nishimura to make thisskrll
work. _rtld_call_ifunc copied from other rela platforms by me - not tested in any way.
2018-02-04updates for GCC 6.4:mrg
identd has aliasing violations, use -fno-strict-aliasing. newfs_msdos's getbpbinfo() has missing {} issues. sysctl's kern_cp_id() has missing {} issues.
2018-01-28Use a protocol-agnostic URL (don't degrade HTTPS->HTTP)maya
Suggested by Travis Paul in PR bin/52958.
2018-01-19don't forget to eat the high bits.christos
2017-12-25Since GNU ld doesn't honor the PLT entry reservation, also compensatejoerg
for JMP_IREL relocations at the start of the PLT.
2017-12-25Fix typo in commentmaya
from freebsd
2017-12-24fix debug buildmaya
2017-11-28Document script handler issues with httpd(8).wiz
From martin@, addressing PR 52194. While here, use American spelling consistently and upper-case some abbreviations. Bump date.
2017-11-28PR bin/52194: bozohttpd fails to exec scripts via the -C mechanismmartin
sometimes with EFAULT due to not NULL terminated environment.
2017-11-06init/fini for the main program is handled by crt0.o, so ifunc handlingjoerg
is skipped right now as it iterates the same list. Don't repeat that mistake and explicitly take care of it in the dynamic linker.
2017-10-07fix to compile without USE_PAM. (unused variables)ryo
2017-10-05s/u_int/unsigned/.mrg
from Jan Danielsson. increases/fixes portability.
2017-10-02make this compile.christos
2017-10-02Include time.h for time.joerg
XXX Doesn't build with newer zlib, remove?
2017-08-28explain AARCH64 PLT designnisimura
2017-08-23- avoid caddr_t. use Elf_Addr instead.nisimura
- iron out rdbg() errors.
2017-08-12Add sparc/sparc64 support for irelative relocations.joerg
2017-08-10Add IRELATIVE support for ARM, X86 and PowerPC.joerg
2017-08-09If a DF_1_NODELETE DSO has been removed from the DAG list, it stilljoerg
needs to be able to resolve relocations against itself. As such, search the referencing object explicitly last, if it hasn't been searched before.
2017-07-24Fix thinko in previous: even if the address is an unsigned value and wemartin
have verified the range before, we still need to mask the bit pattern to the target instruction field.
2017-07-23Simplify and fix the offset calculation when doing a %pc relativemartin
branch from the PLT slot to the target.
2017-07-13Fix two bugs related to promotion of DSO TLS blocks into the staticjoerg
thread allocation: (1) Set the DTV vector up whenever an offset into the static allocation is assigned, even if the block itself is not initialized. This has been seen in libstdc++. (2) Do not free a DTV block if it is part of the static thread allocation.
2017-07-12rename the macrochristos
2017-07-12make this compile with debug again (symnum uninitialized)christos
2017-07-11Implement __cxa_thread_atexit and __cxa_thread_atexit_impl. Thisjoerg
functions are used for destructors of thread_local objects. If a pending destructor exists, prevent unloading of shared objects. Introduce __dl_cxa_refcount interface for this purpose. When the last reference is gone and the object has been dlclose'd before, the unloading is finalized. Ideally, __cxa_thread_atexit_impl wouldn't exist, but libstdc++ insists on providing __cxa_thread_atexit as direct wrapper without further patching.
2017-07-09Drop comments about symbol exporting, the relevant code is gone.joerg
2017-07-07fix ordering of a couple of words. from Edgar Pettijohn in PR#52375.mrg
thanks!
2017-07-04Add EXIT STATUS section. Use Ex.wiz
2017-07-03Remove workaround for ancient HTML generation code.wiz
2017-06-23Remove old assert that only two segments exist. The rest of the code hasjoerg
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.
2017-06-21Replace last use of r_type.joerg
2017-06-20Add back symnum, fix debug print.joerg
2017-06-20Add last_symnum, move up def and defobj.joerg
2017-06-20Fix C&P bug. Deal with more MIPS hacks overriding def.joerg
2017-06-20Expand symnum, GCC's uninitialized used tracking is too imprecise.joerg
2017-06-20Drop symbol number from default branch diagnostic, it isn't set at thisjoerg
point and most likely not valid either.
2017-06-19Replace COMBREL with just-in-time check in _rtld_relocate_nonplt_objects.joerg
The COMBREL logic predates thread-safety of the dynamic linker and breaks the use of shared locks for the common symbol lookup case. It is unlikely to provide any benefit for lazy binding or PLT lookups, so provide equivalent functionality in the non-PLT relocation handling loop by checking if the symbol used by the current relocation is the same as the one used during the last lookup. No inter-object cachine is done as it is also unlikely to be benefical. Testing with Firefox startup on AMD64 shows a small performance gain by the new method.
2017-06-15Fix indentation.joerg
2017-06-08Call _rtld_debug_state before running the global initialisers, so givejoerg
gdb a chance to set break points etc.