https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123791

--- Comment #9 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Wilco Dijkstra <[email protected]>:

https://gcc.gnu.org/g:4fb8b2a1fcd8ac89a51eba07f76e8e1af1d215c7

commit r16-7065-g4fb8b2a1fcd8ac89a51eba07f76e8e1af1d215c7
Author: Wilco Dijkstra <[email protected]>
Date:   Mon Jan 26 14:11:17 2026 +0000

    AArch64: Block symbols in literal pools [PR 123791]

    Symbols with a large offset may be emitted into a literal pool.
    aarch64_select_rtx_section() may then select .text or .rodata even if
    the symbol has a dynamic relocation.  Checking for CONST_INT or
    CONST_DOUBLE avoids this.  Ensure aarch64_cannot_force_const_mem()
    returns true for symbols and labels so that they cannot be placed in
    literal pools.  Only the large code model emits symbols in the literal
    pool (no support for PIC/PIE).

    gcc:
            PR target/123791
            * config/aarch64/aarch64.cc (aarch64_cannot_force_const_mem):
            Always return true for symbols and labels except for large model.
            (aarch64_select_rtx_section): Force .rodata for constants only.

    gcc/testsuite:
            PR target/123791
            * gcc.target/aarch64/pr123791.c: New test.

Reply via email to