mbox series

[v2,0/7] powerpc: build / linker improvements

Message ID 20220916040755.2398112-1-npiggin@gmail.com (mailing list archive)
Headers show
Series powerpc: build / linker improvements | expand

Message

Nicholas Piggin Sept. 16, 2022, 4:07 a.m. UTC
This series is mainly about moving more things out of writable and
executable memory, and slightly moving the linker script in the
direction of the binutils ld internal linker script as we do.

Thanks,
Nick

Since v1:
- Move sys_call_table data.rel.ro patch to the end.
- And fix the changelog in that patch, the relocations were a red herring.
- Update the changelog in the __end_rodata patch.
- Align __end_rodata to strict align size.

Nicholas Piggin (7):
  powerpc: move __end_rodata to cover arch read-only sections
  powerpc/32/build: move got1/got2 sections out of text
  powerpc/build: move got, toc, plt, branch_lt sections to read-only
  powerpc/build: move .data.rel.ro, .sdata2 to read-only
  powerpc/64/build: only include .opd with ELFv1
  powerpc/64/build: merge .got and .toc input sections
  powerpc/build: put sys_call_table in .data.rel.ro if RELOCATABLE

 arch/powerpc/kernel/systbl.S             |  4 ++
 arch/powerpc/kernel/vmlinux.lds.S        | 85 +++++++++++++++---------
 arch/powerpc/mm/book3s32/mmu.c           |  2 +-
 arch/powerpc/mm/book3s64/hash_pgtable.c  |  2 +-
 arch/powerpc/mm/book3s64/radix_pgtable.c |  6 +-
 arch/powerpc/mm/pgtable_32.c             |  7 +-
 6 files changed, 66 insertions(+), 40 deletions(-)

Comments

Michael Ellerman Oct. 4, 2022, 1:24 p.m. UTC | #1
On Fri, 16 Sep 2022 14:07:48 +1000, Nicholas Piggin wrote:
> This series is mainly about moving more things out of writable and
> executable memory, and slightly moving the linker script in the
> direction of the binutils ld internal linker script as we do.
> 
> Thanks,
> Nick
> 
> [...]

Applied to powerpc/next.

[1/7] powerpc: move __end_rodata to cover arch read-only sections
      https://git.kernel.org/powerpc/c/7082f8e7d2276575a8806370007cbb4a7b9abdce
[2/7] powerpc/32/build: move got1/got2 sections out of text
      https://git.kernel.org/powerpc/c/1faa1235c1a00614bc4849a8dbd0790363c9a22f
[3/7] powerpc/build: move got, toc, plt, branch_lt sections to read-only
      https://git.kernel.org/powerpc/c/f21ba4499a15b76ad6013ca0a60873dbcf164c7b
[4/7] powerpc/build: move .data.rel.ro, .sdata2 to read-only
      https://git.kernel.org/powerpc/c/b6adc6d6d327229d75607a948cde2349d317f366
[5/7] powerpc/64/build: only include .opd with ELFv1
      https://git.kernel.org/powerpc/c/c787fed11890babda1e4882cd3b6efaf412e1bde
[6/7] powerpc/64/build: merge .got and .toc input sections
      https://git.kernel.org/powerpc/c/1e9eca485a840985a663080eb049c420272d4bdd
[7/7] powerpc/build: put sys_call_table in .data.rel.ro if RELOCATABLE
      https://git.kernel.org/powerpc/c/fdfdcfd504933ed06eb6b4c9df21eede0e213c3e

cheers