aboutsummaryrefslogtreecommitdiff
path: root/sys/conf/ldscript.powerpc
Commit message (Collapse)AuthorAgeFilesLines
* kernel: Add defination of .init_array and .fini_array for all other platformsZhenlei Huang2024-09-021-2/+14
| | | | | | | | | | | | | | | 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
* kernel: Move the debug stuff into a common scriptWarner Losh2024-08-011-28/+3
| | | | | | | | | | 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
* kernel: Sync ldscript files wrt gnu.attributes and .note.GNU-stackWarner Losh2024-02-291-3/+3
| | | | | | | | | | 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
* ldscript.powerpc*: Only put .dynamic in PT_DYNAMICJessica Clarke2024-01-261-2/+2
| | | | | | | | | | | | | | | | 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
* sys: Remove $FreeBSD$: one-line .c comment patternWarner Losh2023-08-161-1/+0
| | | | Remove /^/[*/]\s*\$FreeBSD\$.*\n/
* [PowerPC] kernel ifunc support for powerpc*, fix ppc64 relocation oddities.Brandon Bergren2020-05-071-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=360794
* powerpc: Kernel fixes for ppc32 and powerpcspe w/ lldBrandon Bergren2019-11-141-4/+6
| | | | | | | | | | | | | | Fix wrong section ordering that was causing a ".got is not contiguous with other relro sections" lld error. This also brings ldscript.powerpc and ldscript.powerpcspe closer to ldscript.powerpc64. Also, remove unnecessary text relocs from the ppc32 AIM trap code. Approved by: jhibbits (mentor) Differential Revision: https://reviews.freebsd.org/D22349 Notes: svn path=/head/; revision=354701
* Expose the kernel's build-ID through sysctlEd Maste2019-06-041-0/+5
| | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=348611
* remove CONSTRUCTORS from kernel linker scriptsEd Maste2016-07-281-1/+0
| | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=303442
* Refactor PowerPC (especially AIM) init sequence to be less baroque.Nathan Whitehorn2015-01-181-0/+1
| | | | | | | MFC after: 2 months Notes: svn path=/head/; revision=277334
* Rename elf*-powerpc into elf*-powerpc-freebsd in binutilsBaptiste Daroussin2014-10-101-1/+2
| | | | | | | | | | | | | | | | The powerpc support was the only supported architecture not prepending the elf format name with "-freebsd" in base this change makes it consistent with other architectures. On newer version of binutils the powerpc format is also prepended with "-freebsd". Also modify the kernel ldscripts in that regards. As a result it is now possible cross build the kernel on powerpc using newer binutils Differential Revision: https://reviews.freebsd.org/D926 Differential Revision: https://reviews.freebsd.org/D928 Notes: svn path=/head/; revision=272888
* In fact, we don't need any of these __DYNAMIC. it is a.out leftover and ↵Warner Losh2011-01-201-2/+0
| | | | | | | commented out. Notes: svn path=/head/; revision=217656
* Avoid hardcoding the kernel link address in the linker script.Marcel Moolenaar2008-02-271-10/+15
| | | | | | | | Use KERNBASE instead. While here, move the text sections forward to the beginning of the text segment. Notes: svn path=/head/; revision=176617
* Page align the data segment.Mark Peek2001-10-081-3/+2
| | | | Notes: svn path=/head/; revision=84665
* The final commit for the first phase of PowerPC support.Benno Rice2001-06-171-41/+49
| | | | | | | | | This adds the config stuff needed to build kernels. Reviewed by: obrien Notes: svn path=/head/; revision=78388
* Add $FreeBSD$Peter Wemm2000-01-111-4/+4
| | | | | | | | Make the alpha linker script more like the i386 version - delete the /usr/local and egcs directories Notes: svn path=/head/; revision=55825
* Lots of changes, including:Doug Rabson1998-08-101-2/+1
| | | | | | | | | | | | | * Support for AlphaStation 200, 250, 255, 400 * Untested support for UDB, Multia, AXPpci33 (Noname) * Support for Personal Workstation 433a/433au, 500a/500au, 600a/600au (Miata) * Some minor fixes and improvements to interrupt handling. Submitted by: Andrew Gallatin <gallatin@cs.duke.edu> (AS200, Miata) Obtained from: NetBSD (some code for AS200, Miata, Noname) Notes: svn path=/head/; revision=38215
* Change load address to 0xfffffc0000300000 to help support AS200.Doug Rabson1998-07-301-1/+1
| | | | Notes: svn path=/head/; revision=37970
* Linker script for alpha kernel.Doug Rabson1998-07-151-0/+133
Notes: svn path=/head/; revision=37684