linux-stable/include
Palmer Dabbelt 782aefb177
Merge patch series "riscv: enable HAVE_LD_DEAD_CODE_DATA_ELIMINATION"
Jisheng Zhang <jszhang@kernel.org> says:

When trying to run linux with various opensource riscv core on
resource limited FPGA platforms, for example, those FPGAs with less
than 16MB SDRAM, I want to save mem as much as possible. One of the
major technologies is kernel size optimizations, I found that riscv
does not currently support HAVE_LD_DEAD_CODE_DATA_ELIMINATION, which
passes -fdata-sections, -ffunction-sections to CFLAGS and passes the
--gc-sections flag to the linker.

This not only benefits my case on FPGA but also benefits defconfigs.
Here are some notable improvements from enabling this with defconfigs:

nommu_k210_defconfig:
   text    data     bss     dec     hex
1112009  410288   59837 1582134  182436     before
 962838  376656   51285 1390779  1538bb     after

rv32_defconfig:
   text    data     bss     dec     hex
8804455 2816544  290577 11911576 b5c198     before
8692295 2779872  288977 11761144 b375f8     after

defconfig:
   text    data     bss     dec     hex
9438267 3391332  485333 13314932 cb2b74     before
9285914 3350052  483349 13119315 c82f53     after

patch1 and patch2 are clean ups.
patch3 fixes a typo.
patch4 finally enable HAVE_LD_DEAD_CODE_DATA_ELIMINATION for riscv.

* b4-shazam-merge:
  riscv: disable HAVE_LD_DEAD_CODE_DATA_ELIMINATION for LLD
  riscv: enable HAVE_LD_DEAD_CODE_DATA_ELIMINATION
  vmlinux.lds.h: use correct .init.data.* section name
  riscv: vmlinux-xip.lds.S: remove .alternative section
  riscv: move options to keep entries sorted
  riscv: Fix orphan section warnings caused by kernel/pi

Link: https://lore.kernel.org/r/20230523165502.2592-1-jszhang@kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2023-07-01 07:38:19 -07:00
..
acpi hardening updates for v6.5-rc1 2023-06-27 21:24:18 -07:00
asm-generic Merge patch series "riscv: enable HAVE_LD_DEAD_CODE_DATA_ELIMINATION" 2023-07-01 07:38:19 -07:00
clocksource
crypto Networking changes for 6.5. 2023-06-28 16:43:10 -07:00
drm
dt-bindings ARM: SoC drivers for 6.5 2023-06-29 15:22:19 -07:00
keys
kunit
kvm
linux pid: Replace struct pid 1-element array with flex-array 2023-06-30 09:04:01 -07:00
math-emu
media
memory
misc
net v6.5 merge window RDMA pull request 2023-06-29 21:01:17 -07:00
pcmcia
ras
rdma
rv
scsi
soc ARM: SoC drivers for 6.5 2023-06-29 15:22:19 -07:00
sound ASoC: Updates for v6.5 2023-06-26 15:38:02 +02:00
target
trace Various cleanups and bug fixes in ext4's extent status tree, 2023-06-29 13:18:36 -07:00
uapi RISC-V Patches for the 6.5 Merge Window, Part 1 2023-06-30 09:37:26 -07:00
ufs
vdso
video
xen x86: xen: add missing prototypes 2023-06-26 07:47:11 +02:00