Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2220810/?format=api
{ "id": 2220810, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2220810/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uclibc-ng/patch/20260408053507.2640564-3-cmirabil@redhat.com/", "project": { "id": 55, "url": "http://patchwork.ozlabs.org/api/1.1/projects/55/?format=api", "name": "uClibc NG development", "link_name": "uclibc-ng", "list_id": "devel.uclibc-ng.org", "list_email": "devel@uclibc-ng.org", "web_url": "http://www.uclibc-ng.org", "scm_url": "", "webscm_url": "http://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git" }, "msgid": "<20260408053507.2640564-3-cmirabil@redhat.com>", "date": "2026-04-08T05:35:06", "name": "[uclibc-ng-devel,v1,2/3] riscv: add support for static pie binaries", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "a52dd969c3a9502773e2bec41300e2cdbd699bb3", "submitter": { "id": 82370, "url": "http://patchwork.ozlabs.org/api/1.1/people/82370/?format=api", "name": "Charles Mirabile", "email": "cmirabil@redhat.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/uclibc-ng/patch/20260408053507.2640564-3-cmirabil@redhat.com/mbox/", "series": [ { "id": 499072, "url": "http://patchwork.ozlabs.org/api/1.1/series/499072/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uclibc-ng/list/?series=499072", "date": "2026-04-08T05:35:05", "name": "Misc Additions for RISC-V", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/499072/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2220810/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2220810/checks/", "tags": {}, "headers": { "Return-Path": "<devel-bounces@uclibc-ng.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=Fil2uxUn;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=uclibc-ng.org\n (client-ip=89.238.66.15; helo=helium.openadk.org;\n envelope-from=devel-bounces@uclibc-ng.org; receiver=patchwork.ozlabs.org)", "helium.openadk.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=Fil2uxUn;\n\tdkim-atps=neutral" ], "Received": [ "from helium.openadk.org (helium.openadk.org [89.238.66.15])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4frBmm5tg4z20x0\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 08 Apr 2026 15:43:04 +1000 (AEST)", "from helium.openadk.org (localhost [127.0.0.1])\n\tby helium.openadk.org (Postfix) with ESMTP id 3EC6331E0D14;\n\tWed, 08 Apr 2026 07:35:49 +0200 (CEST)", "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n\tby helium.openadk.org (Postfix) with ESMTPS id A61D531E0B9B\n\tfor <devel@uclibc-ng.org>; Wed, 08 Apr 2026 07:35:17 +0200 (CEST)", "from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-561-fBgdEbRGPxe-amAjB7FTag-1; Wed,\n 08 Apr 2026 01:35:14 -0400", "from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n\t(No client certificate requested)\n\tby mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 087FC195608B\n\tfor <devel@uclibc-ng.org>; Wed, 8 Apr 2026 05:35:14 +0000 (UTC)", "from cmirabil.redhat.com (unknown [10.2.16.11])\n\tby mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id 7F182300019F;\n\tWed, 8 Apr 2026 05:35:13 +0000 (UTC)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1775626516;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\t to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\t content-transfer-encoding:content-transfer-encoding:\n\t in-reply-to:in-reply-to:references:references;\n\tbh=6TRDwLMa2i+go5fal/aD9nnkh8FsNPRo08kgXSY36wk=;\n\tb=Fil2uxUnkfjSc0W+zwoJ7KyyiK94QrP1MvmQKofX7VzVHQFwFIz4Jbm5AgoHhcROqAdQ5w\n\tQutarX3wLGqxpUdmhF6/pqJOpLWWIno4gssIuFSNl84K36qIbZ39L8eJn0y0kxrp8BIoWY\n\tHtgMLcp6CNCfOkKxlSQPwdBN7JaQtXc=", "X-MC-Unique": "fBgdEbRGPxe-amAjB7FTag-1", "X-Mimecast-MFC-AGG-ID": "fBgdEbRGPxe-amAjB7FTag_1775626514", "From": "Charles Mirabile <cmirabil@redhat.com>", "To": "devel@uclibc-ng.org", "Date": "Wed, 8 Apr 2026 01:35:06 -0400", "Message-ID": "<20260408053507.2640564-3-cmirabil@redhat.com>", "In-Reply-To": "<20260408053507.2640564-1-cmirabil@redhat.com>", "References": "<20260408053507.2640564-1-cmirabil@redhat.com>", "MIME-Version": "1.0", "X-Scanned-By": "MIMEDefang 3.4.1 on 10.30.177.4", "X-Mimecast-Spam-Score": "0", "X-Mimecast-MFC-PROC-ID": "MWHKJOOrdJj2xqQIUInN7N4S8jAWI9hp0tWfcysjt_c_1775626514", "X-Mimecast-Originator": "redhat.com", "Message-ID-Hash": "KREEVQ4HTLJFZVKHS632UFQGRBDDGIWB", "X-Message-ID-Hash": "KREEVQ4HTLJFZVKHS632UFQGRBDDGIWB", "X-MailFrom": "cmirabil@redhat.com", "X-Mailman-Rule-Misses": "dmarc-mitigation; no-senders; approved; loop;\n banned-address; emergency; member-moderation; nonmember-moderation;\n administrivia; implicit-dest; max-recipients; max-size; news-moderation;\n no-subject; digests; suspicious-header", "CC": "Charles Mirabile <cmirabil@redhat.com>", "X-Mailman-Version": "3.3.10", "Precedence": "list", "Subject": "[uclibc-ng-devel] [PATCH v1 2/3] riscv: add support for static pie\n binaries", "List-Id": "uClibc-ng Development <devel.uclibc-ng.org>", "Archived-At": "\n <https://uclibc-ng.org/mailman3/hyperkitty/list/devel@uclibc-ng.org/message/KREEVQ4HTLJFZVKHS632UFQGRBDDGIWB/>", "List-Archive": "\n <https://uclibc-ng.org/mailman3/hyperkitty/list/devel@uclibc-ng.org/>", "List-Help": "<mailto:devel-request@uclibc-ng.org?subject=help>", "List-Owner": "<mailto:devel-owner@uclibc-ng.org>", "List-Post": "<mailto:devel@uclibc-ng.org>", "List-Subscribe": "<mailto:devel-join@uclibc-ng.org>", "List-Unsubscribe": "<mailto:devel-leave@uclibc-ng.org>", "Content-Type": "text/plain; charset=\"us-ascii\"; x-default=\"true\"", "Content-Transfer-Encoding": "7bit" }, "content": "Just need to wire up a call to `reloc_static_pie` in the startup code\nwhen creating rcrt1.o.\n\nExplicit invocation of auipc and addi directly with pcrel operators are\nnessecary instead of just `la` because otherwise the compiler generates\na relocation.\n\nSigned-off-by: Charles Mirabile <cmirabil@redhat.com>\n---\n libc/sysdeps/linux/riscv32/crt1.S | 9 ++++++++-\n libc/sysdeps/linux/riscv64/crt1.S | 9 ++++++++-\n 2 files changed, 16 insertions(+), 2 deletions(-)", "diff": "diff --git a/libc/sysdeps/linux/riscv32/crt1.S b/libc/sysdeps/linux/riscv32/crt1.S\nindex 5e33046d4..cfcaa3b9f 100644\n--- a/libc/sysdeps/linux/riscv32/crt1.S\n+++ b/libc/sysdeps/linux/riscv32/crt1.S\n@@ -47,7 +47,14 @@\n \n _start:\n \tcall .Lload_gp\n-\tmv a5, a0 /* rtld_fini. */\n+\tmv s0, a0 /* rtld_fini. */\n+#ifdef L_rcrt1\n+1:\n+\tauipc a0, %pcrel_hi(__ehdr_start)\n+\taddi a0, a0, %pcrel_lo(1b)\n+\tcall reloc_static_pie\n+#endif\n+\tmv a5, s0 /* rtld_fini. */\n \t/* main may be in a shared library. */\n \tla a0, main\n \tREG_L a1, 0(sp) /* argc. */\ndiff --git a/libc/sysdeps/linux/riscv64/crt1.S b/libc/sysdeps/linux/riscv64/crt1.S\nindex 5e33046d4..cfcaa3b9f 100644\n--- a/libc/sysdeps/linux/riscv64/crt1.S\n+++ b/libc/sysdeps/linux/riscv64/crt1.S\n@@ -47,7 +47,14 @@\n \n _start:\n \tcall .Lload_gp\n-\tmv a5, a0 /* rtld_fini. */\n+\tmv s0, a0 /* rtld_fini. */\n+#ifdef L_rcrt1\n+1:\n+\tauipc a0, %pcrel_hi(__ehdr_start)\n+\taddi a0, a0, %pcrel_lo(1b)\n+\tcall reloc_static_pie\n+#endif\n+\tmv a5, s0 /* rtld_fini. */\n \t/* main may be in a shared library. */\n \tla a0, main\n \tREG_L a1, 0(sp) /* argc. */\n", "prefixes": [ "uclibc-ng-devel", "v1", "2/3" ] }