Skip to content

Commit f1e2879

Browse files
committed
Darwin : Make trampoline templates linker-visible.
For aarch64, the alignment of the LTRAMPn symbols matters. Actually, the LTRAMPn symbols _are_ 8 byte aligned, but because they are Local, the linker doesn't know that this guarantee can be met. It assumes that they are not necessarily more aligned than the containing section (ld64 atoms strike again). The fix is to publish the trampoline symbol for the linker to access directly - it can then see that the atom is suitably aligned. Fixes issue gcc-mirror#11 on the development branch. Signed-off-by: Iain Sandoe <[email protected]> gcc/ChangeLog: * config/darwin.h (ASM_GENERATE_INTERNAL_LABEL): Add LTRAMP to the list of symbol prefixes that must be made linker- visible.
1 parent f8a1e06 commit f1e2879

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

gcc/config/darwin.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -921,6 +921,8 @@ extern GTY(()) section * darwin_sections[NUM_DARWIN_SECTIONS];
921921
sprintf (LABEL, "*%s%ld", "lubsan_type", (long)(NUM));\
922922
else if (strcmp ("LASAN", PREFIX) == 0) \
923923
sprintf (LABEL, "*%s%ld", "lASAN", (long)(NUM));\
924+
else if (strcmp ("LTRAMP", PREFIX) == 0) \
925+
sprintf (LABEL, "*%s%ld", "lTRAMP", (long)(NUM));\
924926
else \
925927
sprintf (LABEL, "*%s%ld", PREFIX, (long)(NUM)); \
926928
} while (0)

0 commit comments

Comments
 (0)