All of
 help / color / mirror / Atom feed
From: Michal Suchanek <>
Cc: Michal Suchanek <>
Subject: [PATCH] depmod: Don't add .TOC. when it's in the kernel.
Date: Thu,  7 Dec 2017 15:31:19 +0100	[thread overview]
Message-ID: <> (raw)

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 <>
 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)

             reply	other threads:[~2017-12-07 14:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-07 14:31 Michal Suchanek [this message]
2017-12-07 19:07 ` [PATCH] depmod: Don't add .TOC. when it's in the kernel Lucas De Marchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.