summaryrefslogtreecommitdiff
path: root/libexec/ld.elf_so/Makefile
AgeCommit message (Collapse)Author
2021-12-04Error if there are undefined symbols, e.g. _rtld_call_ifuncskrll
2020-02-09Specify NOLIBCSANITIZER for the ELF loaderkamil
The sanitizer does not work reliably before finishing initialization of ld.elf_so. There is also a number of false positives that are not real problems here.
2019-11-04PR 54093: Align static TLS area to max_align_t.joerg
2019-04-03Disable optimization for rtld.c on the vax with gcc-7.christos
2018-12-27initfini array support for everyone.christos
2018-10-17Move compatibility for pre-2.0 ELF binaries into separate file.joerg
Early ELF binaries defined dlopen and friends in crt0.o by using function pointers in the object handle passed from rtld. This contract wastes space when many shared objects are allocated and ties dynamic linker and rest of the system tightly together. Fake the entry points in a static object and restrict them to the platforms that had working ELF support at the time. Keep the magic and version field used by modern crt0.o for all architectures. The checks will be removed from crt0.o in a follow-up step.
2018-06-09We can't build those three with MKSANITIZER, they are used too early.christos
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.
2016-12-01Instead of using a function to resolve symbols that should be supplied bychristos
the dynamic linker itself, use a version script that exposes them. From joerg@
2016-10-07revert, I'll fix libc instead.christos
2016-10-07Mips o32 needs -lgcc for __udivdi3 in headers.c for fast_divide32_prepare().christos
2016-06-16Move relro after we've computed out relocbase and re-enable it.christos
(Matthias Weckbecker)
2016-06-15Turn off GNU_RELRO for now.christos
2016-06-14Add support for GNU RELRO headers from Matthias Weckbecker.christos
2016-01-23Define _KERNTYPES for things that need it.christos
2014-09-19RISC-V support.matt
2014-09-03OR1K supportmatt
2014-08-10Changes to existing files to enable building AARCH64 userland.matt
evbarm64-el This is clang only. While gcc4.8 supports aarch64, no netbsd support has been written for aarch64 with gcc4.8.
2014-03-06Enable building ld.elf_so for powerpcmatt
Produce a link map for ld.elf_so
2013-11-16Remove hack now it's fixed in 4.8.2skrll
2013-11-13Apply hack for gcc 4.8 bug on rtld.c.skrll
2013-10-09Use MACHINE_CPU for m68k. Use similar logic for both tests.matt
2013-08-12Some architectures can't create unwind tables without the frame pointer,joerg
so don't use -fomit-frame-pointer on those.
2013-07-18Support MACHINE_ARCH of coldfirematt
2013-05-09Fix debug symlinkskrll
2013-05-08provide debug symlink.christos
2013-05-06don't overwrite COPTSchristos
2013-05-03Consistently use LDELFSO_MACHINE_ARCH.matt
2013-04-24Add support for PT_ARM_EXIDX and __gnu_Unwind_Find_exidx for libgcc's supportmatt
of the ARM EHABI.
2013-04-05split debug info for rtldchristos
2012-08-23Revert last, it breaks the tricks xsrc uses.joerg
2012-08-23Remove SHLIBINSTALLDIR and SHLINKINSTALLLIBDIR. Add rpath entries, ifjoerg
SHLIBDIR differs from /usr/lib.
2012-08-04Don't abuse DBG, use COPTS instead.matt
2012-03-15Add __diagassert13() so that if libc is compiled with _DIAGNOSTIC, it doeschristos
not end up bringing in all of stdio. XXX: This is temporary.
2011-10-07obsolete libgcc_pic and friends. all libgcc's are supposed to be picmrg
for platforms with shlibs already (and are.) this obsoletes our hacks for the libgcc specs to use libgcc_pic, and fixes a couple of other issues reported to me directly.
2011-06-27sh3 also needs libgcc_pic for millicode (cf. revision 1.107)uwe
2011-06-25PR/45015: ld.elf_so: support ELF symbol versioningnonaka
Applied latest patch.
2011-06-05Add libgcc_pic for millicode.christos
2011-05-30Use -Wl,-Bsymbolic directly for clangjoerg
2011-05-20Disable use of various X86 extensions since _rtld_bind_start doesn'tjoerg
save the necessary registers.
2011-05-20Explicitly disable linking against libgcc and friends.joerg
2011-03-09Add TLS support infrastructure. For dynamic binaries, ld.elf_so exportsjoerg
_rtld_tls_allocate and _rtld_tls_free. libpthread uses this functions to setup the thread private area of all new threads. ld.elf_so is responsible for setting up the private area for the initial thread. Similar functions are called from _libc_init for static binaries, using dl_iterate_phdr to access the ELF Program Header. Add test cases to exercise the different TLS storage models. Test cases are compiled and installed on all platforms, but are skipped on platforms not marked for TLS support. This material is based upon work partially supported by The NetBSD Foundation under a contract with Joerg Sonnenberger. It is inspired by the TLS support in FreeBSD by Doug Rabson and the clean ups of the DragonFly port of the original FreeBSD modifications.
2011-01-16Warn about DT_TEXTRELsmatt
2010-12-16Replace use of errlist with a single concatenated version and an offsetjoerg
array. This requires less storage and avoids one runtime relocation per errno value.
2010-12-16Don't use normal environment handling functions from libc, but iteratejoerg
once over the array and clean out entries as needed.
2010-12-05Build ld.elf_so with -fvisibility=hidden. Exploit this for i386/x86_64joerg
to simplify the assembler code.
2010-10-29PR/44010: YAMAMOTO Takashi: sbrk: grow 0xb3ba2000 failed, error = 12"christos
(due to setenv changes?) Provide a mini unsetenv that does not allocate/free memory and does not bother about locking.
2010-07-06remove almost all the ability to build netbsd with an a.out target.mrg
we're ELF now, and there are many missing checks against OBJECT_FMT. if we ever consider switching, the we can figure out what new ones we need but for now it's just clutter. this doesn't remove any of the support for exec_aout or any actually required-for-boot a.out support, only the ability to build a netbsd release in a.out format. ie, most of this code has been dead for over a decade. i've tested builds on vax, amd64, i386, mac68k, macppc, sparc, atari, amiga, shark, cats, dreamcast, landisk, mmeye and x68k. this covers the 5 MACHINE_ARCH's affected, and all the other arch code touched. it also includes some actual run-time testing of sparc, i386 and shark, and i performed binary comparison upon amiga and x68k as well. some minor details relevant: - move shlib.[ch] from ld.aout_so into ldconfig proper, and cut them down to only the parts ldconfig needs - remove various unused source files - switch amiga bootblocks to using elf2bb.h instead of aout2bb.h
2010-03-20Only apply -Wno-stack-protector where alloca is used.skrll
2010-03-19Use the gcc directive to disable SSP warnings.roy