From patchwork Thu Dec 10 21:00:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Klaus Heinrich Kiwi X-Patchwork-Id: 1414547 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CsRCw5BcBz9sW8 for ; Fri, 11 Dec 2020 08:01:16 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=qL9Qyn8e; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4CsRCw0MMPzDqtv for ; Fri, 11 Dec 2020 08:01:16 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=linux.vnet.ibm.com (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com; envelope-from=klaus@linux.vnet.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=qL9Qyn8e; dkim-atps=neutral Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4CsRCc0CSvzDqCw for ; Fri, 11 Dec 2020 08:00:59 +1100 (AEDT) Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0BAKbNtj107305 for ; Thu, 10 Dec 2020 16:00:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id; s=pp1; bh=oLqkdHS0We1Y8xMvKjVrEwlOyzak+YNdl/cAVzlpuU4=; b=qL9Qyn8egQrkAccsDKtnUE9RHhKus5ZR+cRde3W6WMewrKp/wGQEDxkRP0/5nlxZaKgp v3kKnntRNw1DXKmM1/gTLZsY4wmlLOyTt29l84PNsbPmmVQV8uR9qYBSnzG6W4l66tBs 2o/y+8X13NoEaL7nHrETyzgHRakmOdQxYYa9ubl6iAgNSTc/5yx9suzikcNf49VNdNxn E+9K2N5T8uyJxeZHrSP8RjPxBWw/rDUikIv3WuzxgpRyMLEyfXD3bOivbSSprdLjeiY7 p445DYUZqyoHypCK+TfHhqpJrgmysAJHCy7R7ZC+ifCAy7Xe3XNDd/9ev5J1WdqBPXi6 0A== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 35bs6jb8ne-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 10 Dec 2020 16:00:56 -0500 Received: from m0098404.ppops.net (m0098404.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 0BAKnJSN173993 for ; Thu, 10 Dec 2020 16:00:56 -0500 Received: from ppma02dal.us.ibm.com (a.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.10]) by mx0a-001b2d01.pphosted.com with ESMTP id 35bs6jb8mr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 10 Dec 2020 16:00:56 -0500 Received: from pps.filterd (ppma02dal.us.ibm.com [127.0.0.1]) by ppma02dal.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 0BAKwL7G021775; Thu, 10 Dec 2020 21:00:55 GMT Received: from b03cxnp08028.gho.boulder.ibm.com (b03cxnp08028.gho.boulder.ibm.com [9.17.130.20]) by ppma02dal.us.ibm.com with ESMTP id 3581uad43x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 10 Dec 2020 21:00:55 +0000 Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp08028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0BAL0rvM18940294 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 10 Dec 2020 21:00:54 GMT Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DC17EBE051; Thu, 10 Dec 2020 21:00:53 +0000 (GMT) Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BFEF2BE056; Thu, 10 Dec 2020 21:00:52 +0000 (GMT) Received: from klaus-virtual-ubuntu.aus.stglabs.ibm.com (unknown [9.80.211.5]) by b03ledav005.gho.boulder.ibm.com (Postfix) with ESMTP; Thu, 10 Dec 2020 21:00:52 +0000 (GMT) From: Klaus Heinrich Kiwi To: skiboot@lists.ozlabs.org Date: Thu, 10 Dec 2020 18:00:37 -0300 Message-Id: <20201210210037.16660-1-klaus@linux.vnet.ibm.com> X-Mailer: git-send-email 2.17.1 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.343, 18.0.737 definitions=2020-12-10_08:2020-12-09, 2020-12-10 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 malwarescore=0 suspectscore=1 priorityscore=1501 impostorscore=0 spamscore=0 mlxlogscore=999 phishscore=0 lowpriorityscore=0 adultscore=0 mlxscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012100126 Subject: [Skiboot] [PATCH] build: Fix linker script for builtin Kernel X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Commit '6b08928d - build/lds: place debug sections according to defaults' introduced a DEBUG_SECTIONS macro that is effectivelly resetting the location pointer back to zero, making the next section (builtin_kernel) collide with the earlier sections. Fix by moving these sections to the very end. Error message: $ make KERNEL=zImage.epapr [CC] asm/asm-offsets.s [GN] include/asm-offsets.h <...> [LD] skiboot.tmp.elf ld: section .builtin_kernel LMA [0000000000000000,0000000000285d87] overlaps section .head LMA [0000000000000000,0000000000003897] ld: section .naca LMA [0000000000004000,000000000000505f] overlaps section .builtin_kernel LMA [0000000000000000,0000000000285d87] make: *** [/skiboot/Makefile.main:333: skiboot.tmp.elf] Error 1 Fixes: 6b08928d - build/lds: place debug sections according to defaults Signed-off-by: Klaus Heinrich Kiwi --- skiboot.lds.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/skiboot.lds.S b/skiboot.lds.S index 5da6f9d8..5a7f9e31 100644 --- a/skiboot.lds.S +++ b/skiboot.lds.S @@ -233,8 +233,6 @@ SECTIONS ASSERT((HEAP_BASE - SKIBOOT_BASE) >= _end, "Heap collision with image") - DEBUG_SECTIONS - /* Optional kernel image */ . = ALIGN(PAGE_SIZE); .builtin_kernel : { @@ -243,6 +241,8 @@ SECTIONS __builtin_kernel_end = .; } + DEBUG_SECTIONS + /* Discards */ /DISCARD/ : { *(.note.GNU-stack)