<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/conf/ldscript.powerpc, branch releng/15.0</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>kernel: Add defination of .init_array and .fini_array for all other platforms</title>
<updated>2024-09-02T04:26:48+00:00</updated>
<author>
<name>Zhenlei Huang</name>
<email>zlei@FreeBSD.org</email>
</author>
<published>2024-09-02T04:26:48+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=3e76d05231b0aa77d922bdbc9abf62d9747a91ab'/>
<id>3e76d05231b0aa77d922bdbc9abf62d9747a91ab</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>kernel: Move the debug stuff into a common script</title>
<updated>2024-08-01T04:23:24+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2024-08-01T04:21:11+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=37d6d682af59ba8b868515c835e433ec85900f6d'/>
<id>37d6d682af59ba8b868515c835e433ec85900f6d</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>kernel: Sync ldscript files wrt gnu.attributes and .note.GNU-stack</title>
<updated>2024-02-29T16:30:37+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2024-02-29T16:30:37+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=23dff4fdba987a56f4118f065cdb534cb6faba37'/>
<id>23dff4fdba987a56f4118f065cdb534cb6faba37</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>ldscript.powerpc*: Only put .dynamic in PT_DYNAMIC</title>
<updated>2024-01-26T00:19:02+00:00</updated>
<author>
<name>Jessica Clarke</name>
<email>jrtc27@FreeBSD.org</email>
</author>
<published>2024-01-26T00:19:02+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=3896a6cc0a8e774f33e6381ecc73be6e51dc6a53'/>
<id>3896a6cc0a8e774f33e6381ecc73be6e51dc6a53</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>sys: Remove $FreeBSD$: one-line .c comment pattern</title>
<updated>2023-08-16T17:54:24+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:54:24+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=71625ec9ad2a9bc8c09784fbd23b759830e0ee5f'/>
<id>71625ec9ad2a9bc8c09784fbd23b759830e0ee5f</id>
<content type='text'>
Remove /^/[*/]\s*\$FreeBSD\$.*\n/
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove /^/[*/]\s*\$FreeBSD\$.*\n/
</pre>
</div>
</content>
</entry>
<entry>
<title>[PowerPC] kernel ifunc support for powerpc*, fix ppc64 relocation oddities.</title>
<updated>2020-05-07T19:32:49+00:00</updated>
<author>
<name>Brandon Bergren</name>
<email>bdragon@FreeBSD.org</email>
</author>
<published>2020-05-07T19:32:49+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=9411e24df3c518227a10206ce2bae2e2f05a901c'/>
<id>9411e24df3c518227a10206ce2bae2e2f05a901c</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>powerpc: Kernel fixes for ppc32 and powerpcspe w/ lld</title>
<updated>2019-11-14T04:34:17+00:00</updated>
<author>
<name>Brandon Bergren</name>
<email>bdragon@FreeBSD.org</email>
</author>
<published>2019-11-14T04:34:17+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=6d515b0cc7415205f67edb622dffc8ec9f8c65b7'/>
<id>6d515b0cc7415205f67edb622dffc8ec9f8c65b7</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>Expose the kernel's build-ID through sysctl</title>
<updated>2019-06-04T13:07:10+00:00</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2019-06-04T13:07:10+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=74cd06b42ea6f7b46f4782c511757bdfc038d6e8'/>
<id>74cd06b42ea6f7b46f4782c511757bdfc038d6e8</id>
<content type='text'>
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 &lt;ali_mashtizadeh.com&gt;
MFC after:	2 weeks
Relnotes:	Yes
Event:		Waterloo Hackathon 2019
Differential Revision:	https://reviews.freebsd.org/D20326
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;ali_mashtizadeh.com&gt;
MFC after:	2 weeks
Relnotes:	Yes
Event:		Waterloo Hackathon 2019
Differential Revision:	https://reviews.freebsd.org/D20326
</pre>
</div>
</content>
</entry>
<entry>
<title>remove CONSTRUCTORS from kernel linker scripts</title>
<updated>2016-07-28T13:54:46+00:00</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2016-07-28T13:54:46+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=45eff3df965297ade6e5781a488d9ede7b87f909'/>
<id>45eff3df965297ade6e5781a488d9ede7b87f909</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>Refactor PowerPC (especially AIM) init sequence to be less baroque.</title>
<updated>2015-01-18T18:32:43+00:00</updated>
<author>
<name>Nathan Whitehorn</name>
<email>nwhitehorn@FreeBSD.org</email>
</author>
<published>2015-01-18T18:32:43+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=bb808254355827820e391e61dcc61e7085be11ab'/>
<id>bb808254355827820e391e61dcc61e7085be11ab</id>
<content type='text'>
MFC after:	2 months
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
MFC after:	2 months
</pre>
</div>
</content>
</entry>
</feed>
