#
27f35b7d |
| 04-Apr-2023 |
Mark Johnston <markj@FreeBSD.org> |
libdtrace: Do not set SHF_ALLOC on SUNW_dof relocation sections
The section will contain static relocations which do not need to be preserved after linking, and moreover these relocations may refere
libdtrace: Do not set SHF_ALLOC on SUNW_dof relocation sections
The section will contain static relocations which do not need to be preserved after linking, and moreover these relocations may reference symbols that end up getting removed.
Do not set SHF_ALLOC and instead let the linker decide what needs to be done.
PR: 258872 MFC after: 1 week Sponsored by: The FreeBSD Foundation
show more ...
|
#
f711d5c3 |
| 10-Jan-2023 |
Mitchell Horne <mhorne@FreeBSD.org> |
libdtrace: add riscv support
Largely untested, as we can't really do anything with user probes without an implementation of fasttrap. However, this is enough to generate an embedded dtrace program w
libdtrace: add riscv support
Largely untested, as we can't really do anything with user probes without an implementation of fasttrap. However, this is enough to generate an embedded dtrace program with `dtrace -G` and link the generated ELF file.
Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D38301
show more ...
|
#
2166649f |
| 06-Feb-2023 |
Mitchell Horne <mhorne@FreeBSD.org> |
libdtrace: drop remaining mips support
Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D38300
|
#
be39466a |
| 11-Dec-2022 |
Mark Johnston <markj@FreeBSD.org> |
libdtrace: Change the binding of USDT probe symbols to STB_WEAK
Otherwise, if multiple object files contain references to the same probe, newish lld will refuse to link them by default, raising a du
libdtrace: Change the binding of USDT probe symbols to STB_WEAK
Otherwise, if multiple object files contain references to the same probe, newish lld will refuse to link them by default, raising a duplicate global symbol definition error. Previously, duplicate global symbols with identical absolute st_values were permitted by both lld and GNU ld.
Since dtrace has no use for probe function symbols after the relocation performed by dtrace -G, make the symbols weak as well, following a suggestion from MaskRay.
Reported by: dim MFC after: 1 week Sponsored by: The FreeBSD Foundation
show more ...
|
#
d00431a7 |
| 10-Jan-2021 |
Mark Johnston <markj@FreeBSD.org> |
libdtrace: Format USDT symbols correctly based on symbol binding
Before we did not handle weak symbols correctly, sometimes resulting in link errors from dtrace -G when processing object files where
libdtrace: Format USDT symbols correctly based on symbol binding
Before we did not handle weak symbols correctly, sometimes resulting in link errors from dtrace -G when processing object files where functions with weak aliases contain USDT probes.
Reported by: rlibby Tested by: rlibby MFC after: 1 week Sponsored by: The FreeBSD Foundation
show more ...
|
#
9e5787d2 |
| 25-Aug-2020 |
Matt Macy <mmacy@FreeBSD.org> |
Merge OpenZFS support in to HEAD.
The primary benefit is maintaining a completely shared code base with the community allowing FreeBSD to receive new features sooner and with less effort.
I would a
Merge OpenZFS support in to HEAD.
The primary benefit is maintaining a completely shared code base with the community allowing FreeBSD to receive new features sooner and with less effort.
I would advise against doing 'zpool upgrade' or creating indispensable pools using new features until this change has had a month+ to soak.
Work on merging FreeBSD support in to what was at the time "ZFS on Linux" began in August 2018. I first publicly proposed transitioning FreeBSD to (new) OpenZFS on December 18th, 2018. FreeBSD support in OpenZFS was finally completed in December 2019. A CFT for downstreaming OpenZFS support in to FreeBSD was first issued on July 8th. All issues that were reported have been addressed or, for a couple of less critical matters there are pull requests in progress with OpenZFS. iXsystems has tested and dogfooded extensively internally. The TrueNAS 12 release is based on OpenZFS with some additional features that have not yet made it upstream.
Improvements include: project quotas, encrypted datasets, allocation classes, vectorized raidz, vectorized checksums, various command line improvements, zstd compression.
Thanks to those who have helped along the way: Ryan Moeller, Allan Jude, Zack Welch, and many others.
Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D25872
show more ...
|
#
c612709b |
| 22-Aug-2020 |
Mark Johnston <markj@FreeBSD.org> |
Fix a typo in r364438 affecting 32-bit platforms.
Reported by: antoine MFC with: r364438
|
#
e627909d |
| 20-Aug-2020 |
Mark Johnston <markj@FreeBSD.org> |
Fix a typo in r364438.
Reported by: Jenkins MFC with: r364438
|
#
d2d16e56 |
| 20-Aug-2020 |
Mark Johnston <markj@FreeBSD.org> |
Enable creation of static userspace probes in incremental builds.
To define USDT probes, dtrace -G makes use of relocations for undefined symbols: the target address is overwritten with NOPs and the
Enable creation of static userspace probes in incremental builds.
To define USDT probes, dtrace -G makes use of relocations for undefined symbols: the target address is overwritten with NOPs and the location is recorded in the DOF section of the output object file. To avoid link errors, the original relocation is destroyed. However, this means that the same input object file cannot be processed multiple times, as happens during incremental rebuilds. Instead, only set the relocation type to NONE, so that all information required to reconstruct USDT probes is preserved.
Reported by: bdrewery MFC after: 3 weeks Sponsored by: The FreeBSD Foundation
show more ...
|
#
0e15d9fb |
| 20-Aug-2020 |
Mark Johnston <markj@FreeBSD.org> |
Remove non-FreeBSD ifdefs from dt_link.c.
This file is too complicated as it is and has diverged a fair bit from illumos due to toolchain differences, so just drop unused code (including SPARC suppo
Remove non-FreeBSD ifdefs from dt_link.c.
This file is too complicated as it is and has diverged a fair bit from illumos due to toolchain differences, so just drop unused code (including SPARC support).
MFC after: 1 week Sponsored by: The FreeBSD Foundation
show more ...
|
#
7283901a |
| 05-Feb-2020 |
Brandon Bergren <bdragon@FreeBSD.org> |
[PowerPC] [DTrace] Add ELFv2 support in libdtrace
PPC64 ELFv2 acts like a "normal" platform in that it no longer needs function descriptors. So, ensure we are only enabling them on ELFv1.
Additiona
[PowerPC] [DTrace] Add ELFv2 support in libdtrace
PPC64 ELFv2 acts like a "normal" platform in that it no longer needs function descriptors. So, ensure we are only enabling them on ELFv1.
Additionally, ELFv2 requires that the ELF header have a nonzero e_flags, so ensure that the synthesized ELF header in dt_link.c is setting it.
Reviewed by: jhibbits, markj Approved by: gnn Differential Revision: https://reviews.freebsd.org/D22403
show more ...
|
#
938acb08 |
| 07-Jan-2020 |
Mark Johnston <markj@FreeBSD.org> |
Use a deterministic hash for USDT symbol names.
Previously libdtrace used ftok(3), which hashes the inode number of the input object file. To increase reproducibility of builds that embed USDT prob
Use a deterministic hash for USDT symbol names.
Previously libdtrace used ftok(3), which hashes the inode number of the input object file. To increase reproducibility of builds that embed USDT probes, include a hash of the object file path in the symbol name instead.
Reported and tested by: bdrewery Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
show more ...
|
#
a2ea7849 |
| 29-Dec-2019 |
Mark Johnston <markj@FreeBSD.org> |
Add libdtrace support for arm64 USDT probes.
arm64 is still lacking a fasttrap implementation, which is required to actually enable userland probes, but this at least allows USDT probes to be linked
Add libdtrace support for arm64 USDT probes.
arm64 is still lacking a fasttrap implementation, which is required to actually enable userland probes, but this at least allows USDT probes to be linked into userland applications.
Submitted by: Klaus Küchemann <maciphone2@googlemail.com> (original) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D22360
show more ...
|
#
df7165b8 |
| 19-Mar-2018 |
Mark Johnston <markj@FreeBSD.org> |
Given hidden visibility to symbols referenced by the DOF section.
MFC after: 1 week
|
#
4e4805dd |
| 21-Nov-2017 |
Ed Maste <emaste@FreeBSD.org> |
dt_modtext: return error on archs lacking an implementation
Reported by: mmel Reviewed by: markj MFC after: 1 week MFC with: r325042 Sponsored by: The FreeBSD Foundation Differential Revision: https
dt_modtext: return error on archs lacking an implementation
Reported by: mmel Reviewed by: markj MFC after: 1 week MFC with: r325042 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D13176
show more ...
|
#
ad1633b3 |
| 16-Nov-2017 |
Mark Johnston <markj@FreeBSD.org> |
Take r313504 into account when recomputing the string table length.
When we encounter a USDT probe in a weak symbol, we emit an alias for the probe function symbol. Such aliases are named differentl
Take r313504 into account when recomputing the string table length.
When we encounter a USDT probe in a weak symbol, we emit an alias for the probe function symbol. Such aliases are named differently from the aliases we emit for probes in local functions, so make sure to take that difference into account when resizing the output object file's string table. Otherwise, we underrun the string table buffer.
PR: 223680
show more ...
|
#
732f2c69 |
| 27-Oct-2017 |
Ed Maste <emaste@FreeBSD.org> |
libdtrace: replace "DOODAD" with more descriptive string
Previously some unimplemented libdtrace routines printed the function, file and line number, followed by "DOODAD." That is not particularly i
libdtrace: replace "DOODAD" with more descriptive string
Previously some unimplemented libdtrace routines printed the function, file and line number, followed by "DOODAD." That is not particularly informative, so replace it with a message reporting the actual issue.
Sponsored by: The FreeBSD Foundation
show more ...
|
#
ca20f8ec |
| 07-Aug-2017 |
Ruslan Bukin <br@FreeBSD.org> |
o Replace __riscv__ with __riscv o Replace __riscv64 with (__riscv && __riscv_xlen == 64)
This is required to support new GCC 7.1 compiler. This is compatible with current GCC 6.1 compiler.
RISC-V
o Replace __riscv__ with __riscv o Replace __riscv64 with (__riscv && __riscv_xlen == 64)
This is required to support new GCC 7.1 compiler. This is compatible with current GCC 6.1 compiler.
RISC-V is extensible ISA and the idea here is to have built-in define per each extension, so together with __riscv we will have some subset of these as well (depending on -march string passed to compiler):
__riscv_compressed __riscv_atomic __riscv_mul __riscv_div __riscv_muldiv __riscv_fdiv __riscv_fsqrt __riscv_float_abi_soft __riscv_float_abi_single __riscv_float_abi_double __riscv_cmodel_medlow __riscv_cmodel_medany __riscv_cmodel_pic __riscv_xlen
Reviewed by: ngie Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D11901
show more ...
|
#
281e4f2d |
| 10-Feb-2017 |
Mark Johnston <markj@FreeBSD.org> |
When patching USDT probes, use non-unique names for aliases of weak symbols.
Aliases are normally given names that include a key that's unique for each input object file. This, for example, ensures
When patching USDT probes, use non-unique names for aliases of weak symbols.
Aliases are normally given names that include a key that's unique for each input object file. This, for example, ensures that aliases for identically named local symbols in different object files don't conflict. However, in some cases the static linker will leave an undefined alias after merging identical weak symbols, resulting in a link error. A non-unique name allows the aliases to be merged as well.
PR: 216871 X-MFC With: r313262
show more ...
|
#
273efb05 |
| 05-Feb-2017 |
Mark Johnston <markj@FreeBSD.org> |
Fix a double free of libelf data buffers in the USDT link code.
libdtrace needs to append to the input object files' string and symbol tables. Currently it does so by allocating a larger buffer, cop
Fix a double free of libelf data buffers in the USDT link code.
libdtrace needs to append to the input object files' string and symbol tables. Currently it does so by allocating a larger buffer, copying the existing sections into them, and swapping pointers in the libelf data descriptors. However, it also frees those buffers when its processing is complete, which leads to a double free since the elftoolchain libelf owns them and also frees them in elf_end(3). Instead, free the buffers originally allocated by libelf.
MFC after: 2 weeks
show more ...
|
#
e801af6f |
| 05-Feb-2017 |
Mark Johnston <markj@FreeBSD.org> |
Use PC-relative relocations for USDT probe sites on i386 and amd64.
When recording probe site addresses in the output DOF file, dtrace -G needs to emit relocations for the .SUNW_dof section in order
Use PC-relative relocations for USDT probe sites on i386 and amd64.
When recording probe site addresses in the output DOF file, dtrace -G needs to emit relocations for the .SUNW_dof section in order to obtain the addresses of functions containing probe sites. DTrace expects the addresses to be relative to the base address of the final ELF file, and the amd64 USDT implementation was relying on some unspecified and incorrect behaviour in the base system GNU ld to achieve this.
This change reimplements the probe site relocation handling to allow USDT to be used with lld and newer GNU binutils. Specifically, it makes use of R_X86_64_PC64/R_386_PC32 relocations to obtain the probe site address relative to the DOF file address, and adds and uses a new DOF relocation type which computes the final probe site address using these relative offsets.
Reported by and discussed with: Rafael Espíndola MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D9374
show more ...
|
#
3a3e3279 |
| 20-Dec-2016 |
Mark Johnston <markj@FreeBSD.org> |
Avoid modifying the object string table when patching USDT probes.
dtrace converts pairs of consecutive underscores in a probe name to dashes. When dtrace -G processes relocations corresponding to U
Avoid modifying the object string table when patching USDT probes.
dtrace converts pairs of consecutive underscores in a probe name to dashes. When dtrace -G processes relocations corresponding to USDT probe sites, it performs this conversion on the corresponding symbol names prior to looking up the resulting probe names in the USDT provider definition. However, in so doing it would actually modify the input object's string table, which breaks the string suffix merging done by recent binutils. Because we don't care about the symbol name once the probe site is recorded, just perform the probe lookup using a temporary copy.
Reported by: hrs, swills MFC after: 3 weeks
show more ...
|
#
fed1ca4b |
| 24-May-2016 |
Ruslan Bukin <br@FreeBSD.org> |
Add initial DTrace support for RISC-V.
Sponsored by: DARPA, AFRL Sponsored by: HEIF5
|
#
b78ee15e |
| 01-Jul-2015 |
Ruslan Bukin <br@FreeBSD.org> |
First cut of DTrace for AArch64.
Reviewed by: andrew, emaste Sponsored by: ARM Limited Differential Revision: https://reviews.freebsd.org/D2738
|
#
6bd8f7ee |
| 17-May-2015 |
Mark Johnston <markj@FreeBSD.org> |
Fix a typo that snuck in with r283024, and remove the EXFAIL annotation from a test which now passes as a result of that change.
|