From patchwork Wed Jan 26 21:41:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 50472 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E3F463858017 for ; Wed, 26 Jan 2022 21:41:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E3F463858017 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1643233283; bh=A8xnCEMgIAVD/tqVxhDXOo/5m6uq7Shdz+D+J8n3cJk=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=Hh76CbIYxYIr9mgdd5jD1CbS9HMzMQD8D/KwJSoUt2HYUbkWXO4Hxd1WeZCeBFVbs NDk+4Jxz4lsZsH0Ndags1kAEIE6jBto5PBN0Edh1s22+vLM5ccvT1p20d87X+5XbMJ ZTITu3bsvmqafVA0uOdeWojgMqDlI0ijl1wtu1Zw= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by sourceware.org (Postfix) with ESMTPS id D91613858C60 for ; Wed, 26 Jan 2022 21:41:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D91613858C60 Received: by mail-pf1-x42d.google.com with SMTP id p37so859955pfh.4 for ; Wed, 26 Jan 2022 13:41:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=A8xnCEMgIAVD/tqVxhDXOo/5m6uq7Shdz+D+J8n3cJk=; b=S/sGDGkVt+W+CAzO5wsr0LCDuIL04IV60caEHBrR/vDJ/ZxUqdGB81E8nPOhkrSfgV /0/1Ww8ylzBqZ7KDRF4ckLN0v2LcYZemEIlq338nqWrNvhajfCK73vurnsAAHAW4UgQH nZqq3tJ7keOlOiRJQOenFFCkVEMdNJBFS5pYfHKjVW2fiULT1DD5gmG41MlhLJ5UxueY lcmCEIPSOvUaP2HH8zWOXVx1pNiJO+Hnibhbafw0qe8gn74lFzyFHbP2+ppYBLT3iff0 zSxi5zCZGrrj8W8RDG+HTsirco96FSQcqItKfQwwsxgbcYA3F4BxN23Pvnj/JqdTfUa9 T8/w== X-Gm-Message-State: AOAM530D8Xok0fwdFn7yIqwacSCZ+gYjOVxRxEO1Y3TmYmUBSbUyRuOR 074s3tN8S6fr+hD9WiEm+7A= X-Google-Smtp-Source: ABdhPJyWQZ8lm3Zzj3xknPySsFxAWnXAam0+1BQyCD4gUGWNyJJ8C/2ENiWXOzFu1O06bhLcUt506Q== X-Received: by 2002:a63:874a:: with SMTP id i71mr586419pge.576.1643233261780; Wed, 26 Jan 2022 13:41:01 -0800 (PST) Received: from gnu-tgl-3.localdomain ([172.58.35.133]) by smtp.gmail.com with ESMTPSA id b20sm3127831pfv.134.2022.01.26.13.41.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jan 2022 13:41:01 -0800 (PST) Received: from gnu-tgl-3.. (localhost [IPv6:::1]) by gnu-tgl-3.localdomain (Postfix) with ESMTP id 65B80C0554; Wed, 26 Jan 2022 13:41:00 -0800 (PST) To: libc-alpha@sourceware.org Subject: [PATCH] tst-p_alignmod3.so: Disable GNU_RELRO segment Date: Wed, 26 Jan 2022 13:41:00 -0800 Message-Id: <20220126214100.2433851-1-hjl.tools@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-3028.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_BARRACUDACENTRAL, 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: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: "H.J. Lu via Libc-alpha" From: "H.J. Lu" Reply-To: "H.J. Lu" Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" tst-p_alignmod3.so has invalid p_align on LOAD segments which can't work with GNU_RELRO. Pass -z norelro to linker to disable GNU_RELRO segment to trigger .../elf/tst-p_alignmod3.so: ELF load command address/offset not page-aligned instead of .../elf/tst-p_alignmod3.so: cannot change memory protections --- elf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elf/Makefile b/elf/Makefile index daafb5cf12..6229add1fc 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -2619,7 +2619,7 @@ $(objpfx)tst-p_alignmod2.so: $(objpfx)tst-p_alignmod-base.so cp $(objpfx)tst-p_alignmod-base.so $@ $(PYTHON) $(..)scripts/tst-elf-edit.py -a 1 $@ -LDFLAGS-tst-p_alignmod3.so += -Wl,-z,max-page-size=0x100,-z,common-page-size=0x100 +LDFLAGS-tst-p_alignmod3.so += -Wl,-z,max-page-size=0x100,-z,common-page-size=0x100,-z,norelro $(objpfx)tst-p_align3: $(objpfx)tst-p_alignmod3.so $(objpfx)tst-p_align3.out: tst-p_align3.sh $(objpfx)tst-p_align3