linux-sg2042/mm
Alan Stern e0f39591cc [PATCH] Workaround for gcc 2.96 (undefined references)
LD      .tmp_vmlinux1
mm/built-in.o(.text+0x100d6): In function `copy_page_range':
: undefined reference to `__pud_alloc'
mm/built-in.o(.text+0x1010b): In function `copy_page_range':
: undefined reference to `__pmd_alloc'
mm/built-in.o(.text+0x11ef4): In function `__handle_mm_fault':
: undefined reference to `__pud_alloc'
fs/built-in.o(.text+0xc930): In function `install_arg_page':
: undefined reference to `__pud_alloc'
make: *** [.tmp_vmlinux1] Error 1

Those missing references in mm/memory.c arise from this code in
include/linux/mm.h, combined with the fact that __PGTABLE_PMD_FOLDED and
__PGTABLE_PUD_FOLDED are both set and __ARCH_HAS_4LEVEL_HACK is not:

/*
 * The following ifdef needed to get the 4level-fixup.h header to work.
 * Remove it when 4level-fixup.h has been removed.
 */
#if defined(CONFIG_MMU) && !defined(__ARCH_HAS_4LEVEL_HACK)
static inline pud_t *pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address)
{
        return (unlikely(pgd_none(*pgd)) && __pud_alloc(mm, pgd, address))?
                NULL: pud_offset(pgd, address);
}

static inline pmd_t *pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address)
{
        return (unlikely(pud_none(*pud)) && __pmd_alloc(mm, pud, address))?
                NULL: pmd_offset(pud, address);
}
#endif /* CONFIG_MMU && !__ARCH_HAS_4LEVEL_HACK */

With my configuration the pgd_none and pud_none routines are inlines
returning a constant 0.  Apparently the old compiler avoids generating
calls to __pud_alloc and __pmd_alloc but still lists them as undefined
references in the module's symbol table.

I don't know which change caused this problem.  I think it was added
somewhere between 2.6.14 and 2.6.15-rc1, because I remember building
several 2.6.14-rc kernels without difficulty.  However I can't point to an
individual culprit.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-28 14:42:22 -08:00
..
Kconfig [PATCH] mm: update split ptlock Kconfig 2005-11-23 16:08:38 -08:00
Makefile [PATCH] memory hotplug: sysfs and add/remove functions 2005-10-29 21:40:44 -07:00
bootmem.c [PATCH] core remove PageReserved 2005-10-29 21:40:39 -07:00
fadvise.c [PATCH] xip: madvice/fadvice: execute in place 2005-06-24 00:06:42 -07:00
filemap.c [PATCH] x86_64: Remove obsolete ARCH_HAS_ATOMIC_UNSIGNED and page_flags_t 2005-11-14 19:55:14 -08:00
filemap.h [PATCH] xip: reduce code duplication 2005-06-24 00:06:41 -07:00
filemap_xip.c [PATCH] mm: rmap with inner ptlock 2005-10-29 21:40:41 -07:00
fremap.c mm: re-architect the VM_UNPAGED logic 2005-11-28 14:34:23 -08:00
highmem.c [PATCH] gfp_t: the rest 2005-10-28 08:16:51 -07:00
hugetlb.c [PATCH] hugetlb: fix race in set_max_huge_pages for multiple updaters of nr_huge_pages 2005-11-22 09:13:43 -08:00
internal.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
madvise.c mm: re-architect the VM_UNPAGED logic 2005-11-28 14:34:23 -08:00
memory.c [PATCH] Workaround for gcc 2.96 (undefined references) 2005-11-28 14:42:22 -08:00
memory_hotplug.c [PATCH] memory hotplug: call setup_per_zone_pages_min after hotplug 2005-10-29 21:40:44 -07:00
mempolicy.c mm: re-architect the VM_UNPAGED logic 2005-11-28 14:34:23 -08:00
mempool.c [PATCH] gfp_t: mm/* (easy parts) 2005-10-28 08:16:47 -07:00
mincore.c [PATCH] freepgt: sys_mincore ignore FIRST_USER_PGD_NR 2005-04-19 13:29:20 -07:00
mlock.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
mmap.c [PATCH] unpaged: private write VM_RESERVED 2005-11-22 09:13:42 -08:00
mprotect.c [PATCH] unpaged: private write VM_RESERVED 2005-11-22 09:13:42 -08:00
mremap.c [PATCH] mm: split page table lock 2005-10-29 21:40:42 -07:00
msync.c mm: re-architect the VM_UNPAGED logic 2005-11-28 14:34:23 -08:00
nommu.c mm: re-architect the VM_UNPAGED logic 2005-11-28 14:34:23 -08:00
oom_kill.c [PATCH] gfp flags annotations - part 1 2005-10-08 15:00:57 -07:00
page-writeback.c [PATCH] re-export clear_page_dirty_for_io() 2005-11-18 07:49:45 -08:00
page_alloc.c [PATCH] unpaged: PG_reserved bad_page 2005-11-22 09:13:42 -08:00
page_io.c [PATCH] mm: split page table lock 2005-10-29 21:40:42 -07:00
pdflush.c [PATCH] cpusets: confine pdflush to its cpuset 2005-10-30 17:37:21 -08:00
prio_tree.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
readahead.c [PATCH] readahead commentary 2005-11-07 07:53:37 -08:00
rmap.c mm: re-architect the VM_UNPAGED logic 2005-11-28 14:34:23 -08:00
shmem.c [PATCH] mm: split page table lock 2005-10-29 21:40:42 -07:00
slab.c [PATCH] slab: remove alloc_pages() calls 2005-11-13 18:14:12 -08:00
sparse.c [PATCH] memory hotplug: move section_mem_map alloc to sparse.c 2005-10-29 21:40:44 -07:00
swap.c [PATCH] unpaged: unifdefed PageCompound 2005-11-22 09:13:42 -08:00
swap_state.c [PATCH] mm/swap_state.c: unexport swapper_space 2005-11-07 07:54:07 -08:00
swapfile.c [PATCH] mm/swapfile.c: unexport total_swap_pages 2005-11-07 07:54:07 -08:00
thrash.c [PATCH] swaptoken tuning 2005-10-29 21:40:35 -07:00
tiny-shmem.c [PATCH] Error checks omitted in init_tmpfs() in mm/tiny-shmem.c 2005-10-30 17:37:27 -08:00
truncate.c [PATCH] 32bit integer overflow in invalidate_inode_pages2() 2005-11-23 16:08:39 -08:00
vmalloc.c [PATCH] kernel-doc: fix warnings in vmalloc.c 2005-11-07 07:53:56 -08:00
vmscan.c [PATCH] mm: __alloc_pages cleanup 2005-11-13 18:14:12 -08:00