|
Revision tags: release/13.4.0-p5, release/13.5.0-p1, release/14.2.0-p3, release/13.5.0, release/14.2.0-p2, release/14.1.0-p8, release/13.4.0-p4, release/14.1.0-p7, release/14.2.0-p1, release/13.4.0-p3, release/14.2.0, release/13.4.0, release/14.1.0, release/13.3.0 |
|
| #
3cce838c |
| 28-Feb-2024 |
Konstantin Belousov <[email protected]> |
rtld: use generated map file to check for some leaks from libc into rtld
(cherry picked from commit 5db5c6c87a75f8b1871f021726fc4697253ae5cf)
|
| #
5a984731 |
| 28-Feb-2024 |
Konstantin Belousov <[email protected]> |
rtld: unconditionally generate map file during build
(cherry picked from commit 799940154c70597a46627deb4d0b98e174b27b98)
|
| #
a697425c |
| 12-Dec-2023 |
John Baldwin <[email protected]> |
Stop #defining FREEBSD_ELF
This was originally used (along with FREEBSD_AOUT) to prefer the use of ELF in various tools instead of a.out as part of the a.out to ELF transition in the 3.x days. The
Stop #defining FREEBSD_ELF
This was originally used (along with FREEBSD_AOUT) to prefer the use of ELF in various tools instead of a.out as part of the a.out to ELF transition in the 3.x days. The last use of it was removed from <link.h> in commit 66422f5b7a1a6055f0b2358268eb902aab6e2e3e back in 2002, but various files still #define it.
Reviewed by: kevans, imp, emaste Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D42964
(cherry picked from commit 4a3cf5f329d69076aa9d093d596eb0ee82d917f5)
show more ...
|
|
Revision tags: release/14.0.0 |
|
| #
d0b2dbfa |
| 16-Aug-2023 |
Warner Losh <[email protected]> |
Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
|
| #
195e5054 |
| 27-Jul-2023 |
Jessica Clarke <[email protected]> |
libexec: Automatically generate rtld-elf list and generalise TAGS
Note that the pattern for matching is made slightly more specific, so as to permit libcompats where one is a prefix of another (e.g.
libexec: Automatically generate rtld-elf list and generalise TAGS
Note that the pattern for matching is made slightly more specific, so as to permit libcompats where one is a prefix of another (e.g. CheriBSD has lib64 and lib64c).
Reviewed by: brooks, jhb, emaste, imp, kib Differential Revision: https://reviews.freebsd.org/D41183
show more ...
|
| #
ec1e8378 |
| 02-May-2023 |
Ed Maste <[email protected]> |
rtld: don't add extraneous -L directory when MK_TOOLCHAIN == no
rtld's Makefile used to add -L${LIBDIR} to LDFLAGS when MK_TOOLCHAIN was no. This was done as part of a change to fix building rtld w
rtld: don't add extraneous -L directory when MK_TOOLCHAIN == no
rtld's Makefile used to add -L${LIBDIR} to LDFLAGS when MK_TOOLCHAIN was no. This was done as part of a change to fix building rtld with MK_TOOLCHAIN == no (although I'm not sure this part was necessary).
In any case as of 5f2e84015da7 libc_pic.a is built independent of the MK_TOOLCHAIN setting and the main part of the workaround has already been removed. Remove the rest now.
This reverts commit c0f5aeb0329d71e6b02379133c0c9c0145c9afea.
Reviewed by: jrtc27 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39938
show more ...
|
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0, release/12.3.0 |
|
| #
d0f0e0bd |
| 13-Oct-2021 |
Emmanuel Vadot <[email protected]> |
rtld: Do not install libmap.conf when installing the COMPAT32 version
This has the effect of installing the same file twice at the same location and confuse pkgbase as we add this file twice in the
rtld: Do not install libmap.conf when installing the COMPAT32 version
This has the effect of installing the same file twice at the same location and confuse pkgbase as we add this file twice in the package config part.
MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG
show more ...
|
| #
7bc797e3 |
| 02-Aug-2021 |
Alex Richardson <[email protected]> |
Add build system support for ASAN+UBSAN instrumentation
This adds two new options WITH_ASAN/WITH_UBSAN that can be set to enable instrumentation of all binaries with AddressSanitizer and/or Undefine
Add build system support for ASAN+UBSAN instrumentation
This adds two new options WITH_ASAN/WITH_UBSAN that can be set to enable instrumentation of all binaries with AddressSanitizer and/or UndefinedBehaviourSanitizer. This current patch is almost sufficient to get a complete buildworld with sanitizer instrumentation but in order to actually build and boot a system it depends on a few more follow-up commits.
Reviewed By: brooks, kib, markj Differential Revision: https://reviews.freebsd.org/D31043
show more ...
|
|
Revision tags: release/13.0.0 |
|
| #
63f93c7e |
| 28-Dec-2020 |
Ryan Libby <[email protected]> |
rtld-elf: link libcompiler_rt on all architectures
Statically link rtld-elf with libcompiler_rt on all architectures so that we don't need to try to pick and choose the bits we need from it for each
rtld-elf: link libcompiler_rt on all architectures
Statically link rtld-elf with libcompiler_rt on all architectures so that we don't need to try to pick and choose the bits we need from it for each architecture (we now leave that to the linker). Compilers may emit calls to support functions in this library, but because of the use of the linker flag -nostdlib for rtld's special needs, the library is not linked as normal.
Previously we had two different solutions. On some architectures, we were able to extract reimplementations of the necessary builtin functions from our special build of libc. On ARM, we just linked libcompiler_rt.
This is motivated by the same issue as D26199 and D27665, but should be a simpler solution that will apply to all architectures.
Reviewed by: arichardson, kib Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D27736
show more ...
|
|
Revision tags: release/12.2.0 |
|
| #
7cc42f6d |
| 01-Oct-2020 |
Kyle Evans <[email protected]> |
Do a sweep and remove most WARNS=6 settings
Repeating the default WARNS here makes it slightly more difficult to experiment with default WARNS changes, e.g. if we did something absolutely bananas an
Do a sweep and remove most WARNS=6 settings
Repeating the default WARNS here makes it slightly more difficult to experiment with default WARNS changes, e.g. if we did something absolutely bananas and introduced a WARNS=7 and wanted to try lifting the default to that.
Drop most of them; there is one in the blake2 kernel module, but I suspect it should be dropped -- the default WARNS in the rest of the build doesn't currently apply to kernel modules, and I haven't put too much thought into whether it makes sense to make it so.
show more ...
|
| #
24faccc2 |
| 23-Sep-2020 |
Brandon Bergren <[email protected]> |
[PowerPC64LE] Use a shared LIBC_ARCH for powerpc64le.
Given that we have converted to ELFv2 for BE already, endianness is the only difference between the two ARCHs.
As such, there is no need to dif
[PowerPC64LE] Use a shared LIBC_ARCH for powerpc64le.
Given that we have converted to ELFv2 for BE already, endianness is the only difference between the two ARCHs.
As such, there is no need to differentiate LIBC_ARCH between the two.
Combining them like this lets us avoid needing to have two copies of several bits for no good reason.
Sponsored by: Tag1 Consulting, Inc.
show more ...
|
| #
94179175 |
| 17-Aug-2020 |
Xin LI <[email protected]> |
Don't explicitly specify c99 or gnu99 as the default is now gnu99.
MFC after: 2 weeks
|
| #
e9751a84 |
| 16-Jul-2020 |
John Baldwin <[email protected]> |
Include FreeBSD ABI tag note in the ELF runtime loader.
Reviewed by: kib Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D25306
|
|
Revision tags: release/11.4.0 |
|
| #
fac6dee9 |
| 12-May-2020 |
Eric van Gyzen <[email protected]> |
Remove tests for obsolete compilers in the build system
Assume gcc is at least 6.4, the oldest xtoolchain in the ports tree. Assume clang is at least 6, which was in 11.2-RELEASE. Drop conditions f
Remove tests for obsolete compilers in the build system
Assume gcc is at least 6.4, the oldest xtoolchain in the ports tree. Assume clang is at least 6, which was in 11.2-RELEASE. Drop conditions for older compilers.
Reviewed by: imp (earlier version), emaste, jhb MFC after: 2 weeks Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D24802
show more ...
|
| #
5a77ce24 |
| 29-Apr-2020 |
Michal Meloun <[email protected]> |
Move ARM specific flags to arm/Makefile.inc
Requested by: kib MFC with: r360463
|
| #
7838a782 |
| 29-Apr-2020 |
Michal Meloun <[email protected]> |
Don't allow to use FPU inside of rtld library. Clang10 may use FPU instructions for optimizing operations with memory blocks. But we don't want to do lengthy save/restore of all FPU registers across
Don't allow to use FPU inside of rtld library. Clang10 may use FPU instructions for optimizing operations with memory blocks. But we don't want to do lengthy save/restore of all FPU registers across each rtld_start() call.
MFC after: 3 week
show more ...
|
| #
7e3300e5 |
| 11-Jan-2020 |
Konstantin Belousov <[email protected]> |
rtld: clean up Makefile.
Move all MD statements into $MACHINE_ARCH/Makefile.inc. Unconditionally apply version script to rtld, the interpreter is not functional without it for long time.
Reviewed b
rtld: clean up Makefile.
Move all MD statements into $MACHINE_ARCH/Makefile.inc. Unconditionally apply version script to rtld, the interpreter is not functional without it for long time.
Reviewed by: brooks, emaste Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D23083
show more ...
|
| #
051ed84f |
| 12-Nov-2019 |
Brooks Davis <[email protected]> |
libcompat: Correct rtld MLINKS
Don't install duplicate ld-elf.so.1.1 and ld.so.1 links in rtld-elf32. Do install lib-elf32.so.1.1 and ldd32.1 links.
Reported by: madpilot
|
| #
a4330302 |
| 07-Nov-2019 |
Brooks Davis <[email protected]> |
libcompat: build 32-bit rtld and ldd as part of "everything"
Alter bsd.compat.mk to set MACHINE and MACHINE_ARCH when included directly so MD paths in Makefiles work. In the process centralize setti
libcompat: build 32-bit rtld and ldd as part of "everything"
Alter bsd.compat.mk to set MACHINE and MACHINE_ARCH when included directly so MD paths in Makefiles work. In the process centralize setting them in LIBCOMPATWMAKEENV.
Alter .PATH and CFLAGS settings in work when the Makefile is included.
While here only support LIB32 on supported platforms rather than always enabling it and requiring users of MK_LIB32 to filter based TARGET/MACHINE_ARCH.
The net effect of this change is to make Makefile.libcompat only build compatability libraries.
Changes relative to r354449:
Correct detection of the compiler type when bsd.compat.mk is used outside Makefile.libcompat. Previously it always matched the clang case.
Set LDFLAGS including the linker emulation for mips where -m32 seems to be insufficent.
Reviewed by: imp, kib (origional version in r354449) Obtained from: CheriBSD (conceptually) Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D22251
show more ...
|
| #
ccad77fe |
| 07-Nov-2019 |
Brooks Davis <[email protected]> |
Revert r354449: libcompat: build 32-bit rtld and ldd as part of "everything"
Additional testing is required..
|
| #
36712a94 |
| 07-Nov-2019 |
Brooks Davis <[email protected]> |
libcompat: build 32-bit rtld and ldd as part of "everything"
Alter bsd.compat.mk to set MACHINE and MACHINE_ARCH when included directly so MD paths in Makefiles work. In the process centralize setti
libcompat: build 32-bit rtld and ldd as part of "everything"
Alter bsd.compat.mk to set MACHINE and MACHINE_ARCH when included directly so MD paths in Makefiles work. In the process centralize setting them in LIBCOMPATWMAKEENV.
Alter .PATH and CFLAGS settings in work when the Makefile is included.
While here only support LIB32 on supported platforms rather than always enabling it and requiring users of MK_LIB32 to filter based TARGET/MACHINE_ARCH.
The net effect of this change is to make Makefile.libcompat only build compatability libraries.
Reviewed by: imp, kib Obtained from: CheriBSD (conceptually) Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D22251
show more ...
|
|
Revision tags: release/12.1.0, release/11.3.0 |
|
| #
b54a59f3 |
| 30-Jun-2019 |
Alex Richardson <[email protected]> |
Reduce size of rtld by 22% by pulling in less code from libc
Currently RTLD is linked against libc_nossp_pic which means that any libc symbol used in rtld can pull in a lot of depedencies. This was
Reduce size of rtld by 22% by pulling in less code from libc
Currently RTLD is linked against libc_nossp_pic which means that any libc symbol used in rtld can pull in a lot of depedencies. This was causing symbol such as __libc_interposing and all the pthread stubs to be included in RTLD even though they are not required. It turns out most of these dependencies can easily be avoided by providing overrides inside of rtld.
This change is motivated by CHERI, where we have an experimental ABI that requires additional relocation processing to allow the use of function pointers inside of rtld. Instead of adding this self-relocation code to RTLD I attempted to remove most function pointers from RTLD and discovered that most of them came from the libc dependencies instead of being actually used inside rtld.
A nice side-effect of this change is that rtld is now 22% smaller on amd64.
text data bss dec hex filename 0x21eb6 0xce0 0xe60 145910 239f6 /home/alr48/ld-elf-x86.before.so.1 0x1a6ed 0x728 0xdd8 113645 1bbed /home/alr48/ld-elf-x86.after.so.1
The number of R_X86_64_RELATIVE relocations that need to be processed on startup has also gone down from 368 to 187 (almost 50% less).
Reviewed By: kib Differential Revision: https://reviews.freebsd.org/D20663
show more ...
|
| #
e3e21edb |
| 14-Apr-2019 |
Konstantin Belousov <[email protected]> |
ld-elf.so: make LD_DEBUG always functional.
This causes some increase of the dynamic linker size, but benefits of avoiding compiling private copy or the linker when debugging is required. definitely
ld-elf.so: make LD_DEBUG always functional.
This causes some increase of the dynamic linker size, but benefits of avoiding compiling private copy or the linker when debugging is required. definitely worth it.
The dbg() calls can be compiled out by defining LD_NO_DEBUG symbol.
Sponsored by: The FreeBSD Foundation MFC after: 1 week
show more ...
|
| #
09b47fc1 |
| 28-Mar-2019 |
Ed Maste <[email protected]> |
revert r341429 "disable BIND_NOW in libc, libthr, and rtld"
r345620 by kib@ fixed the rtld issue that caused a crash at startup during resolution of libc's ifuncs with BIND_NOW.
PR: 233333 Sponsor
revert r341429 "disable BIND_NOW in libc, libthr, and rtld"
r345620 by kib@ fixed the rtld issue that caused a crash at startup during resolution of libc's ifuncs with BIND_NOW.
PR: 233333 Sponsored by: The FreeBSD Foundation
show more ...
|
| #
bcf99d2d |
| 15-Feb-2019 |
Ed Maste <[email protected]> |
Add WITH_PIE knob to build Position Independent Executables
Building binaries as PIE allows the executable itself to be loaded at a random address when ASLR is enabled (not just its shared libraries
Add WITH_PIE knob to build Position Independent Executables
Building binaries as PIE allows the executable itself to be loaded at a random address when ASLR is enabled (not just its shared libraries).
With this change PIE objects have a .pieo extension and INTERNALLIB libraries libXXX_pie.a.
MK_PIE is disabled for some kerberos5 tools, Clang, and Subversion, as they explicitly reference .a libraries in their Makefiles. These can be addressed on an individual basis later. MK_PIE is also disabled for rtld-elf because it is already position-independent using bespoke Makefile rules.
Currently only dynamically linked binaries will be built as PIE.
Discussed with: dim Reviewed by: kib MFC after: 1 month Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D18423
show more ...
|