On Tue, 1 Dec 2026 15:45:39 GMT, Kurt Miller <[email protected]> wrote:
> JDK-8396508 introduced dynamic relocations in a read only data section, aka a > `TEXTREL` section. `TEXTREL` sections are undesirable from a security > standpoint and will cause the jdk to fail to run in an hardened Linux > environment like SELinux. It also causes linking to fail when built with > clang/lld. > > This PR adds `-z,text` to `BASIC_LDFLAGS` for gcc to forbid dynamic > relocations in read-only sections so that similar issues in the future are > caught during the development cycle and switches the `.rodata` section to a > RELRO section in > [atomic_linux_aarch64.S](https://github.com/openjdk/jdk/compare/master...bsdkurt:jdk:JDK-8398503?expand=1#diff-aac001dcef5d037ac72a231b0d5913247997099a7d08b466f0cf9826a3443482) > > --------- > - [X] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai). This pull request has now been integrated. Changeset: 09370527 Author: Kurt Miller <[email protected]> Committer: Andrew Haley <[email protected]> URL: https://git.openjdk.org/jdk/commit/0937052716c49133ebe6b524226066cd8c6e9c2f Stats: 4 lines in 2 files changed: 1 ins; 0 del; 3 mod 8398503: AArch64: Build failure with Clang due to lld error after JDK-8396508 Reviewed-by: erikj, aph, haosun ------------- PR: https://git.openjdk.org/jdk/pull/34160
