From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1698) id 7C6783829BE0; Sun, 29 May 2022 19:09:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7C6783829BE0 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Iain D Sandoe To: gcc-cvs@gcc.gnu.org Subject: [gcc r10-10789] Darwin : Make trampoline templates linker-visible. X-Act-Checkin: gcc X-Git-Author: Iain Sandoe X-Git-Refname: refs/heads/releases/gcc-10 X-Git-Oldrev: 3b7661d48293fa7bb4376394007bd47cfa867db2 X-Git-Newrev: 92f4797ac645c81b6299729113b4d20fbc836007 Message-Id: <20220529190942.7C6783829BE0@sourceware.org> Date: Sun, 29 May 2022 19:09:42 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 May 2022 19:09:42 -0000 https://gcc.gnu.org/g:92f4797ac645c81b6299729113b4d20fbc836007 commit r10-10789-g92f4797ac645c81b6299729113b4d20fbc836007 Author: Iain Sandoe Date: Wed Sep 2 20:33:00 2020 +0100 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 #11 on the development branch. Signed-off-by: Iain Sandoe gcc/ChangeLog: * config/darwin.h (ASM_GENERATE_INTERNAL_LABEL): Add LTRAMP to the list of symbol prefixes that must be made linker- visible. (cherry picked from commit f1e2879ecfc8897df0e25a53e81d1868363c5e08) Diff: --- gcc/config/darwin.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h index 050ae00db1b..64f12d76625 100644 --- a/gcc/config/darwin.h +++ b/gcc/config/darwin.h @@ -839,6 +839,8 @@ extern GTY(()) section * darwin_sections[NUM_DARWIN_SECTIONS]; sprintf (LABEL, "*%s%ld", "lubsan_type", (long)(NUM));\ else if (strcmp ("LASAN", PREFIX) == 0) \ sprintf (LABEL, "*%s%ld", "lASAN", (long)(NUM));\ + else if (strcmp ("LTRAMP", PREFIX) == 0) \ + sprintf (LABEL, "*%s%ld", "lTRAMP", (long)(NUM));\ else \ sprintf (LABEL, "*%s%ld", PREFIX, (long)(NUM)); \ } while (0)