From nobody Sun Nov 24 00:45:58 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1727797033; cv=none; d=zohomail.com; s=zohoarc; b=iu2L5OK90UIWn3P+OjHC4X24FvV/16Rh2LQjjvdARNEb8q2LCGFRLtSoKTwf/twkdaALF70RNwDtLTH/Lo742R6m+psm4iaanaqaqYsLqKJMdjYwPD6xZ8fOjSQH4ZWtW3MlK8xpdU6C01G9QaOKXz7NDR5jnOWrxMlVDAQbB9Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1727797033; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=aEdt/bDhSDA0BwLzKp4CQhkKVnFzNqW6hVmzR3TaBIk=; b=be97dvzrK8Iy9ky8ZjvrpgHY4N9CrHML7MmUFINUf4uzbA07j2f/8uektrAEKpYhgJYvucf8DqH1Atl9+xYuVbugLpDII13IAHTOBwAgyjchGDf91Rt0Ci74gZ9Tqxm9H3sL5ZEL27M73mZIXX600I3rJmUfHrjZcgFY1mINErw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1727797033536143.82874324391548; Tue, 1 Oct 2024 08:37:13 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1svevY-0006c8-MK; Tue, 01 Oct 2024 11:36:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1svevV-0006Yq-76; Tue, 01 Oct 2024 11:36:37 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1svevS-0006W8-Q0; Tue, 01 Oct 2024 11:36:36 -0400 Received: from pps.filterd (m0353725.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 491Et9vh008906; Tue, 1 Oct 2024 15:36:31 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 420k8s07kn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 01 Oct 2024 15:36:31 +0000 (GMT) Received: from m0353725.ppops.net (m0353725.ppops.net [127.0.0.1]) by pps.reinject (8.18.0.8/8.18.0.8) with ESMTP id 491FWifN026591; Tue, 1 Oct 2024 15:36:30 GMT Received: from ppma22.wdc07v.mail.ibm.com (5c.69.3da9.ip4.static.sl-reverse.com [169.61.105.92]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 420k8s07kk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 01 Oct 2024 15:36:30 +0000 (GMT) Received: from pps.filterd (ppma22.wdc07v.mail.ibm.com [127.0.0.1]) by ppma22.wdc07v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 491ElOoE007923; Tue, 1 Oct 2024 15:36:30 GMT Received: from smtprelay04.fra02v.mail.ibm.com ([9.218.2.228]) by ppma22.wdc07v.mail.ibm.com (PPS) with ESMTPS id 41xvgxwcx7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 01 Oct 2024 15:36:29 +0000 Received: from smtpav03.fra02v.mail.ibm.com (smtpav03.fra02v.mail.ibm.com [10.20.54.102]) by smtprelay04.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 491FaOZK34669304 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 1 Oct 2024 15:36:24 GMT Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 36F9120043; Tue, 1 Oct 2024 15:36:24 +0000 (GMT) Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DA22F20040; Tue, 1 Oct 2024 15:36:23 +0000 (GMT) Received: from li-1de7cd4c-3205-11b2-a85c-d27f97db1fe1.fritz.box (unknown [9.171.30.227]) by smtpav03.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 1 Oct 2024 15:36:23 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from :to:cc:subject:date:message-id:in-reply-to:references :content-transfer-encoding:mime-version; s=pp1; bh=aEdt/bDhSDA0B wLzKp4CQhkKVnFzNqW6hVmzR3TaBIk=; b=sGpae2Ou+QIoebyizb6AE8X4+k2+5 tW3nKcJcAEc1ztsMbYy8Otdk0Vq9LcMY/5C5oM1J1RUFUqJhVctU4deGZf6SyLtK MsBrPVdLqukTM8hEjAGS1BGork815iItcK2+0/EIeDay3AYGCZk+gbdRhGXlGBYX 62/EggyXrbibDiSFPdca7ZQRv7DyhJOSknSbYNxWL6V/kj564i2YUFL9jG1jvSM/ BythF+4Xknx3wmbPY4FiQq0KuxczpNfVnW/Pi2+4w7cGauXh0Ihcn2lFUqaNsbCa MuHwtrPRZ2jIYaNzonOgc9VqwuYvUBktXGvJrCrNMVwmWWTPt2fcyXH8w== From: Marc Hartmayer To: , Thomas Huth Cc: qemu-s390x , Christian Borntraeger , Jens Remus Subject: [PATCH v1 1/3] pc-bios/s390-ccw: Clarify alignment is in bytes Date: Tue, 1 Oct 2024 17:36:16 +0200 Message-ID: <20241001153618.17791-2-mhartmay@linux.ibm.com> X-Mailer: git-send-email 2.46.2 In-Reply-To: <20241001153618.17791-1-mhartmay@linux.ibm.com> References: <20241001153618.17791-1-mhartmay@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-GUID: QBB2fVHnhiREZ4XnlC0_pAVhjrniVIJa X-Proofpoint-ORIG-GUID: puY83N4d7MqcvybWTw-RGvq7JfrycrD7 Content-Transfer-Encoding: quoted-printable X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1051,Hydra:6.0.680,FMLib:17.12.62.30 definitions=2024-10-01_11,2024-09-30_01,2024-09-30_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 lowpriorityscore=0 malwarescore=0 adultscore=0 spamscore=0 clxscore=1015 priorityscore=1501 suspectscore=0 mlxlogscore=999 mlxscore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2408220000 definitions=main-2410010099 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=148.163.158.5; envelope-from=mhartmay@linux.ibm.com; helo=mx0b-001b2d01.pphosted.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ibm.com) X-ZM-MESSAGEID: 1727797034815116600 Content-Type: text/plain; charset="utf-8" From: Jens Remus The assembler directive .align [1] has architecture-dependent behavior, which may be ambiguous for the reader. Some architectures perform the alignment in bytes, others in power of two. s390 does in bytes. Use the directive .balign [2] instead, to clarify that the alignment request is in bytes. No functional change. [1] https://sourceware.org/binutils/docs/as/Align.html [2] https://sourceware.org/binutils/docs/as/Balign.html Signed-off-by: Jens Remus Reviewed-by: Marc Hartmayer Reviewed-by: Thomas Huth --- pc-bios/s390-ccw/start.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pc-bios/s390-ccw/start.S b/pc-bios/s390-ccw/start.S index 061b06591cff..576fc12c06e8 100644 --- a/pc-bios/s390-ccw/start.S +++ b/pc-bios/s390-ccw/start.S @@ -112,7 +112,7 @@ io_new_code: lctlg %c6,%c6,0(%r15) br %r14 =20 - .align 8 + .balign 8 bss_start_literal: .quad __bss_start disabled_wait_psw: @@ -125,7 +125,7 @@ io_new_mask: .quad 0x0000000180000000 =20 .bss - .align 8 + .balign 8 stack: .space STACK_SIZE .size stack,STACK_SIZE --=20 2.43.0 From nobody Sun Nov 24 00:45:58 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1727797071; cv=none; d=zohomail.com; s=zohoarc; b=gsKEKD3YgZhfwfFjvtEzE6e+WFRrje2aFn0FEIPaBXdxPuwps71DMbt71LOhwdIRilr5+CEvKtbYzOMcZaWAjdsdzzimuzGlt1bM6iXnv+nM2Kg1uoIJgCkaK3rW7aye2hY3Y+hVd7EePWrz4t+VuTMkmicxLS9Vq7TmQqP4koQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1727797071; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=biRTxaQ2nLFFtoroHxPtERfzdXigXBF0DaJmILfni58=; b=erXl6uyV+gvJasuC12qyevcRStl9mvtNH2CdlTlo+cuoHkt3+zs1CK7hkLdfdvK3trEmJTZeb8k6OA/cc21u70CHVbmihsN/VV+9a34mR/oIuJ9LW0irqCPCwfy5EIj1v/oOG6W99XkS65MFJf36fLEqzYg8pQGrrBoPXMalpIY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1727797071164958.5046421708032; Tue, 1 Oct 2024 08:37:51 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1svevX-0006bK-4D; Tue, 01 Oct 2024 11:36:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1svevV-0006Yp-71; Tue, 01 Oct 2024 11:36:37 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1svevS-0006W9-Rb; Tue, 01 Oct 2024 11:36:36 -0400 Received: from pps.filterd (m0360072.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 491EJa8h020050; Tue, 1 Oct 2024 15:36:31 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 420jra8eb5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 01 Oct 2024 15:36:31 +0000 (GMT) Received: from m0360072.ppops.net (m0360072.ppops.net [127.0.0.1]) by pps.reinject (8.18.0.8/8.18.0.8) with ESMTP id 491FaVxH028398; Tue, 1 Oct 2024 15:36:31 GMT Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 420jra8eb2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 01 Oct 2024 15:36:31 +0000 (GMT) Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1]) by ppma23.wdc07v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 491Cm39J014150; Tue, 1 Oct 2024 15:36:30 GMT Received: from smtprelay04.fra02v.mail.ibm.com ([9.218.2.228]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 41xwmk5578-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 01 Oct 2024 15:36:30 +0000 Received: from smtpav03.fra02v.mail.ibm.com (smtpav03.fra02v.mail.ibm.com [10.20.54.102]) by smtprelay04.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 491FaOof17301956 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 1 Oct 2024 15:36:24 GMT Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 901A720043; Tue, 1 Oct 2024 15:36:24 +0000 (GMT) Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4829020040; Tue, 1 Oct 2024 15:36:24 +0000 (GMT) Received: from li-1de7cd4c-3205-11b2-a85c-d27f97db1fe1.fritz.box (unknown [9.171.30.227]) by smtpav03.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 1 Oct 2024 15:36:24 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=pp1; bh=biRTxaQ2nLFFt oroHxPtERfzdXigXBF0DaJmILfni58=; b=mMkUPaD35E2+JJD44fZNm+15ceZQX YV7evUMtWkmk7aC5V8WWxxsuB2Yd5f4DdYLR1rJtKgmZLrZRfs9TGSbU+DKchdAg 76/AP3djS9oM6Fv/215IsQw6RwyjQ3VyIz0car8v2i3/tk7j90o+l24IRaXCR9Lc /wfZj1vaT8lw4hr+cZpYzzCikIByYAynvrCydnSVWkr6vz3ioRHlbEAxiyuHOdpH gxRT5nZyJG/7cxFI6pnGQBr9e5Ni73Vae/unfIKl2NTzDnX+mwitpzkk1ABPpY52 oJbklIIrGhPgtd5J4ql0sMKdRKR5TE2Tz/j89OPmNk15M9ZQlGrs+YIEg== From: Marc Hartmayer To: , Thomas Huth Cc: qemu-s390x , Christian Borntraeger , Jens Remus Subject: [PATCH v1 2/3] pc-bios/s390-ccw: Don't generate TEXTRELs Date: Tue, 1 Oct 2024 17:36:17 +0200 Message-ID: <20241001153618.17791-3-mhartmay@linux.ibm.com> X-Mailer: git-send-email 2.46.2 In-Reply-To: <20241001153618.17791-1-mhartmay@linux.ibm.com> References: <20241001153618.17791-1-mhartmay@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-GUID: MUa31YAqcDgCpHBOZQC4zfnALsUbXHhl X-Proofpoint-ORIG-GUID: GH_eRofEq1T46387UwRVnobiGvU9JdEm X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1051,Hydra:6.0.680,FMLib:17.12.62.30 definitions=2024-10-01_11,2024-09-30_01,2024-09-30_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxscore=0 lowpriorityscore=0 clxscore=1015 bulkscore=0 spamscore=0 phishscore=0 mlxlogscore=999 adultscore=0 priorityscore=1501 malwarescore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2408220000 definitions=main-2410010099 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=148.163.158.5; envelope-from=mhartmay@linux.ibm.com; helo=mx0b-001b2d01.pphosted.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ibm.com) X-ZM-MESSAGEID: 1727797073105116600 Content-Type: text/plain; charset="utf-8" From: Jens Remus Commit 7cd50cbe4ca3 ("pc-bios/s390-ccw: Don't use __bss_start with the "larl" instruction") introduced the address constant bss_start_literal for __bss_start in the .text section, which introduced a relocation in code (i.e. TEXTREL). The dedicated constant is required, as __bss_start may not necessarily be aligned on a 2-byte boundary (see subject commit for details). Move the constant to the .data section to get rid of the relocation in the .text section. Add the linker option -z text to prevent TEXTRELs to get introduced in the future. Note that the R_390_RELATIVE relocations are taken care of by function glue() in include/hw/elf_ops.h.inc introduced by commit 5dce07e1cb67 ("elf-loader: Provide the possibility to relocate s390 ELF files"). Reported-by: Marc Hartmayer Signed-off-by: Jens Remus Reviewed-by: Marc Hartmayer Reviewed-by: Thomas Huth --- pc-bios/s390-ccw/Makefile | 2 +- pc-bios/s390-ccw/start.S | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pc-bios/s390-ccw/Makefile b/pc-bios/s390-ccw/Makefile index 6207911b53aa..ab6bd1edf41e 100644 --- a/pc-bios/s390-ccw/Makefile +++ b/pc-bios/s390-ccw/Makefile @@ -40,7 +40,7 @@ EXTRA_CFLAGS +=3D -ffreestanding -fno-delete-null-pointer= -checks -fno-common -fPIE EXTRA_CFLAGS +=3D -fwrapv -fno-strict-aliasing -fno-asynchronous-unwind-ta= bles EXTRA_CFLAGS +=3D -msoft-float EXTRA_CFLAGS +=3D -std=3Dgnu99 -LDFLAGS +=3D -Wl,-pie -nostdlib -z noexecstack +LDFLAGS +=3D -Wl,-pie -nostdlib -z noexecstack -z text =20 cc-test =3D $(CC) -Werror $1 -c -o /dev/null -xc /dev/null >/dev/null 2>/d= ev/null cc-option =3D if $(call cc-test, $1); then \ diff --git a/pc-bios/s390-ccw/start.S b/pc-bios/s390-ccw/start.S index 576fc12c06e8..b70213e41246 100644 --- a/pc-bios/s390-ccw/start.S +++ b/pc-bios/s390-ccw/start.S @@ -113,8 +113,6 @@ io_new_code: br %r14 =20 .balign 8 -bss_start_literal: - .quad __bss_start disabled_wait_psw: .quad 0x0002000180000000,0x0000000000000000 enabled_wait_psw: @@ -124,6 +122,11 @@ external_new_mask: io_new_mask: .quad 0x0000000180000000 =20 +.data + .balign 8 +bss_start_literal: + .quad __bss_start + .bss .balign 8 stack: --=20 2.43.0 From nobody Sun Nov 24 00:45:58 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1727797057; cv=none; d=zohomail.com; s=zohoarc; b=hJQxvcrS+iE6fhoJNY81ILIUpy/Q6X6idJlVyX8N/1N1F6ecLttBXocWGWlHw7XY+oHAQ7Ax0c08yKjc2Nq98sm7YQStgX4rbrMPtgHaFobeRynpQ+A7feYuULZMC8LZ0QSJMQ6nD1Rb1dS8rsSumL7EUvf+cCTgTxocsu5Eem8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1727797057; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=aNfGkfiYOUovwxB3qM7PqOAgxOsZmaHO4n59hTNi8jA=; b=cYCWdPdrPWTmQ+fnQK4zAfDfyDxlcXqoz5m5nSuy0wT2HgCh2U0fKfUO1RN5E8vIELj5cLx8VD1rGTeYGUttnNZl6HLvPXV6j974wtFMvPvcASGfla5/OZpGrnPwPZ5r1Dme4PQVbKgI/X7NXfCxBuR9XeAUvi8c5u59quDD4nE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1727797057396708.9147853258277; Tue, 1 Oct 2024 08:37:37 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1svevW-0006ZM-1g; Tue, 01 Oct 2024 11:36:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1svevU-0006YX-MC; Tue, 01 Oct 2024 11:36:36 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1svevS-0006WB-Ek; Tue, 01 Oct 2024 11:36:36 -0400 Received: from pps.filterd (m0360083.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 491FLKka025383; Tue, 1 Oct 2024 15:36:32 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 420kn4r2mj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 01 Oct 2024 15:36:31 +0000 (GMT) Received: from m0360083.ppops.net (m0360083.ppops.net [127.0.0.1]) by pps.reinject (8.18.0.8/8.18.0.8) with ESMTP id 491FY4cA019836; Tue, 1 Oct 2024 15:36:31 GMT Received: from ppma11.dal12v.mail.ibm.com (db.9e.1632.ip4.static.sl-reverse.com [50.22.158.219]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 420kn4r2md-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 01 Oct 2024 15:36:31 +0000 (GMT) Received: from pps.filterd (ppma11.dal12v.mail.ibm.com [127.0.0.1]) by ppma11.dal12v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 491DWR70002346; Tue, 1 Oct 2024 15:36:30 GMT Received: from smtprelay01.fra02v.mail.ibm.com ([9.218.2.227]) by ppma11.dal12v.mail.ibm.com (PPS) with ESMTPS id 41xxu14wj2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 01 Oct 2024 15:36:30 +0000 Received: from smtpav03.fra02v.mail.ibm.com (smtpav03.fra02v.mail.ibm.com [10.20.54.102]) by smtprelay01.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 491FaPXU42598768 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 1 Oct 2024 15:36:25 GMT Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id ECDEC20043; Tue, 1 Oct 2024 15:36:24 +0000 (GMT) Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A14D520040; Tue, 1 Oct 2024 15:36:24 +0000 (GMT) Received: from li-1de7cd4c-3205-11b2-a85c-d27f97db1fe1.fritz.box (unknown [9.171.30.227]) by smtpav03.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 1 Oct 2024 15:36:24 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=pp1; bh=aNfGkfiYOUovw xB3qM7PqOAgxOsZmaHO4n59hTNi8jA=; b=VQkQcopsEzcW8cabp9DpwRs/PVMSi pIHSjYz8/ogTKfjPTVb1AMfxQ3UDEzasHWhSq6hTKtJlHIlhwtt8RfWq0Lb7Owfg wDisN40yt6DfEdnHxPLyRM7m40d/DwgDp+lVrFH/8tRfv4f/NuHtxTfLFesF8tDB WAMog6B2ZuvQYsz0IOX4ReTJViJuDJknedxh3TC2JtPlxp0+VJ81EoXidlH/eazf uZjKnXNlDqUjzoeOrpKEiLRsPxlveqZp9ckysBHHN3+p6BDC+GIgP3YKyJpCcDH1 LeX6KzRv10b0kL0RBDa5Vz3p1YjPmoboW+zl5qRyaXnx0uVn82QHBtxxg== From: Marc Hartmayer To: , Thomas Huth Cc: qemu-s390x , Christian Borntraeger , Jens Remus Subject: [PATCH v1 3/3] pc-bios/s390-ccw: Introduce `EXTRA_LDFLAGS` Date: Tue, 1 Oct 2024 17:36:18 +0200 Message-ID: <20241001153618.17791-4-mhartmay@linux.ibm.com> X-Mailer: git-send-email 2.46.2 In-Reply-To: <20241001153618.17791-1-mhartmay@linux.ibm.com> References: <20241001153618.17791-1-mhartmay@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: GZsDp5Tv87nw38iczhg-FY5tCtpF4hRg X-Proofpoint-GUID: QgwUv-xkVO3JtDbWQ1MHRaKzp0AZBjPV X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1051,Hydra:6.0.680,FMLib:17.12.62.30 definitions=2024-10-01_11,2024-09-30_01,2024-09-30_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 mlxlogscore=638 impostorscore=0 lowpriorityscore=0 adultscore=0 spamscore=0 bulkscore=0 priorityscore=1501 phishscore=0 suspectscore=0 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2408220000 definitions=main-2410010099 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=148.163.156.1; envelope-from=mhartmay@linux.ibm.com; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ibm.com) X-ZM-MESSAGEID: 1727797059112116600 Content-Type: text/plain; charset="utf-8" Some packaging tools want to override `LDFLAGS` when building QEMU, this wi= ll result in a build error as most likely no `-nostdlib` flag is passed. Intro= duce `EXTRA_LDFLAGS` so that the packager can override `LDFLAGS` without breakin= g the build. Signed-off-by: Marc Hartmayer Reviewed-by: Thomas Huth --- Note: Normally, I would rather use ALL_LDFLAGS, but adding EXTRA_LDFLAGS ma= tches with the current Makefile style. --- pc-bios/s390-ccw/netboot.mak | 2 +- pc-bios/s390-ccw/Makefile | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pc-bios/s390-ccw/netboot.mak b/pc-bios/s390-ccw/netboot.mak index 046aa35587ac..b1bc12603d99 100644 --- a/pc-bios/s390-ccw/netboot.mak +++ b/pc-bios/s390-ccw/netboot.mak @@ -6,7 +6,7 @@ NETOBJS :=3D start.o sclp.o cio.o virtio.o virtio-net.o jum= p2ipl.o netmain.o LIBC_INC :=3D -nostdinc -I$(SLOF_DIR)/lib/libc/include LIBNET_INC :=3D -I$(SLOF_DIR)/lib/libnet =20 -NETLDFLAGS :=3D $(LDFLAGS) -Wl,-Ttext=3D0x7800000 +NETLDFLAGS :=3D $(EXTRA_LDFLAGS) $(LDFLAGS) -Wl,-Ttext=3D0x7800000 =20 $(NETOBJS): EXTRA_CFLAGS +=3D $(LIBC_INC) $(LIBNET_INC) =20 diff --git a/pc-bios/s390-ccw/Makefile b/pc-bios/s390-ccw/Makefile index ab6bd1edf41e..56c971462992 100644 --- a/pc-bios/s390-ccw/Makefile +++ b/pc-bios/s390-ccw/Makefile @@ -4,6 +4,7 @@ all: build-all =20 include config-host.mak CFLAGS =3D -O2 -g +LDFLAGS ?=3D MAKEFLAGS +=3D -rR =20 GIT_SUBMODULES =3D roms/SLOF @@ -40,7 +41,7 @@ EXTRA_CFLAGS +=3D -ffreestanding -fno-delete-null-pointer= -checks -fno-common -fPIE EXTRA_CFLAGS +=3D -fwrapv -fno-strict-aliasing -fno-asynchronous-unwind-ta= bles EXTRA_CFLAGS +=3D -msoft-float EXTRA_CFLAGS +=3D -std=3Dgnu99 -LDFLAGS +=3D -Wl,-pie -nostdlib -z noexecstack -z text +EXTRA_LDFLAGS +=3D -Wl,-pie -nostdlib -z noexecstack -z text =20 cc-test =3D $(CC) -Werror $1 -c -o /dev/null -xc /dev/null >/dev/null 2>/d= ev/null cc-option =3D if $(call cc-test, $1); then \ @@ -58,7 +59,7 @@ config-cc.mak: Makefile build-all: s390-ccw.img s390-netboot.img =20 s390-ccw.elf: $(OBJECTS) - $(call quiet-command,$(CC) $(LDFLAGS) -o $@ $(OBJECTS),Linking) + $(call quiet-command,$(CC) $(EXTRA_LDFLAGS) $(LDFLAGS) -o $@ $(OBJECTS),L= inking) =20 s390-ccw.img: s390-ccw.elf $(call quiet-command,$(STRIP) --strip-unneeded $< -o $@,Stripping $< into) --=20 2.43.0