]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Darwin: Section anchors must be linker-visible.
authorIain Sandoe <iain@sandoe.co.uk>
Wed, 6 Aug 2025 05:07:43 +0000 (06:07 +0100)
committerIain Sandoe <iain@sandoe.co.uk>
Sat, 9 Aug 2025 14:12:57 +0000 (15:12 +0100)
In principle, these begin (or at least delineate) a region that
could be split by the static linker.  If the symbols are hidden
to newer linkers they produce diagnostics about the temporary
symbol generated.

gcc/ChangeLog:

* config/darwin.h (ASM_GENERATE_INTERNAL_LABEL): New
entry for LANCHOR.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
gcc/config/darwin.h

index 9b9a3fe403881676022b89b92ef0b95b67fea5df..ccfe01ea410a748a430c18304d5dcd6a5bc5a4fd 100644 (file)
@@ -1005,6 +1005,8 @@ extern GTY(()) section * darwin_sections[NUM_DARWIN_SECTIONS];
       sprintf (LABEL, "*%s%ld", "lASAN", (long)(NUM));\
     else if (strcmp ("LTRAMP", PREFIX) == 0)   \
       sprintf (LABEL, "*%s%ld", "lTRAMP", (long)(NUM));\
+    else if (strncmp ("LANCHOR", PREFIX, 7) == 0)      \
+      sprintf (LABEL, "*%s%ld", "lANCHOR", (long)(NUM));\
     else                                               \
       sprintf (LABEL, "*%s%ld", PREFIX, (long)(NUM));  \
   } while (0)