|
Revision tags: release/12.2.0, release/11.4.0, release/12.1.0 |
|
| #
349a1e57 |
| 26-Sep-2019 |
Ed Maste <[email protected]> |
MFS r352754: Add WITH_PIE knob to build Position Independent Executables
MFC r344179: Add WITH_PIE knob to build Position Independent Executables
Building binaries as PIE allows the executable itse
MFS r352754: Add WITH_PIE knob to build Position Independent Executables
MFC r344179: 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.
MFC r344181: Fix Makefile conditional after r344179
MFC r344182: Use make's :tl instead of checking "no" and "NO"
MFC r344189: Fixup bsd.prog.mk after r344182
MFC r344211: wlandebug: disable PIE to fix build failure
libifconfig is built as a static-only PRIVATELIB (and there is no _pie.a version) so disable PIE in libifconfig's consumer.
r345489: Fix GNU objdump build under WITH_PIE
Explicitly specified bare .a libraries need ${PIE_SUFFIX}.
r345490: Apply WITH_PIE changes to other binutils components
Followon to r345489, explicitly specified bare .a libraries need ${PIE_SUFFIX} (although these still built).
r345778: Fix gdb/kgdb build under WITH_PIE
Explicitly specified bare .a libraries need ${PIE_SUFFIX}.
Approved by: re (gjb) Sponsored by: The FreeBSD Foundation
show more ...
|
|
Revision tags: release/11.3.0, release/12.0.0, release/11.2.0 |
|
| #
15c36a23 |
| 06-Feb-2018 |
Baptiste Daroussin <[email protected]> |
Switch to use libedit instead of readline
|
|
Revision tags: release/10.4.0, release/11.1.0, release/11.0.1, release/11.0.0, release/10.3.0 |
|
| #
eacae6dc |
| 04-Dec-2015 |
Bryan Drewery <[email protected]> |
Fix LDADD/DPADD that should be LIBADD.
Sponsored by: EMC / Isilon Storage Division
|
| #
7f911abe |
| 27-Nov-2015 |
John Baldwin <[email protected]> |
Add support to libkvm for reading vmcores from other architectures. - Add a kvaddr_type to represent kernel virtual addresses instead of unsigned long. - Add a struct kvm_nlist which is a stripped
Add support to libkvm for reading vmcores from other architectures. - Add a kvaddr_type to represent kernel virtual addresses instead of unsigned long. - Add a struct kvm_nlist which is a stripped down version of struct nlist that uses kvaddr_t for n_value. - Add a kvm_native() routine that returns true if an open kvm descriptor is for a native kernel and memory image. - Add a kvm_open2() function similar to kvm_openfiles(). It drops the unused 'swapfile' argument and adds a new function pointer argument for a symbol resolving function. Native kernels still use _fdnlist() from libc to resolve symbols if a resolver function is not supplied, but cross kernels require a resolver. - Add a kvm_nlist2() function similar to kvm_nlist() except that it uses struct kvm_nlist instead of struct nlist. - Add a kvm_read2() function similar to kvm_read() except that it uses kvaddr_t instead of unsigned long for the kernel virtual address. - Add a new kvm_arch switch of routines needed by a vmcore backend. Each backend is responsible for implementing kvm_read2() for a given vmcore format. - Use libelf to read headers from ELF kernels and cores (except for powerpc cores). - Add internal helper routines for the common page offset hash table used by the minidump backends. - Port all of the existing kvm backends to implement a kvm_arch switch and to be cross-friendly by using private constants instead of ones that vary by platform (e.g. PAGE_SIZE). Static assertions are present when a given backend is compiled natively to ensure the private constants match the real ones. - Enable all of the existing vmcore backends on all platforms. This means that libkvm on any platform should be able to perform KVA translation and read data from a vmcore of any platform.
Tested on: amd64, i386, sparc64 (marius) Differential Revision: https://reviews.freebsd.org/D3341
show more ...
|
|
Revision tags: release/10.2.0 |
|
| #
ee5a34ec |
| 25-Nov-2014 |
Baptiste Daroussin <[email protected]> |
Convert to LIBADD Reduce overlinking
|
|
Revision tags: release/10.1.0 |
|
| #
5608fd23 |
| 19-Aug-2014 |
Bryan Drewery <[email protected]> |
Revert r267233 for now. PIE support needs to be reworked.
1. 50+% of NO_PIE use is fixed by adding -fPIC to INTERNALLIB and other build-only utility libraries. 2. Another 40% is fixed by generati
Revert r267233 for now. PIE support needs to be reworked.
1. 50+% of NO_PIE use is fixed by adding -fPIC to INTERNALLIB and other build-only utility libraries. 2. Another 40% is fixed by generating _pic.a variants of various libraries. 3. Some of the NO_PIE use is a bit absurd as it is disabling PIE (and ASLR) where it never would work anyhow, such as csu or loader. This suggests there may be better ways of adding support to the tree. Many of these cases can be fixed such that -fPIE will work but there is really no reason to have it in those cases. 4. Some of the uses are working around hacks done to some Makefiles that are really building libraries but have been using bsd.prog.mk because the code is cleaner. Had they been using bsd.lib.mk then NO_PIE would not have been needed.
We likely do want to enable PIE by default (opt-out) for non-tree consumers (such as ports). For in-tree though we probably want to only enable PIE (opt-in) for common attack targets such as remote service daemons and setuid utilities. This is also a great performance compromise since ASLR is expected to reduce performance. As such it does not make sense to enable it in all utilities such as ls(1) that have little benefit to having it enabled.
Reported by: kib
show more ...
|
| #
d029c3aa |
| 06-Aug-2014 |
Baptiste Daroussin <[email protected]> |
Rework privatelib/internallib
Make sure everything linking to a privatelib and/or an internallib does it directly from the OBJDIR rather than DESTDIR. Add src.libnames.mk so bsd.libnames.mk is not p
Rework privatelib/internallib
Make sure everything linking to a privatelib and/or an internallib does it directly from the OBJDIR rather than DESTDIR. Add src.libnames.mk so bsd.libnames.mk is not polluted by libraries not existsing in final installation Introduce the LD* variable which is what ld(1) is expecting (via LDADD) to link to internal/privatelib Directly link to the .so in case of private library to avoid having to complexify LDFLAGS.
Phabric: https://phabric.freebsd.org/D553 Reviewed by: imp, emaste
show more ...
|
| #
80189b3b |
| 17-Jul-2014 |
Brooks Davis <[email protected]> |
Replace all uses of libncurses and libtermcap with their wide character variants. This allows usable file system images (i.e. those with both a shell and an editor) to be created with only one copy
Replace all uses of libncurses and libtermcap with their wide character variants. This allows usable file system images (i.e. those with both a shell and an editor) to be created with only one copy of the curses library.
Exp-run: antoine PR: 189842 Discussed with: bapt Sponsored by: DARPA, AFRL
show more ...
|
|
Revision tags: release/9.3.0 |
|
| #
8a833bda |
| 09-Jul-2014 |
Baptiste Daroussin <[email protected]> |
The GNU readline library is now an INTERNALLIB - that is, it is statically linked into consumers (GDB and variants) in the base system, and the shared library is no longer installed.
That also allow
The GNU readline library is now an INTERNALLIB - that is, it is statically linked into consumers (GDB and variants) in the base system, and the shared library is no longer installed.
That also allows ports to be able to use a modern version of readline
PR: 162948 Reviewed by: emaste
show more ...
|
| #
864c53ea |
| 08-Jun-2014 |
Bryan Drewery <[email protected]> |
In preparation for ASLR [1] support add WITH_PIE to support building with -fPIE.
This is currently an opt-in build flag. Once ASLR support is ready and stable it should changed to opt-out and be ena
In preparation for ASLR [1] support add WITH_PIE to support building with -fPIE.
This is currently an opt-in build flag. Once ASLR support is ready and stable it should changed to opt-out and be enabled by default along with ASLR.
Each application Makefile uses opt-out to ensure that ASLR will be enabled by default in new directories when the system is compiled with PIE/ASLR. [2]
Mark known build failures as NO_PIE for now.
The only known runtime failure was rtld.
[1] http://www.bsdcan.org/2014/schedule/events/452.en.html Submitted by: Shawn Webb <[email protected]> Discussed between: des@ and Shawn Webb [2]
show more ...
|
|
Revision tags: release/10.0.0 |
|
| #
03197d0a |
| 28-Dec-2013 |
Marcel Moolenaar <[email protected]> |
When building a cross kgdb, link against the appropriate cross libkvm. Provide an implementation of ps_pglobal_lookup() for use by the cross libkvm.
|
|
Revision tags: release/9.2.0, release/8.4.0, release/9.1.0, release/8.3.0, release/7.4.0, release/8.2.0 |
|
| #
e8dce5b9 |
| 10-Nov-2010 |
Warner Losh <[email protected]> |
Complete the integration of tbemd branch into head.
TARGET_BIG_ENDIAN is now completely dead, except where it was originally supposed to be used (internally in the toolchain building).
TARGET_ARCH
Complete the integration of tbemd branch into head.
TARGET_BIG_ENDIAN is now completely dead, except where it was originally supposed to be used (internally in the toolchain building).
TARGET_ARCH has changed in three cases: (1) Little endian mips has changed to mipsel. (2) Big endian mips has changed to mipseb. (3) Big endian arm has changed to armeb.
Some additional changes are needed to make 'make universe' work on arm and mips after this change, so those are commented out for now.
UPDATING information will be forthcoming. Any remaining rough edges will be hammered out in -current.
show more ...
|
|
Revision tags: release/8.1.0, release/7.3.0, release/8.0.0, release/7.2.0, release/7.1.0, release/6.4.0, release/7.0.0 |
|
| #
4496b357 |
| 24-Jan-2008 |
John Baldwin <[email protected]> |
Move the code for working with kld's out into its own file.
|
|
Revision tags: release/6.3.0, release/6.2.0, release/5.5.0, release/6.1.0, release/6.0.0, release/5.4.0 |
|
| #
d7234520 |
| 20-Feb-2005 |
Alexander Kabaev <[email protected]> |
Restore r1.2 change to use TARGET_ARCH.
Submitted by: kris
|
| #
325ce5d8 |
| 20-Feb-2005 |
Alexander Kabaev <[email protected]> |
Attempt to make kgdb little more useful and easy to use. Properly initialize it to recognise what ABI to use on amd64 (and possibly others) platform. Display PID and process name as a part of the '
Attempt to make kgdb little more useful and easy to use. Properly initialize it to recognise what ABI to use on amd64 (and possibly others) platform. Display PID and process name as a part of the 'info threads' output, TIDs alone are too confusing. Introduce new commmands 'tid <tid>' and 'proc <pid>' to accompany gdb's default 'thread <thread num>' to make the task of switching between different contexts easier.
show more ...
|
| #
01950bb6 |
| 14-Feb-2005 |
David E. O'Brien <[email protected]> |
Use the system gnuregex library vs. building GNU regex bits into libiberty and using them.
Reviewed by: marcel,imp Desired by: ache
|
|
Revision tags: release/4.11.0 |
|
| #
20a96613 |
| 30-Nov-2004 |
Marcel Moolenaar <[email protected]> |
Makefile (only) changes to allow building a cross debugger.
|
| #
88bca61e |
| 30-Nov-2004 |
Marcel Moolenaar <[email protected]> |
s/MACHINE_ARCH/TARGET_ARCH/. We use TARGET_ARCH to pick the MD files for libgdb and should do so here as well.
|
|
Revision tags: release/5.3.0 |
|
| #
60b992ff |
| 25-Jul-2004 |
Marcel Moolenaar <[email protected]> |
Add the beginnings of kernel debugging support. the kgdb(1) tool is basicly a shell on top of libgdb that knows about kernel threads, kernel modules and kvm(3). As the word "beginnings" implies, not
Add the beginnings of kernel debugging support. the kgdb(1) tool is basicly a shell on top of libgdb that knows about kernel threads, kernel modules and kvm(3). As the word "beginnings" implies, not all of the features have been implemented yet. The tool is useful and I'd like feedback on the taken route.
The simplest way to debug a kernel core file is: kgdb -n 0
This opens /var/crash/vmcore.0 with the corresponding kernel in the object directory (kernel.debug is used if it exists).
Typical things that need to be added are: o Auto loading of kernel modules, o Handling of trapframes so that backtraces can be taken across them, o Some fancy commands to extract useful information out of a core file, o Various (probably many) other things.
show more ...
|