Received: by 10.223.176.46 with SMTP id f43csp1066947wra; Fri, 19 Jan 2018 06:28:46 -0800 (PST) X-Google-Smtp-Source: ACJfBovMmElFl7tLgPe2cOGc29aP9ikAMdGThGKSJW8e6udSNVJZ/NzQ5NAtj92EI/m1CtcuBXca X-Received: by 10.99.147.21 with SMTP id b21mr5654316pge.318.1516372126642; Fri, 19 Jan 2018 06:28:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516372126; cv=none; d=google.com; s=arc-20160816; b=jMZMumyajg+b23fxwy197+RjYeY2+97RPMKmQFtyA7Bcrlm/8zr9jHoo+oOximSMLW z9kpdJBVYSro/d297MNrpd/kin6byl6wCXFpTc80vHQ3b9wCMrV+0U9ix+K2B6hQa02b FcP/HkT1WtsAi7swxPwq/DWncEoeG9Mup7VJTK9oRvrND/80lV9HNry3gm2Vv0f4V8y0 e0UamcXz6t+udQ2X6DYYVO/aZd8On3DCFuRN0+GDUM8uf69prOwhseslZJ5C2yznnofD 6rd3EUEv2TnODrBC3E9M9lvnzVTBZa4Fc0QSPGo/mM+8yDQCNE06K2UZMrA6vwsuj4M2 VzkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=zt/no3UtSbgtBAutL6EPEMzlL21stLKQ5rcMXGbhnzI=; b=X9gpOdId23bMPQ27L2LBMxDv9gbzsMN+1MSq8FZFR8bSlBIWJTmTqOT2f3S3JzfxkL /UJ6Ti89I8QCctX997Has3fDY6TfBXGvpcJIKe9Zhd5xS7BXYQeuYV6P2QUIXu81nGrL NMZqJ6ANloJQKLnZPEI7ElOP2q8KhZqAsBaXn00JHLvdZ7SZ+iXwKCURdfenLkyC7zMb okYjGYp3Q4fsZQnGFvgulTfum4j6LoZRJv4ieRvhOBMREyXi8QYE9j+Dp0EEKRJXlErj IuJ1cUtNIzQMgJUqedPLDuP9LpFv1Nmelp5SQxZpfMR7A0wPiRPO1I6g6xaa6RtdF/ME SDxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VhO/cf0V; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3-v6si869859plz.69.2018.01.19.06.28.32; Fri, 19 Jan 2018 06:28:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VhO/cf0V; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755923AbeASO1q (ORCPT + 99 others); Fri, 19 Jan 2018 09:27:46 -0500 Received: from mail-vk0-f66.google.com ([209.85.213.66]:44092 "EHLO mail-vk0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755020AbeASO1i (ORCPT ); Fri, 19 Jan 2018 09:27:38 -0500 Received: by mail-vk0-f66.google.com with SMTP id q62so1018643vkb.11; Fri, 19 Jan 2018 06:27:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=zt/no3UtSbgtBAutL6EPEMzlL21stLKQ5rcMXGbhnzI=; b=VhO/cf0VxxBb3LX/FtNPozCpBBe9iV55+gcgo7IGWN87u5di9tQuceBsxydDRMJebN UGOWB+5q7laofYPdR4nMqtu+84HORgG8EQTcMuW657TWB6l3tYwFsrreGaNLAltfpZyb uXJNXAjS4QB4qCjkeG1O7DA6SEhdJpspK/8mPHponfLKEhvIXVhHZOjSUYB9OlWU6yeW zsARXtL7qjXTIx5/LLW+4JC+q1cD9tJ6fqW0MZMoqj7jyd1nQmbTx0JHDkEC55QuyTr1 n8xcJqk5JWOjJL896a3EbOfxgodcmBJRmfuNubCXdKo9X7merNZyeRaCTv+xiJDDTQV2 wWdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=zt/no3UtSbgtBAutL6EPEMzlL21stLKQ5rcMXGbhnzI=; b=duR3BlZulayC0LLH0sYHxC9u700DXHsLO5Ml6VgYesQWz/YRwGrRDySGhM/wWGM7Fu C0CAjLwS4AD7xbYTQMZx27hbsTpWu/trsCmDS806YK/oX+BwDXFjRwUAwhG6nXqj8umE JVhNLAMMJFWvUyGb79jH/OHx9FtLwaZuDCwRT5CmfQPrgFcg8eW4yU/lMlgZZWhYWz7r xwNFtiFFhn7icXkr97rkeYb0DMy/yUHwEsbqwyLJsY9u51DSK7kBym93yFO0itiGcrBw Y0p2DJtpCJYv3I1pz4cKfMDvqfI/3EleS7+0VArwcyWHjlxBm5B5PhGxQCrOEqYt9b7Z 7/oA== X-Gm-Message-State: AKwxyte50tM38bkQT/wqAwy7WOBcZxrktmw21ErDsNNnLuYqkkOKFhU4 oemBn9A/jHqdDhEWm4xQIYDggxXmAyE65S3WiaY= X-Received: by 10.31.242.204 with SMTP id q195mr6950578vkh.188.1516372057623; Fri, 19 Jan 2018 06:27:37 -0800 (PST) MIME-Version: 1.0 Received: by 10.159.42.194 with HTTP; Fri, 19 Jan 2018 06:26:57 -0800 (PST) In-Reply-To: References: <0a0789a3f776a5248ebc01706d502a3a9823cfac.1515766253.git.green.hu@gmail.com> From: Greentime Hu Date: Fri, 19 Jan 2018 22:26:57 +0800 Message-ID: Subject: Re: [PATCH v6 24/36] nds32: Loadable modules To: Arnd Bergmann Cc: Greentime , Linux Kernel Mailing List , linux-arch , Thomas Gleixner , Jason Cooper , Marc Zyngier , Rob Herring , Networking , Vincent Chen , DTML , Al Viro , David Howells , Will Deacon , Daniel Lezcano , linux-serial@vger.kernel.org, Geert Uytterhoeven , Linus Walleij , Mark Rutland , Greg KH , Guo Ren , Randy Dunlap , David Miller , Jonas Bonn , Stefan Kristiansson , Stafford Horne , Vincent Chen Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-01-18 18:41 GMT+08:00 Arnd Bergmann : > On Mon, Jan 15, 2018 at 6:53 AM, Greentime Hu wrote: >> From: Greentime Hu >> >> This patch adds support for loadable modules. > > One detail: > > You still seem to have both the ELF_REL and ELF_RELA based functions > implemented here, you should drop the unused ELF_REL version: > >> diff --git a/arch/nds32/kernel/module.c b/arch/nds32/kernel/module.c >> new file mode 100644 >> index 0000000..714a6d6 >> --- /dev/null >> +++ b/arch/nds32/kernel/module.c >> @@ -0,0 +1,286 @@ >> +// SPDX-License-Identifier: GPL-2.0 >> +// Copyright (C) 2005-2017 Andes Technology Corporation >> + >> +#include >> +#include >> +#include >> + >> +#include > > include to catch this. > >> +int >> +apply_relocate(Elf32_Shdr * sechdrs, const char *strtab, >> + unsigned int symindex, unsigned int relsec, >> + struct module *module) >> +{ >> + return 0; >> +} > > and drop this. > > With that change, > > Acked-by: Arnd Bergmann Hi, Arnd: Thank you. I will include moduleloader.h and drop apply_relocate().