From patchwork Mon Jun 12 14:59:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 103639 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp234008qgd; Mon, 12 Jun 2017 07:59:45 -0700 (PDT) X-Received: by 10.98.223.131 with SMTP id d3mr36077531pfl.112.1497279585616; Mon, 12 Jun 2017 07:59:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497279585; cv=none; d=google.com; s=arc-20160816; b=IJ4Zo5RXb4ABDyjEStzLEwSXwWS/YSTkSQ0mZXY0PJgDZu8i5LKPCshCKMZaR5S5+v IXrSYVvwV/O9OOhT0DSmOl0NMSXU4QiW0f859d1cS8sM0EALeIVNdaQKcEf1bpo3btiv Xagr0BqDmUg/uz1bLtGZOPD7qZBqmPrh06NDVIBav4uuFUed3L3TKraVJF7RaRkb/lrY S1WYsECFaZVIu+gqYKEJdcwJV6GKHpo68wVD+A8/lekRuNCfHIKWMr/uOwia5YuLydBn +Ww0CNyIWGXYTzPWPsdp6NGe3fQ+4wnfA+/hnrR6aD39JgR00y1okYeahqOCc9cQCAgR J1eA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=v8z1C3LJWE+9EO1ayaJt0jlS1jbynJh9oBEI+MvKUww=; b=rlxtTNSfLokls2uOiSbf1X+xtyowXqpwBV29F3FhDpvi/8V2Qqzxf2zaOvX3jz7vZ+ BqURmZAV8sDCCd83vqjnbiUyN5rTPID8zYBCfaqkrm5GbsiVQVY+6ZS2a6KIC9H/MbFd GGOuM6g26KNDwaAAbhvayrnv07hrb5ENyUB8zoPg2MtTb0TXrfNj0aUhnSnL9PqAR07H SqdcaBdbslQwoTIYYnxddKiBQWxC07vE8D9hT3YVH3//QAyqGhzI6E9P0WiUGVsaxv16 EbzjioJSgnJngBJ0rQDBe98U+Y+GAuYZb9y+XNaYAX/FS0srgW07rC8Ql/bU77qd5+bj uzPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id o6si13316604pgq.23.2017.06.12.07.59.45; Mon, 12 Jun 2017 07:59:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 18741782EE; Mon, 12 Jun 2017 14:59:26 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pf0-f194.google.com (mail-pf0-f194.google.com [209.85.192.194]) by mail.openembedded.org (Postfix) with ESMTP id 1BAAB782CC for ; Mon, 12 Jun 2017 14:59:22 +0000 (UTC) Received: by mail-pf0-f194.google.com with SMTP id d5so4440439pfe.1 for ; Mon, 12 Jun 2017 07:59:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=OWvhpOB5HIPl+OzYF+lskcP3LmD82Y2qhpxIw2RiyHs=; b=UEKckg2+VPFaNUA6XTk/3hVRT24c2iaZoQzxHTrQsv5CV8KIxag8D1aLw7S9+lM2S5 hrjLZOa7GepFkLNtO7mwjY9VZmdVggGED0cWTUGezmETT2LCXqyybRL+rLDEicqPbHSL bB6OZqbbwk8WQUcQ3PrlYXO0rO50q9tukGxRU0ui3E+dT2drpOcrV/THzSTPJ7AOrCov Lazfq4JgwcYkXo1a9V/WsbWq9n029+ny25oI0d2Fg5k4FIZ+tohtkEU1JfDzDCmjlWP8 xDtJKjurE2l8O411mL9LfUPhmiXIaQNlsAXXc+QLUpHc9Y5rCW/pqigQkIYDSIznIhJL YMNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=OWvhpOB5HIPl+OzYF+lskcP3LmD82Y2qhpxIw2RiyHs=; b=e12Bp0ecbnlfREiOLwOs29OilISwQvEiRPZNPlHO5MALuriolA1y713GBuuWl7xFYU Nha0npzGFqGU+FS1zdkj4Kuw8d5vxP12CuY+gnR6gJf9f1qTsq/ujhkgZ45ej9IJ1K8I FUWf8LBhmd9HJO9bVCof0EIIYuobJXf/eP5tFDFYCLPGIbMygjBbbYrDpVz2Z1b2XHuJ 1ILIAHn8TIs+PLGZdh2FWEI/Db584hospdYUOl7eoVMEj6XTteVNuC9ucxK8ZJNUg5ZN VzKsmhQCh0OgOIp9Cj3MvlAxxOWcx9ahLKsDZ05hiWKaQ60FTaiEGb8MrGzpjbHQmzJj zi2g== X-Gm-Message-State: AODbwcC9X4ntrKB+HkSzWDGqPhC+M9Pa6hvwEg3j5g46iZxh7c7MAd7B 5cFixce1T4wF4TLg X-Received: by 10.84.231.141 with SMTP id g13mr57001641plk.157.1497279563364; Mon, 12 Jun 2017 07:59:23 -0700 (PDT) Received: from localhost.localdomain ([2601:646:8882:b8c::264a]) by smtp.gmail.com with ESMTPSA id i17sm20554732pgn.60.2017.06.12.07.59.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Jun 2017 07:59:22 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Mon, 12 Jun 2017 07:59:06 -0700 Message-Id: <59ea0b6f571b51c8ee406236948eae3efeb2daad.1497279306.git.raj.khem@gmail.com> X-Mailer: git-send-email 2.13.1 In-Reply-To: References: Subject: [OE-core] [PATCH 6/7] kexec-tools: Pass -no-pie to linker X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org - This matches the linker flags to compiler flags in purgatory - Compile arm64 without PIC Signed-off-by: Khem Raj --- .../kexec-tools/0001-Disable-PIE-during-link.patch | 31 ++++++++++++++++++++++ .../kexec/kexec-tools/0001-arm64-Disable-PIC.patch | 31 ++++++++++++++++++++++ meta/recipes-kernel/kexec/kexec-tools_2.0.14.bb | 2 ++ 3 files changed, 64 insertions(+) create mode 100644 meta/recipes-kernel/kexec/kexec-tools/0001-Disable-PIE-during-link.patch create mode 100644 meta/recipes-kernel/kexec/kexec-tools/0001-arm64-Disable-PIC.patch -- 2.13.1 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-kernel/kexec/kexec-tools/0001-Disable-PIE-during-link.patch b/meta/recipes-kernel/kexec/kexec-tools/0001-Disable-PIE-during-link.patch new file mode 100644 index 0000000000..3f2f85e337 --- /dev/null +++ b/meta/recipes-kernel/kexec/kexec-tools/0001-Disable-PIE-during-link.patch @@ -0,0 +1,31 @@ +From ea7be6d71b85880e8e8a2c8a4f49a696c5f31ae4 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 10 Jun 2017 11:18:49 -0700 +Subject: [PATCH] Disable PIE during link + +We have explcitly disabled PIE during compile so we +just need to match it with linker flags + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + purgatory/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/purgatory/Makefile b/purgatory/Makefile +index 564bdb7..a08e41f 100644 +--- a/purgatory/Makefile ++++ b/purgatory/Makefile +@@ -59,7 +59,7 @@ $(PURGATORY): CPPFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS) \ + -Iinclude \ + -I$(shell $(CC) -print-file-name=include) + $(PURGATORY): LDFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS)\ +- -Wl,--no-undefined -nostartfiles -nostdlib \ ++ -Wl,--no-undefined -no-pie -nostartfiles -nostdlib \ + -nodefaultlibs -e purgatory_start -Wl,-r \ + -Wl,-Map=$(PURGATORY_MAP) + +-- +2.13.1 + diff --git a/meta/recipes-kernel/kexec/kexec-tools/0001-arm64-Disable-PIC.patch b/meta/recipes-kernel/kexec/kexec-tools/0001-arm64-Disable-PIC.patch new file mode 100644 index 0000000000..84e94d7d93 --- /dev/null +++ b/meta/recipes-kernel/kexec/kexec-tools/0001-arm64-Disable-PIC.patch @@ -0,0 +1,31 @@ +From 3bb73e5e5649b455e15d5ca3a7ad1a90c4960972 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 10 Jun 2017 11:54:36 -0700 +Subject: [PATCH] arm64: Disable PIC + +Fix +| cc1: sorry, unimplemented: code model 'large' with -fPIC +| make: *** [Makefile:118: purgatory/arch/arm64/entry.o] Error 1 + +Signed-off-by: Khem Raj +--- +Upstream-Status: Pending + + purgatory/arch/arm64/Makefile | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/purgatory/arch/arm64/Makefile b/purgatory/arch/arm64/Makefile +index 636abea..80068ca 100644 +--- a/purgatory/arch/arm64/Makefile ++++ b/purgatory/arch/arm64/Makefile +@@ -1,6 +1,7 @@ + + arm64_PURGATORY_EXTRA_CFLAGS = \ + -mcmodel=large \ ++ -fno-PIC \ + -fno-stack-protector \ + -fno-asynchronous-unwind-tables \ + -Wundef \ +-- +2.13.1 + diff --git a/meta/recipes-kernel/kexec/kexec-tools_2.0.14.bb b/meta/recipes-kernel/kexec/kexec-tools_2.0.14.bb index 90d5985801..4caca933c7 100644 --- a/meta/recipes-kernel/kexec/kexec-tools_2.0.14.bb +++ b/meta/recipes-kernel/kexec/kexec-tools_2.0.14.bb @@ -19,6 +19,8 @@ SRC_URI += "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.g file://0001-x86-x86_64-Fix-format-warning-with-die.patch \ file://0002-ppc-Fix-format-warning-with-die.patch \ file://kexec-x32.patch \ + file://0001-Disable-PIE-during-link.patch \ + file://0001-arm64-Disable-PIC.patch \ " SRC_URI[md5sum] = "b2b2c5e6b29d467d6e99d587fb6b7cf5"