Re: [2.6.37-rc1] Build failure: __divdi3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2010-11-06 at 01:48 +0900, Tetsuo Handa wrote:
> Hello.
> 
> Randy Dunlap wrote:
> > On Fri, 05 Nov 2010 17:59:42 +0900 Tetsuo Handa wrote:
> > 
> > > 
> > > WARNING: modpost: Found 5 section mismatch(es).
> > > To see full details build your kernel with:
> > > 'make CONFIG_DEBUG_SECTION_MISMATCH=y'
> > > fs/built-in.o(.text+0x3e357): In function `alignfile':
> > > : undefined reference to `__divdi3'
> > > fs/built-in.o(.text+0x3e39b): In function `alignfile':
> > > : undefined reference to `__divdi3'
> > > fs/built-in.o(.text+0x3f1af): In function `elf_core_dump':
> > > : undefined reference to `__divdi3'
> > > make: *** [.tmp_vmlinux1] Error 1
> > 
> > 
> > Hm, all due to usage of roundup() AFAICT.  Unfortunate.
> 
> Indeed. There is a commit for avoiding 64-bit division.
> 
>   commit ea7f1b6ee9dc96c5827b06ba21d7769d553efb7d
>   Author: Bjorn Helgaas <bjorn.helgaas@xxxxxx>
>   Date:   Thu Nov 5 11:17:11 2009 -0600
>   
>       x86/PCI: remove 64-bit division
>   
>       The roundup() caused a build error (undefined reference to `__udivdi3').
>       We're aligning to power-of-two boundaries, so it's simpler to just use
>       ALIGN() anyway, which avoids the division.
>   
>       Signed-off-by: Bjorn Helgaas <bjorn.helgaas@xxxxxx>
>       Acked-by: Randy Dunlap <randy.dunlap@xxxxxxxxxx>
>       Signed-off-by: Jesse Barnes <jbarnes@xxxxxxxxxxxxxxxx>
> 
> It seems that the code itself has not changed between 2.6.36 and 2.6.37-rc1
> 
>   static int elf_core_dump(struct coredump_params *cprm)
>   {
>   (...snipped...)
>   	loff_t offset = 0, dataoff, foffset;
>   (...snipped...)
>   	dataoff = offset = roundup(offset, ELF_EXEC_PAGESIZE);
> 
> but the definition of roundup() has changed by
> 
>   commit b28efd54d9d5c8005a29cd8782335beb9daaa32d
>   Author: Eric Paris <eparis@xxxxxxxxxx>
>   Date:   Wed Oct 13 17:50:08 2010 -0400
>   
>       kernel: roundup should only reference arguments once
>   
>       Currently the roundup macro references it's arguments more than one time.
>       This patch changes it so it will only use its arguments once.
>   
>       Suggested-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
>       Signed-off-by: Eric Paris <eparis@xxxxxxxxxx>
>       Signed-off-by: James Morris <jmorris@xxxxxxxxx>
> 
> between 2.6.36 and 2.6.37-rc1.

Interesting, is this a result of the compiler previously being able to
optimize the division since it could tell it was a power of 2 and now
that we have a private variable it can't?  The patch can easily be
reverted without breaking anyone else....

-Eric


--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux