linker error: section __modver vma 0x6028c000 overlaps previous
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
Hi... On Wed, May 9, 2012 at 11:41 AM, <michi1@michaelblizek.twilightparadox.com> wrote:
/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
modver.... hmmm, raw guess, what happen if you turn off module versioning in kernel config? And, does this happen if you build standard (non UML) kernel? -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com
Hi! On 00:19 Thu 10 May , Mulyadi Santosa wrote:
Hi...
On Wed, May 9, 2012 at 11:41 AM, <michi1@michaelblizek.twilightparadox.com> wrote:
/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
modver.... hmmm, raw guess, what happen if you turn off module versioning in kernel config?
Module versioning was turned off. If I turn it on, the error disappears.
And, does this happen if you build standard (non UML) kernel?
I do not have a non-uml config ready for this kernel. "make oldconfig" asks for almost every option which exists. -Michi
Hi again... :) On Thu, May 10, 2012 at 1:49 AM, <michi1@michaelblizek.twilightparadox.com> wrote:
Hi!
On 00:19 Thu 10 May , Mulyadi Santosa wrote:
Hi...
On Wed, May 9, 2012 at 11:41 AM, <michi1@michaelblizek.twilightparadox.com> wrote:
/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
modver.... hmmm, raw guess, what happen if you turn off module versioning in kernel config?
Module versioning was turned off. If I turn it on, the error disappears.
Hm....not sure about you, but I find it weird. Anyway, are you sure you have done make mrproper or make clean before building the kernel? Just to make sure it starts from clean state.
And, does this happen if you build standard (non UML) kernel?
I do not have a non-uml config ready for this kernel. "make oldconfig" asks for almost every option which exists.
What if you just use make defconfig....then tweaking it a bit here and there using make menuconfig? That way, you don't have to answer bunch of questions... just my 2 cents idea.... -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com
Hi! On 11:53 Thu 10 May , Mulyadi Santosa wrote:
Hi again... :)
On Thu, May 10, 2012 at 1:49 AM, <michi1@michaelblizek.twilightparadox.com> wrote:
Hi!
On 00:19 Thu 10 May , Mulyadi Santosa wrote:
Hi...
On Wed, May 9, 2012 at 11:41 AM, <michi1@michaelblizek.twilightparadox.com> wrote:
/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
modver.... hmmm, raw guess, what happen if you turn off module versioning in kernel config?
Module versioning was turned off. If I turn it on, the error disappears.
Hm....not sure about you, but I find it weird.
Me, too.
Anyway, are you sure you have done make mrproper or make clean before building the kernel? Just to make sure it starts from clean state.
make clean/mrproper does not change anything.
And, does this happen if you build standard (non UML) kernel?
I do not have a non-uml config ready for this kernel. "make oldconfig" asks for almost every option which exists.
What if you just use make defconfig....then tweaking it a bit here and there using make menuconfig? That way, you don't have to answer bunch of questions... just my 2 cents idea....
I just tried narrowing it down. Doing either allnoconfig or allyesconfig, then setting the loadable module setting and enabling by code means that the error is gone, too. I will try to find out what it is... -Michi
Hi again :) On Thu, May 10, 2012 at 10:41 PM, <michi1@michaelblizek.twilightparadox.com> wrote:
Hi!
The bug seems fixed somewhere in mainline between 3.1.0-rc1 and 3.4-rc6.
Glad you can narrow the problem. Good luck then! :) -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com
participants (2)
-
michi1@michaelblizek.twilightparadox.com -
Mulyadi Santosa