#
3e76d052 |
| 02-Sep-2024 |
Zhenlei Huang <zlei@FreeBSD.org> |
kernel: Add defination of .init_array and .fini_array for all other platforms
Currently these sections are not used but defined only for amd64 and i386. Added them for all other platforms to keep al
kernel: Add defination of .init_array and .fini_array for all other platforms
Currently these sections are not used but defined only for amd64 and i386. Added them for all other platforms to keep all platforms in sync. There should be no functional change.
This change is extracted from a bigger patch [1] of hselasky, with additional fix for the order of .fini_array section.
1. https://reviews.freebsd.org/D40467
Obtained from: hselasky MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45214
show more ...
|
#
37d6d682 |
| 01-Aug-2024 |
Warner Losh <imp@FreeBSD.org> |
kernel: Move the debug stuff into a common script
Move a copy of amd64's debug code into debug.ldscript. Make all the kernels use this. This has the effect of modernizing the STABS for powerpc as th
kernel: Move the debug stuff into a common script
Move a copy of amd64's debug code into debug.ldscript. Make all the kernels use this. This has the effect of modernizing the STABS for powerpc as the others were almost already in sync. For the ones that weren't this adds the DWARF 3 debug symbols from i386/amd64.
Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D44071
show more ...
|
Revision tags: release/14.1.0, release/13.3.0 |
|
#
23dff4fd |
| 29-Feb-2024 |
Warner Losh <imp@FreeBSD.org> |
kernel: Sync ldscript files wrt gnu.attributes and .note.GNU-stack
Bring the keeping of .gnu.attributes to all architectures. Also discard .note.GNU-stack on all archtiectures. Plus delete obsolete
kernel: Sync ldscript files wrt gnu.attributes and .note.GNU-stack
Bring the keeping of .gnu.attributes to all architectures. Also discard .note.GNU-stack on all archtiectures. Plus delete obsolete comment that was removed from i386 in 2010.
Sponsored by: Netflix Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D44069
show more ...
|
#
3896a6cc |
| 26-Jan-2024 |
Jessica Clarke <jrtc27@FreeBSD.org> |
ldscript.powerpc*: Only put .dynamic in PT_DYNAMIC
Currently there are a few output sections left as implicitly using :kernel :dynamic before :kernel on its own is used again, which means they end u
ldscript.powerpc*: Only put .dynamic in PT_DYNAMIC
Currently there are a few output sections left as implicitly using :kernel :dynamic before :kernel on its own is used again, which means they end up in both the PT_LOAD and the PT_DYNAMIC segments, an unusual situation which the new libelf-based kldxref initially treated as invalid. Thus, hoist the :kernel to the very next section to ensure only .dynamic is in PT_DYNAMIC, as is more normal.
Whilst here, sync ldscript.powerpc64le with ldscript.powerpc64 to pick up various fixes that were presumably made between the start of the powerpc64le port and it being committed and got missed.
Reviewed by: jhibbits, jhb Differential Revision: https://reviews.freebsd.org/D43066
show more ...
|
Revision tags: release/14.0.0 |
|
#
71625ec9 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c comment pattern
Remove /^/[*/]\s*\$FreeBSD\$.*\n/
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0, release/12.3.0, release/13.0.0, release/12.2.0, release/11.4.0 |
|
#
30dc2aeb |
| 01-Jun-2020 |
Brandon Bergren <bdragon@FreeBSD.org> |
[PowerPC] Fix build-id note on powerpc64 kernel
Due to the ordering of the powerpc64 linker script, we were discarding all notes before emitting .note.gnu.build-id. This had the effect of generating
[PowerPC] Fix build-id note on powerpc64 kernel
Due to the ordering of the powerpc64 linker script, we were discarding all notes before emitting .note.gnu.build-id. This had the effect of generating an empty build id section and breaking the kern.build_id sysctl added in r348611.
powerpc and powerpcspe are uneffected.
PR: 246430 MFC after: 3 days Sponsored by: Tag1 Consulting, Inc.
show more ...
|
#
9411e24d |
| 07-May-2020 |
Brandon Bergren <bdragon@FreeBSD.org> |
[PowerPC] kernel ifunc support for powerpc*, fix ppc64 relocation oddities.
This is a general cleanup of the relocatable kernel support on powerpc, needed to enable kernel ifuncs.
* Fix some reloc
[PowerPC] kernel ifunc support for powerpc*, fix ppc64 relocation oddities.
This is a general cleanup of the relocatable kernel support on powerpc, needed to enable kernel ifuncs.
* Fix some relocatable issues in the kernel linker, and change to using a RELOCATABLE_KERNEL #define instead of #ifdef __powerpc__ for parts that other platforms can use in the future if they wish to have ET_DYN kernels.
* Get rid of the DB_STOFFS hack now that the kernel is relocated to the DMAP properly across the board on powerpc64.
* Add powerpc64 and powerpc32 ifunc functionality.
* Allow AIM64 virtual mode OF kernels to run from the DMAP like other AIM64 by implementing a virtual mode restart. This fixes the runtime address on PowerMac G5.
* Fix symbol relocation problems on post-relocation kernels by relocating the symbol table.
* Add an undocumented method for supplying kernel symbols on powernv and other powerpc machines using linux-style kernel/initrd loading -- If you pass the kernel in as the initrd as well, the copy resident in initrd will be used as a source for symbols when initializing the debugger. This method is subject to removal once we have a better way of doing this.
Approved by: jhibbits Relnotes: yes Sponsored by: Tag1 Consulting, Inc. Differential Revision: https://reviews.freebsd.org/D23156
show more ...
|
Revision tags: release/12.1.0, release/11.3.0 |
|
#
0269ae4c |
| 06-Jun-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead @348740
Sponsored by: The FreeBSD Foundation
|
#
74cd06b4 |
| 04-Jun-2019 |
Ed Maste <emaste@FreeBSD.org> |
Expose the kernel's build-ID through sysctl
After our migration (of certain architectures) to lld the kernel is built with a unique build-ID. Make it available via a sysctl and uname(1) to allow th
Expose the kernel's build-ID through sysctl
After our migration (of certain architectures) to lld the kernel is built with a unique build-ID. Make it available via a sysctl and uname(1) to allow the user to identify their running kernel.
Submitted by: Ali Mashtizadeh <ali_mashtizadeh.com> MFC after: 2 weeks Relnotes: Yes Event: Waterloo Hackathon 2019 Differential Revision: https://reviews.freebsd.org/D20326
show more ...
|
#
0632bb89 |
| 22-May-2019 |
Leandro Lupori <luporl@FreeBSD.org> |
Fix PPC64 kernel build with clang8 + lld8
This patch fixes the following lld link errors:
- unsupported dynamic relocations on read-only sections - out-of-range TOC references
Submitted by: git_bd
Fix PPC64 kernel build with clang8 + lld8
This patch fixes the following lld link errors:
- unsupported dynamic relocations on read-only sections - out-of-range TOC references
Submitted by: git_bdragon.rtk0.net Reviewed by: jhibbits, luporl MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D19352
show more ...
|
#
9a696dc6 |
| 04-Apr-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead@r345880
|
#
484717a4 |
| 29-Mar-2019 |
Justin Hibbits <jhibbits@FreeBSD.org> |
powerpc64: Fix kernel ldscript to only emit one PT_LOAD segment
Summary: kexec-lite cannot currently handle multiple PT_LOAD segments. In some cases the compiler generates multiple PT_LOAD segments
powerpc64: Fix kernel ldscript to only emit one PT_LOAD segment
Summary: kexec-lite cannot currently handle multiple PT_LOAD segments. In some cases the compiler generates multiple PT_LOAD segments for an unknown reason, causing boot to fail from kexec-lite.
Submitted by: Brandon Bergren (older version) Differential Revision: https://reviews.freebsd.org/D19574
show more ...
|
Revision tags: release/12.0.0 |
|
#
7847e041 |
| 24-Aug-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r338026 through r338297, and resolve conflicts.
|
#
29064656 |
| 19-Aug-2018 |
Justin Hibbits <jhibbits@FreeBSD.org> |
powerpc64: Align frequently used/exclusive data on cacheline boundaries
This is effectively a merge from amd64 of r312888, r323235, and r333486.
I've been running this on my POWER9 Talos for some t
powerpc64: Align frequently used/exclusive data on cacheline boundaries
This is effectively a merge from amd64 of r312888, r323235, and r333486.
I've been running this on my POWER9 Talos for some time now with no ill effects.
Suggested by: mjg
show more ...
|
Revision tags: release/11.2.0 |
|
#
4b49587c |
| 06-Jan-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r327341 through r327623.
|
#
70f65499 |
| 29-Dec-2017 |
Nathan Whitehorn <nwhitehorn@FreeBSD.org> |
Add support for 64-bit PowerPC kernels to be directly loaded by kexec, which is used as the bootloader on a number of PPC64 platforms. This involves the following pieces: - Making the first instructi
Add support for 64-bit PowerPC kernels to be directly loaded by kexec, which is used as the bootloader on a number of PPC64 platforms. This involves the following pieces: - Making the first instruction a valid kernel entry point, since kexec ignores the ELF entry value. This requires a separate section and linker magic to prevent the linker from filling the beginning of the section with stubs. - Adding an entry point at 0x60 past the first instruction for systems lacking firmware CPU shutdown support (notably PS3). - Linker script changes to support the above.
MFC after: 1 month
show more ...
|
#
54b4b13c |
| 24-Dec-2017 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r326936 through r327149.
|
#
7cc0ad62 |
| 19-Dec-2017 |
Nathan Whitehorn <nwhitehorn@FreeBSD.org> |
Make __startkernel line up with KERNBASE, so that the math to compute the applied relocation offset in link_elf.c works as intended. We may want to revisit how that works in future, for example by ha
Make __startkernel line up with KERNBASE, so that the math to compute the applied relocation offset in link_elf.c works as intended. We may want to revisit how that works in future, for example by having elf_reloc_self() actually store the numbers it is using rather than computing them later, but this fixes symbol lookup after r326203.
Reported by: andreast@ Pointy hat to: me
show more ...
|
#
25449e73 |
| 25-Nov-2017 |
Nathan Whitehorn <nwhitehorn@FreeBSD.org> |
Avoid emitting a PT_INTERP section for powerpc64 kernels and arrange for the first instruction to be at the start of the text segment. This allows the kernel to be booted correctly by stock kexec-lit
Avoid emitting a PT_INTERP section for powerpc64 kernels and arrange for the first instruction to be at the start of the text segment. This allows the kernel to be booted correctly by stock kexec-lite.
MFC after: 2 weeks
show more ...
|
Revision tags: release/10.4.0, release/11.1.0, release/11.0.1, release/11.0.0 |
|
#
27067774 |
| 16-Aug-2016 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r303250 through r304235.
|
#
45eff3df |
| 28-Jul-2016 |
Ed Maste <emaste@FreeBSD.org> |
remove CONSTRUCTORS from kernel linker scripts
The linker script CONSTRUCTORS keyword is only meaningful "when linking object file formats which do not support arbitrary sections, such as ECOFF and
remove CONSTRUCTORS from kernel linker scripts
The linker script CONSTRUCTORS keyword is only meaningful "when linking object file formats which do not support arbitrary sections, such as ECOFF and XCOFF"[1] and is ignored for other object file formats.
LLVM's lld does not yet accept (and ignore) CONSTRUCTORS, so just remove CONSTRUCTORS from the linker scripts as it has no effect.
[1] https://sourceware.org/binutils/docs/ld/Output-Section-Keywords.html
Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D7343
show more ...
|
Revision tags: release/10.3.0 |
|
#
b626f5a7 |
| 04-Jan-2016 |
Glen Barber <gjb@FreeBSD.org> |
MFH r289384-r293170
Sponsored by: The FreeBSD Foundation
|
#
c99bbcab |
| 02-Dec-2015 |
Navdeep Parhar <np@FreeBSD.org> |
Catch up with head.
|
#
466d476a |
| 29-Nov-2015 |
Nathan Whitehorn <nwhitehorn@FreeBSD.org> |
Fix build with new binutils. This gets a working kernel with GCC 5.2 and binutils 2.24. Without this, the self-relocation code in locore64.S was failing due to a misaligned TOC section.
MFC after: 2
Fix build with new binutils. This gets a working kernel with GCC 5.2 and binutils 2.24. Without this, the self-relocation code in locore64.S was failing due to a misaligned TOC section.
MFC after: 2 weeks
show more ...
|
Revision tags: release/10.2.0 |
|
#
98e0ffae |
| 27-May-2015 |
Simon J. Gerraty <sjg@FreeBSD.org> |
Merge sync of head
|