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).

Incidentally, I have maintained for years that no -one has ever done a major 
refactoring/clean up that didn't break something. I was beginning to think that 
this one might have been the exception, but it was not to be.

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

PR Comment: https://git.openjdk.org/jdk/pull/34160#issuecomment-7373055622

Reply via email to