https://gcc.gnu.org/g:969f4827a9ae67e4b1752246e02679038a6e1ea3
commit r17-5100-g969f4827a9ae67e4b1752246e02679038a6e1ea3 Author: Iain Sandoe <[email protected]> Date: Mon Oct 12 20:18:48 2026 +0100 Darwin: Make C++ source-locations linker-visible [PR126723]. We need to make the compiler-synthesized constants linker-visible since these have a distinct name, they do not pass through the general channel. PR target/126723 gcc/ChangeLog: * config/darwin.h (ASM_GENERATE_INTERNAL_LABEL): Handle C++ source locations. Signed-off-by: Iain Sandoe <[email protected]> Diff: --- gcc/config/darwin.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h index 739f91ea9d3f..fa073bc87ce1 100644 --- a/gcc/config/darwin.h +++ b/gcc/config/darwin.h @@ -1017,9 +1017,8 @@ extern GTY(()) section * darwin_sections[NUM_DARWIN_SECTIONS]; else if (strlen (PREFIX) == 19 \ && strncmp ("Lcontract_violation", PREFIX, 19) == 0) \ sprintf (LABEL, "*%s%ld", "lcontract_violation", (long)(NUM));\ - else if (strlen (PREFIX) == 13 \ - && strncmp ("Lsrc_loc_impl", PREFIX, 13) == 0) \ - sprintf (LABEL, "*%s%ld", "lsrc_loc_impl", (long)(NUM));\ + else if (strlen (PREFIX) == 8 && strncmp ("Lsrc_loc", PREFIX, 8) == 0) \ + sprintf (LABEL, "*%s%ld", "lsrc_loc", (long)(NUM));\ else \ sprintf (LABEL, "*%s%ld", PREFIX, (long)(NUM)); \ } while (0)
