Linux-Modules Archive on lore.kernel.org
 help / Atom feed
* [PATCH] depmod: Don't add .TOC. when it's in the kernel.
@ 2017-12-07 14:31 Michal Suchanek
  2017-12-07 19:07 ` Lucas De Marchi
  0 siblings, 1 reply; 2+ messages in thread
From: Michal Suchanek @ 2017-12-07 14:31 UTC (permalink / raw)
  To: linux-modules; +Cc: Michal Suchanek

d46136bb59c4 ("depmod: Ignore PowerPC64 ABIv2 .TOC. symbol") adds fake
.TOC. unconditionally but when there is .TOC. in the kernel adding the
fake one breaks resolving .TOC.

Fixes: d46136bb59c4 ("depmod: Ignore PowerPC64 ABIv2 .TOC. symbol")

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
---
 tools/depmod.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/depmod.c b/tools/depmod.c
index 7ff3e9ed191e..9db602d76ee4 100644
--- a/tools/depmod.c
+++ b/tools/depmod.c
@@ -2480,7 +2480,8 @@ static void depmod_add_fake_syms(struct depmod *depmod)
 	/* On S390, this is faked up too */
 	depmod_symbol_add(depmod, "_GLOBAL_OFFSET_TABLE_", true, 0, NULL);
 	/* On PowerPC64 ABIv2, .TOC. is more or less _GLOBAL_OFFSET_TABLE_ */
-	depmod_symbol_add(depmod, "TOC.", true, 0, NULL);
+	if (!depmod_symbol_find(depmod, "TOC."))
+		depmod_symbol_add(depmod, "TOC.", true, 0, NULL);
 }
 
 static int depmod_load_symvers(struct depmod *depmod, const char *filename)
-- 
2.13.6


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] depmod: Don't add .TOC. when it's in the kernel.
  2017-12-07 14:31 [PATCH] depmod: Don't add .TOC. when it's in the kernel Michal Suchanek
@ 2017-12-07 19:07 ` Lucas De Marchi
  0 siblings, 0 replies; 2+ messages in thread
From: Lucas De Marchi @ 2017-12-07 19:07 UTC (permalink / raw)
  To: Michal Suchanek; +Cc: linux-modules

On Thu, Dec 7, 2017 at 6:31 AM, Michal Suchanek <msuchanek@suse.de> wrote:
> d46136bb59c4 ("depmod: Ignore PowerPC64 ABIv2 .TOC. symbol") adds fake
> .TOC. unconditionally but when there is .TOC. in the kernel adding the
> fake one breaks resolving .TOC.
>
> Fixes: d46136bb59c4 ("depmod: Ignore PowerPC64 ABIv2 .TOC. symbol")
>
> Signed-off-by: Michal Suchanek <msuchanek@suse.de>
> ---
>  tools/depmod.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tools/depmod.c b/tools/depmod.c
> index 7ff3e9ed191e..9db602d76ee4 100644
> --- a/tools/depmod.c
> +++ b/tools/depmod.c
> @@ -2480,7 +2480,8 @@ static void depmod_add_fake_syms(struct depmod *depmod)
>         /* On S390, this is faked up too */
>         depmod_symbol_add(depmod, "_GLOBAL_OFFSET_TABLE_", true, 0, NULL);
>         /* On PowerPC64 ABIv2, .TOC. is more or less _GLOBAL_OFFSET_TABLE_ */
> -       depmod_symbol_add(depmod, "TOC.", true, 0, NULL);
> +       if (!depmod_symbol_find(depmod, "TOC."))
> +               depmod_symbol_add(depmod, "TOC.", true, 0, NULL);
>  }
>
>  static int depmod_load_symvers(struct depmod *depmod, const char *filename)
> --

Applied, thanks.


Lucas De Marchi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-07 14:31 [PATCH] depmod: Don't add .TOC. when it's in the kernel Michal Suchanek
2017-12-07 19:07 ` Lucas De Marchi

Linux-Modules Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-modules/0 linux-modules/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-modules linux-modules/ https://lore.kernel.org/linux-modules \
		linux-modules@vger.kernel.org linux-modules@archiver.kernel.org
	public-inbox-index linux-modules


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-modules


AGPL code for this site: git clone https://public-inbox.org/ public-inbox