All of lore.kernel.org
 help / color / mirror / Atom feed
From: michi1@michaelblizek.twilightparadox.com (michi1 at michaelblizek.twilightparadox.com)
To: kernelnewbies@lists.kernelnewbies.org
Subject: linker error: section __modver vma 0x6028c000 overlaps previous
Date: Wed, 9 May 2012 06:41:38 +0200	[thread overview]
Message-ID: <20120509044137.GA2208@grml> (raw)

Hi!

I am facing a weird problem:
$ ARCH=um make linux
make[1]: `arch/um/sys-x86_64/user-offsets.s' is up to date.
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  QUOTE   arch/um/kernel/config.tmp
  QUOTE   arch/um/kernel/config.c
  CC      arch/um/kernel/config.o
  LD      arch/um/kernel/built-in.o
  VDSOSYM arch/um/sys-x86_64/vdso/vdso-syms.lds
  LD      arch/um/sys-x86_64/vdso/built-in.o
  LD      arch/um/sys-x86_64/built-in.o
  CHK     kernel/config_data.h
  LD      vmlinux.o
  MODPOST vmlinux.o
  GEN     .version
  CHK     include/generated/compile.h
  UPD     include/generated/compile.h
  CC      init/version.o
  LD      init/built-in.o
  LD      .tmp_vmlinux1
  KSYM    .tmp_kallsyms1.S
  AS      .tmp_kallsyms1.o
  LD      .tmp_vmlinux2
/usr/bin/ld: .tmp_vmlinux2: section __modver vma 0x6028c000 overlaps previous sections
  KSYM    .tmp_kallsyms2.S
  AS      .tmp_kallsyms2.o
  LD      vmlinux
/usr/bin/ld: vmlinux: section __modver vma 0x6028c000 overlaps previous sections
  SYSMAP  System.map
  SYSMAP  .tmp_System.map
  LINK linux


This is triggered by changing files in my network protocol code for no
apparent reason. My code is at available at http://repo.or.cz/w/cor.git?a=tree

This change triggers it:

diff --git a/net/cor/credits.c b/net/cor/credits.c
index e0fb39a..776d197 100644
--- a/net/cor/credits.c
+++ b/net/cor/credits.c
@@ -556,7 +556,14 @@ void connreset_credits(struct conn *cn)
 {
 	unsigned long iflags;
 
-	__u32 unlockhints = credits_lock_conn(cn);
+	if (cn->is_client) {
+		spin_lock_bh(&(cn->rcv_lock));
+		spin_lock_bh(&(cn->reversedir->rcv_lock));
+	} else {
+		spin_lock_bh(&(cn->reversedir->rcv_lock));
+		spin_lock_bh(&(cn->rcv_lock));
+	}
+
 	if (cn->in_credit_list) {
 		spin_lock_irqsave(&credits_list_lock, iflags);
 		list_del(&(cn->credit_list));
@@ -582,13 +589,26 @@ void connreset_credits(struct conn *cn)
 				cn->crate_out, 0);
 		spin_unlock_irqrestore(&(nb->credits_lock), iflags);
 	}
-	credits_unlock_conn(cn, unlockhints);
+
+	if (cn->is_client) {
+		spin_unlock_bh(&(cn->rcv_lock));
+		spin_unlock_bh(&(cn->reversedir->rcv_lock));
+	} else {
+		spin_unlock_bh(&(cn->reversedir->rcv_lock));
+		spin_unlock_bh(&(cn->rcv_lock));
+	}
 }
 
 void set_conn_in_decaytime(struct neighbor *nb, __u32 conn_id,
 		struct conn *src_in, __u8 decaytime_seqno, __u16 decaytime)
 {
-	__u32 unlockhints = credits_lock_conn(src_in);
+	if (src_in->is_client) {
+		spin_lock_bh(&(src_in->rcv_lock));
+		spin_lock_bh(&(src_in->reversedir->rcv_lock));
+	} else {
+		spin_lock_bh(&(src_in->reversedir->rcv_lock));
+		spin_lock_bh(&(src_in->rcv_lock));
+	}
 
 	if (unlikely(is_conn_in(src_in, nb, conn_id) == 0))
 		goto out;
@@ -608,7 +628,13 @@ set:
 	refresh_conn_credits(src_in, 0, 1);
 
 out:
-	credits_unlock_conn(src_in, unlockhints);
+	if (src_in->is_client) {
+		spin_unlock_bh(&(src_in->rcv_lock));
+		spin_unlock_bh(&(src_in->reversedir->rcv_lock));
+	} else {
+		spin_unlock_bh(&(src_in->reversedir->rcv_lock));
+		spin_unlock_bh(&(src_in->rcv_lock));
+	}
 }
 
 static void background_refresh_credits(struct work_struct *work)


However, if only one instead of both credits_(un)lock_conn changes are made,
the error/warning is gone. By searching on the internet it looks like the
linker runs out of ressources, maybe because of certain properties of the
build environment. However, I did not find a solution yet. Any ideas?

My system is debian stable/squeeze.

	-Michi

             reply	other threads:[~2012-05-09  4:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-09  4:41 michi1 at michaelblizek.twilightparadox.com [this message]
2012-05-09 17:19 ` linker error: section __modver vma 0x6028c000 overlaps previous Mulyadi Santosa
2012-05-09 18:49   ` michi1 at michaelblizek.twilightparadox.com
2012-05-10  4:53     ` Mulyadi Santosa
2012-05-10  5:36       ` michi1 at michaelblizek.twilightparadox.com
2012-05-10 15:41         ` michi1 at michaelblizek.twilightparadox.com
2012-05-11 17:03           ` Mulyadi Santosa

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20120509044137.GA2208@grml \
    --to=michi1@michaelblizek.twilightparadox.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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.