From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, FROM_LOCAL_NOVOWEL,HEADER_FROM_DIFFERENT_DOMAINS,HK_RANDOM_FROM, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: from second.openwall.net (second.openwall.net [193.110.157.125]) by inbox.vuxu.org (Postfix) with SMTP id 2432925B3B for ; Thu, 29 Feb 2024 13:03:28 +0100 (CET) Received: (qmail 7233 invoked by uid 550); 29 Feb 2024 11:59:46 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 7199 invoked from network); 29 Feb 2024 11:59:46 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709208194; x=1709812994; darn=lists.openwall.com; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=SpwXd/ERA626osrOktDRei9fHDX4iJ+Q1ZdDJUtDAcg=; b=Un5o41vKb6xp13vdLPg7r36ig48o+dvmmFeXRAbqhSbn4P8GUVgO4YmFUqBbJ3MLEl GUk3TNMYH2jvM7o2p4BwHj54AT4qSeZleNgW38DySgkZfn6hyFAkYN2PXEdDA3lkA3lO RwtjYyRMHnMPNpM59mE9cCgQxJ5e0GIv1KeNDLLXc5sEnyUWUWgdZBxEfEmsvlBFMRzc wn6/JfUZbvf2tYNl1f6FhmOtZzzzZdAdd9faeRY6TXn0+uc4oUNe+IM4xY67yzWu8vL2 KOybhrffM8RTbMg2pL+QjWYeaXaL7/m8eom6nqRjPsRDYOqtEna7FtjHvW2v6bj5y5ja fusw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709208194; x=1709812994; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SpwXd/ERA626osrOktDRei9fHDX4iJ+Q1ZdDJUtDAcg=; b=WMbFdS8o1TCUGy5Jyi56Nf7b87RqfYiiOgexYawMAr/4bu6uuVmpA4JEpBMP/NfJwr AX2ST65jyT9cOqL2PJ52Giz0qP7hHMsUZei4UQZWfTc9LsGzfYcCmCc9osQ4dh26uAsR wrPSueWY4QbdYXRo43fjTbMmacJnJh/y25ttArPV5otM8IAzsnEwFGnGB9Zw+SO34o8M bOmotOdvJm8uc2HJ7kgSkVkbIaPmkeEdEEtytzMxZb5z+PV6hax8m8qllzD/zbXO4b5w bjueXbcA28TevEhoQRNlcXTtkfgl2X2HAFu0dIxyy6Uz5kj8T5HEqNlh77bRTjhtTYrl yRhw== X-Gm-Message-State: AOJu0Yyptda0avzQb9gSDuWHOvu08nmK7sSDNO5R6Ubc+PGmb8SRQvt2 ru9fZvjs5FCnGT1ROdlbiIprljJVvqZ/hZoUQFjFl30oMlXT4/qX3KgG1qrutlq+OtPe0Ms1DsZ 3H3xtY58/NlzTPRVK2MYz82PytkM= X-Google-Smtp-Source: AGHT+IFNWipRB3IGxWSkeY1CagylpPJWVqSh+l933Mk7+2TA+67PsZSoGt5XHjx6My9eQUSWmj9izozfJNKBPKAw3e8= X-Received: by 2002:a17:90a:e551:b0:299:2cba:7588 with SMTP id ei17-20020a17090ae55100b002992cba7588mr1996038pjb.1.1709208193836; Thu, 29 Feb 2024 04:03:13 -0800 (PST) MIME-Version: 1.0 References: <20240227232430.GM4163@brightrain.aerifal.cx> <20240228001303.GN4163@brightrain.aerifal.cx> <20240228183032.GO4163@brightrain.aerifal.cx> In-Reply-To: From: Max Filippov Date: Thu, 29 Feb 2024 04:03:02 -0800 Message-ID: To: Rich Felker Cc: musl@lists.openwall.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [musl] Initial xtensa/fdpic port review On Wed, Feb 28, 2024 at 1:28=E2=80=AFPM Max Filippov w= rote: > On Wed, Feb 28, 2024 at 10:30=E2=80=AFAM Rich Felker wr= ote: > > Is there a reason local, relative jumps/calls can't be done by > > computing the address of a nearby label and using the offset relative > > to that? That's how they (at least some types; I forget the details) > > work on sh/fdpic. > > IIUC that would require the actual PC knowledge and there's no direct > access to the PC on xtensa. I thought about it for a bit and although the current PC can easily be fetched I don't see how it can work for multiple text segments without a GOT entry. OTOH a link-time conversion of a call without GOT to a call with GOT in case the target and the call site are in the different text segments seems feasible. --=20 Thanks. -- Max