When we create our debuginfo files on linux, we use objcopy to create a copy of the corresponding lib*.so or executable. In the latter case, objcopy will keep the executable bit. While this is a reasonable assumption for objcopy, we really treat the debuginfo files as data, not as executables in their own right, so we should strip the executable bit.
This was found when working with [JDK-8325342](https://bugs.openjdk.org/browse/JDK-8325342), and I there attempted to properly locate all executables and only executables. ------------- Commit messages: - 8326412: debuginfo files should not have executable bit set Changes: https://git.openjdk.org/jdk/pull/17947/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17947&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8326412 Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/17947.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/17947/head:pull/17947 PR: https://git.openjdk.org/jdk/pull/17947