xref: /kernel/linux/linux-6.6/arch/s390/tools/gcc-thunk-extern.sh (revision 62306a36)
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /kernel/linux/linux-6.6/arch/s390/tools/
162306a36Sopenharmony_ci#!/bin/sh
262306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0
362306a36Sopenharmony_ci# Borrowed from gcc: gcc/testsuite/gcc.target/s390/nobp-section-type-conflict.c
462306a36Sopenharmony_ci# Checks that we don't get error: section type conflict with ‘put_page’.
562306a36Sopenharmony_ci
662306a36Sopenharmony_cicat << "END" | $@ -x c - -fno-PIE -march=z10 -mindirect-branch=thunk-extern -mfunction-return=thunk-extern -mindirect-branch-table -O2 -c -o /dev/null
762306a36Sopenharmony_ciint a;
862306a36Sopenharmony_ciint b (void);
962306a36Sopenharmony_civoid c (int);
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_cistatic void
1262306a36Sopenharmony_ciput_page (void)
1362306a36Sopenharmony_ci{
1462306a36Sopenharmony_ci  if (b ())
1562306a36Sopenharmony_ci    c (a);
1662306a36Sopenharmony_ci}
1762306a36Sopenharmony_ci
1862306a36Sopenharmony_ci__attribute__ ((__section__ (".init.text"), __cold__)) void
1962306a36Sopenharmony_cid (void)
2062306a36Sopenharmony_ci{
2162306a36Sopenharmony_ci  put_page ();
2262306a36Sopenharmony_ci  put_page ();
2362306a36Sopenharmony_ci}
2462306a36Sopenharmony_ciEND
25

Indexes created Thu Nov 07 10:32:03 CST 2024