Integrated: 8371626: [linux] use icf=all for linking libraries

Matthias Baesken mbaesken at openjdk.org
Wed Nov 26 12:53:03 UTC 2025


On Tue, 11 Nov 2025 14:27:53 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

> Identical code folding can reduce the size of some libs, especially libjvm. However not all linkers support the flag/feature so we have to limit it to some environments.
> See for example this manpage :
> https://manpages.debian.org/testing/lld-7/ld.lld-7.1
> 
> 
> sizes of libjvm.so with / without -icf=all
> linux aarch64 : 25888 / 27112 K
> linux x86_64 : 27952 / 29072 K
> 
> 
> (for most other native libs the identical code folding has no effect, because there is nothing to fold)

This pull request has now been integrated.

Changeset: 4ae2f31f
Author:    Matthias Baesken <mbaesken at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/4ae2f31f3d2027daa0a5ccba6180e7bb27413aa5
Stats:     8 lines in 2 files changed: 8 ins; 0 del; 0 mod

8371626: [linux] use icf=all for linking libraries

Reviewed-by: goetz, erikj

-------------

PR: https://git.openjdk.org/jdk/pull/28236


More information about the hotspot-dev mailing list