On Mon, 16 Jun 2025 06:57:35 GMT, Erik Joelsson <er...@openjdk.org> wrote:
> We do expect the debuginfo files to be reproducible and hence free of > absolute paths. This was implemented in > https://bugs.openjdk.org/browse/JDK-8284437, where `-fdebug-prefix-map` was > one of the mitigations applied. I would start my investigation with trying to > understand why that option isn't working, or being applied, when you build > with `--enable-ccache`. Thanks @erikj79 I can not find the root cause how does the debuginfo files contains the absolute paths. Take java.debuginfo example, this file generate by `objcopy --only-keep-debug build/ccache/support/modules_cmds/java.base/java build/ccache/support/modules_cmds/java.base/java.debuginfo`, the source file `build/ccache/support/modules_cmds/java.base/java` contains absolute path string `DW_AT_comp_dir /hygonjdk/yansendao/git/jdk` shows as below: > dwarfdump build/ccache/support/modules_cmds/java.base/java | grep > DW_AT_comp_dir DW_AT_comp_dir /hygonjdk/yansendao/git/jdk DW_AT_comp_dir /hygonjdk/yansendao/git/jdk The file `build/ccache/support/modules_cmds/java.base/java` linked from libjli.so and main.o, and the main.o already contains `DW_AT_comp_dir` absolute path when enable ccache. I can't find the difference between with ccache and without ccache when generate main.o ------------- PR Comment: https://git.openjdk.org/jdk/pull/25811#issuecomment-2975666685