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

--- Comment #21 from Iain Sandoe <iains at gcc dot gnu.org> ---
Author: iains
Date: Mon Oct 28 19:40:03 2019
New Revision: 277540

URL: https://gcc.gnu.org/viewcvs?rev=277540&root=gcc&view=rev
Log:
[Darwin] Amend section for constants with relocations.

Darwin's linker doesn't like text section relocations (they require special
enabling). The Fortran FE, at least, seems to generate cases where the
initialiser for a pointer constant can need a relocation. We can handle
this by special-casing SECCAT_RODATA when the relocation is present by
placing the constant in the .const_data section.

2019-10-28  Iain Sandoe  <i...@sandoe.co.uk>

        Backport from mainline
        2019-10-05  Iain Sandoe  <i...@sandoe.co.uk>

        PR target/59888
        * config/darwin.c (darwin_rodata_section): Add relocation flag,
        choose const_data section for constants with relocations.
        (machopic_select_section): Pass relocation flag to
        darwin_rodata_section ().


Modified:
    branches/gcc-8-branch/gcc/ChangeLog
    branches/gcc-8-branch/gcc/config/darwin.c

Reply via email to