From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vs1-xe2f.google.com (mail-vs1-xe2f.google.com [IPv6:2607:f8b0:4864:20::e2f]) by sourceware.org (Postfix) with ESMTPS id AE6B33850424 for ; Wed, 14 Jul 2021 17:33:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AE6B33850424 Received: by mail-vs1-xe2f.google.com with SMTP id z7so1378379vsn.7 for ; Wed, 14 Jul 2021 10:33:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=X2+kQx1vutsFAbgnzRkWPeOPG3Xlm85au0fb9RiUnE0=; b=bLqYokgZYfzCxRwhjbH/Lnk1OEsVzag7P7gSTR7hcycjSI1kBTT3999H7DhtPMrTsR xD4gF0EUj2vHOgCFTsytWlNjwiYGyzKM8MaoU/ZHkHxneK6K6iGvcy8yX4KYcYxt7R7N Qmf8xh5An8ZsuWD+DUTGlLaQR3q6RBVl/Rli9FQHZPo64DZdi1+FSpNb+6/rZr5JlM+a xHbd3l6KXNaKCgwR7DK4ON35bdVm9zRHP0Bmqw01Xpgk453AjL6+GvoiazmE+K45xqoE zjAZqHC2dM1P0fTKB6YwpJiBt6nD6KLJZe9B1dnbCj+x4CJ2CjfKwPZKz9TdrebPbM5T TtyA== X-Gm-Message-State: AOAM531pr1GmzmUPyOIQYYe97ja8FH0hIdidUJqH8M1sXUjhsYt/z9Ta z4l9Fu3RfLygFrpnE+exSHRgS5m8PG8O3f86BBZ0mjAfEIDvVQ== X-Google-Smtp-Source: ABdhPJy48HrQ62SbKR50nlZznCKJu7ypqT7LvjPWN9YUcbvQUbw1HeXVh9ZMo1Wh6PEdaeSN4GJGmbF67AVueTXk/SY= X-Received: by 2002:a67:841:: with SMTP id 62mr15579372vsi.22.1626283985319; Wed, 14 Jul 2021 10:33:05 -0700 (PDT) MIME-Version: 1.0 From: Stephan Dollberg Date: Wed, 14 Jul 2021 18:32:54 +0100 Message-ID: Subject: [QUESTION] Using host functions in AOT mode To: jit@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: jit@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Jit mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2021 17:33:06 -0000 Hello, in jit compilation mode I can call functions from the host binary by using gcc_jit_context_new_call_through_ptr. This doesn't work in AOT mode. Is there any way to include host functions when compiling a binary in AOT mode? GCC_JIT_OUTPUT_KIND_EXECUTABLE mentions that there is currently no support for linking. I could see a work around where instead you compile to GCC_JIT_OUTPUT_KIND_OBJECT_FILE and externally invoke gcc to link your host/runtime and AOT-compiled functions together. Cheers, Stephan