https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116887
--- Comment #28 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Xi Ruoyao <xry...@gcc.gnu.org>: https://gcc.gnu.org/g:c8d35f2ecbf124bdd164dbb1c36de9d90695843b commit r15-4842-gc8d35f2ecbf124bdd164dbb1c36de9d90695843b Author: Xi Ruoyao <xry...@xry111.site> Date: Fri Oct 11 02:44:27 2024 +0800 Always set SECTION_RELRO for or .data.rel.ro{,.local} [PR116887] At least two ports (hppa and loongarch) need to set SECTION_RELRO for .data.rel.ro{,.local} in section_type_flags (PR52999 and PR116887), and I cannot see a reason not to just set it in the generic code. With this applied we can also remove the hppa-specific pa_section_type_flags in a future patch. gcc/ChangeLog: PR target/116887 * varasm.cc (default_section_type_flags): Always set SECTION_RELRO if name is .data.rel.ro{,.local}. gcc/testsuite/ChangeLog: PR target/116887 * gcc.dg/pr116887.c: New test.