On Thu, 5 Mar 2026 13:01:43 GMT, Julian Waters <[email protected]> wrote:

> Ok, in that case this seems fine. More investigation probably needs to be 
> done on whether the compiler flags have any effect without the linker flags 
> though.

Seems the image gets _larger_  at least on my macOS test machine with compile 
flags -ffunction-sections -fdata-sections added

macOS aarch64 Xcode 15.4
without changes :

bash-3.2$ du -sk images/jdk
398360  images/jdk


with added compile flags -ffunction-sections -fdata-sections :

du -sk images/jdk
401268  images/jdk


so it has an effect, but currently not a good one.  Not sure if other XCode 
versions do better with the function/data sections enabled.

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

PR Comment: https://git.openjdk.org/jdk/pull/30071#issuecomment-4005122477

Reply via email to