From patchwork Tue Jun 5 17:12:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 137783 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp1217127lji; Tue, 5 Jun 2018 10:15:31 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ3BUw1Mb5CBE9rSD6oIQl5GdK2FFxYZDZlWtmrJkeJWz+emc8vj6BTJD9L5kOG4O0LspIw X-Received: by 2002:a24:714:: with SMTP id f20-v6mr83982itf.76.1528218931504; Tue, 05 Jun 2018 10:15:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528218931; cv=none; d=google.com; s=arc-20160816; b=mBFnoVy5x7uoJ5jfi0gdHTS6hB7jCGaZiefDDmy8vZDGnau7edKWtBsVlGxSyRHURB AVk4bNozDog9ubJkDDq9QuIev8RxFuJ//YygBKYw3LHehy7Y2AWgXkMVA1AnNzo0oLZC RFH3d3a1rjPFfwE1t8r1ZcRfw7xsnk7Q7Iv5x5SLBPxcjOS2RzxibwR/ODadsW/A2hHE rjc4X7ZtJZPXKaGJ8dbqWfxj3fA0wtJsQji+paPDEKIKVoRSaiaqcKRGQLzOz2eKu8rm 4fUf1WpLYh3iHZq/anKkWFaX26skzWzffQAyjJtQjMgtOUlNhY3j2MlgR0EmdnsrdDge MaAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:references:in-reply-to:message-id:date:to:from :arc-authentication-results; bh=lI3/F/V4MwTeHaqkYV0Fhyepj2Gz5Oq4uoWBRj/fIyg=; b=lsvjbIhZNv7BgUwlKGC8G922/VQtHq54T27eBb6+8fg9qzgpLYGXgR25o6YVscyNkR v7KuE7qxyjS95Y9lSZtA2TNZZAOceAmQDdaonYzITvCG9rcwD5eIgz1livyKdnSCfyLw Ok3LrjudmlYi+ZCikZeartvKTF8U8Dig5n3KVfucU3o66EAS76Eil2qoRnPtPHcnAVL5 tX+5pCudJ+3uMj/vPt+G8mcIGyHFYeZZNccX3MrRUBJwybm4kANTuP6rmd1nzxTkOv6x 4VzBcVHa0QA4+HaNBzbOVCaBOxGbohzyBpNxc55/x7kz7m6l7HAQZhDJimOMmtj7IJd3 rbmA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id d130-v6si10059637ioe.248.2018.06.05.10.15.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 05 Jun 2018 10:15:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1fQFW2-0007ym-Lq; Tue, 05 Jun 2018 17:13:02 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1fQFW0-0007y3-DY for xen-devel@lists.xenproject.org; Tue, 05 Jun 2018 17:13:00 +0000 X-Inumbo-ID: 612f9577-68e3-11e8-9728-bc764e045a96 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTP id 612f9577-68e3-11e8-9728-bc764e045a96; Tue, 05 Jun 2018 19:10:43 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A230B1529; Tue, 5 Jun 2018 10:12:57 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.206.53]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B7D333F25D; Tue, 5 Jun 2018 10:12:56 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xenproject.org, xen-devel@lists.xen.org Date: Tue, 5 Jun 2018 18:12:36 +0100 Message-Id: <20180605171237.30601-7-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180605171237.30601-1-julien.grall@arm.com> References: <20180605171237.30601-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH 6/7] xen/libfdt: Put all libfdt in init X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Julien Grall , Stefano Stabellini MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Libfdt is used for: - Unflatten the Flatten Device-Tree (FDT) blob - Create Device-Tree for the Hardware-Domain Both use are done during the initialization of Xen. So move all the libfdt to init. Note that the runes was borrowed from libelf Makefile. Signed-off-by: Julien Grall Reviewed-by: Stefano Stabellini --- xen/common/libfdt/Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/xen/common/libfdt/Makefile b/xen/common/libfdt/Makefile index 7578fe9c50..d81f54b6b8 100644 --- a/xen/common/libfdt/Makefile +++ b/xen/common/libfdt/Makefile @@ -1,5 +1,13 @@ include Makefile.libfdt -obj-y += $(LIBFDT_OBJS) +SECTIONS := text data $(SPECIAL_DATA_SECTIONS) + +obj-y += libfdt.o CFLAGS += -I$(BASEDIR)/include/xen/libfdt/ + +libfdt.o: libfdt-temp.o Makefile + $(OBJCOPY) $(foreach s,$(SECTIONS),--rename-section .$(s)=.init.$(s)) $< $@ + +libfdt-temp.o: $(LIBFDT_OBJS) + $(LD) $(LDFLAGS) -r -o $@ $^