From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5789AC433EF for ; Fri, 14 Jan 2022 16:22:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=blbCMFxwumd45sYTlWidwO/FAe6I7vHG6Ceqa9ylZiw=; b=shCb7/BGk778E2 t0kw1teQSerNySOfJOVCoHUSpS2QiFxi7TZkKFvUuxqoAe/KONOQf6ve7jaZdkxPMet0ZMyKKVpZE ubjsF5Hal3D3UJUlBxZAAmC9zbkd4dCjGIoElsd4GVSBk/QddoznoMaXFkW9S+xAd3xWhe36cKMPO Kjd2nXuSVKANJ4Aom5WzfwhiWzBIc+D67fEQIYIB0/xsvHie4gCErT/fgDmgfHIaNM8bsMxVhXGss 7t3k60fDuiz2/Dexo8rfbRmHLN6Cd2tB37O9R4socxfyEVKte9o4Sv48ErmNLx0Re1B2dkuOeP7Kc IDLeJTD5IWGbb+mMxE9g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n8PKJ-009jFz-Qm; Fri, 14 Jan 2022 16:21:19 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n8PKG-009jF4-LR for linux-arm-kernel@lists.infradead.org; Fri, 14 Jan 2022 16:21:18 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1FC506D; Fri, 14 Jan 2022 08:21:15 -0800 (PST) Received: from FVFF77S0Q05N (unknown [10.57.2.91]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 005073F766; Fri, 14 Jan 2022 08:21:13 -0800 (PST) Date: Fri, 14 Jan 2022 16:21:11 +0000 From: Mark Rutland To: Andre Przywara Cc: linux-arm-kernel@lists.infradead.org, Jaxson.Han@arm.com, robin.murphy@arm.com, vladimir.murzin@arm.com, Wei.Chen@arm.com Subject: Re: [bootwrapper PATCH v2 11/13] Announce locations of memory objects Message-ID: References: <20220114105653.3003399-1-mark.rutland@arm.com> <20220114105653.3003399-12-mark.rutland@arm.com> <20220114153053.658a5ffa@donnerap.cambridge.arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220114153053.658a5ffa@donnerap.cambridge.arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220114_082116_771975_EBD97AFE X-CRM114-Status: GOOD ( 14.49 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Jan 14, 2022 at 03:30:53PM +0000, Andre Przywara wrote: > On Fri, 14 Jan 2022 10:56:51 +0000 > Mark Rutland wrote: > > To make it easier to debug boot failures, log the location of memory > > objects at boot time. > > > > This is logged to the serial console as: > > > > | Boot-wrapper v0.2 > > | Entered at EL3 > > | Memory layout: > > | [0000000080000000..0000000080001f90] => boot-wrapper > > | [000000008000fff8..0000000080010000] => mbox > > | [0000000080200000..00000000822af200] => kernel > > | [0000000088000000..0000000088002857] => dtb > > > > Signed-off-by: Mark Rutland > > --- > > +void print_ulong_hex(unsigned long val) > > +{ > > + const char hex_chars[16] = "0123456789abcdef"; > > This breaks the build for me (I guess because of the const?): > ------------------- > ld --gc-sections arch/aarch64/boot.o arch/aarch64/stack.o arch/aarch64/utils.o arch/aarch64/init.o arch/aarch64/psci.o common/boot.o common/bakery_lock.o common/platform.o common/lib.o common/init.o common/psci.o common/gic-v3.o -o linux-system.axf --script=model.lds > ld: common/platform.o: in function `print_ulong_hex': > /src/boot-wrapper-aarch64.git/common/platform.c:58: undefined reference to `__stack_chk_guard' > ld: /src/boot-wrapper-aarch64.git/common/platform.c:58: undefined reference to `__stack_chk_guard' > ld: /src/boot-wrapper-aarch64.git/common/platform.c:66: undefined reference to `__stack_chk_fail' > /src/boot-wrapper-aarch64.git/common/platform.c:66:(.text.print_ulong_hex+0xa0): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `__stack_chk_fail' > make: *** [Makefile:684: linux-system.axf] Error 1 > ------------------ > > Adding -fno-stack-protector fixes it again. > > I am still checking on each one of those compiler options, shall I send a > smaller version of that patch 3/9 of mine, meanwhile, just carrying the > uncontested -ffreestanding and -nostdlib, plus -fno-stack-protector? Yes please! Thanks, Mark. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel