# Having trouble w/gentoo-sources-2.6.31-r6  (mismatch)

## hanj

Hello All

Having trouble building the gentoo-sources-2.6.31-r6 kernel this morning. I had to `make` w/CONFIG_DEBUG_SECTION_MISMATCH=y to see the problem and this is what I got:

```
  LD      vmlinux.o

  MODPOST vmlinux.o

WARNING: vmlinux.o(.text+0x7196): Section mismatch in reference from the function setup_trampoline() to the variable .cpuinit.data:trampoline_end

The function setup_trampoline() references

the variable __cpuinitdata trampoline_end.

This is often because setup_trampoline lacks a __cpuinitdata

annotation or the annotation of trampoline_end is wrong.

WARNING: vmlinux.o(.text+0x719b): Section mismatch in reference from the function setup_trampoline() to the variable .cpuinit.data:trampoline_data

The function setup_trampoline() references

the variable __cpuinitdata trampoline_data.

This is often because setup_trampoline lacks a __cpuinitdata

annotation or the annotation of trampoline_data is wrong.

WARNING: vmlinux.o(.text+0x71b4): Section mismatch in reference from the function setup_trampoline() to the variable .cpuinit.data:trampoline_data

The function setup_trampoline() references

the variable __cpuinitdata trampoline_data.

This is often because setup_trampoline lacks a __cpuinitdata

annotation or the annotation of trampoline_data is wrong.

  GEN     .version

  CHK     include/linux/compile.h

  UPD     include/linux/compile.h

  CC      init/version.o

  LD      init/built-in.o

  LD      .tmp_vmlinux1

drivers/built-in.o: In function `con_init':

vt.c:(.init.text+0xfb4): undefined reference to `.L1436'

make: *** [.tmp_vmlinux1] Error 1
```

Reading the post here, makes it sound like it's a warning, but it sure appears to be bad error and is failing. Not sure what I need to do to get past this.

Searching the config, I see X86_TRAMPOLINE there

```
¦ Symbol: X86_TRAMPOLINE [=y]
```

I was unable to find that after `make menuconfig` though, and wanted to see if setting that to 'n' is a bad idea.

Here is my emerge --info output

```
Portage 2.1.6.13 (default/linux/x86/10.0/server, gcc-3.4.6, glibc-2.9_p20081201-r2, 2.6.30-gentoo-r5 i686)

=================================================================

System uname: Linux-2.6.30-gentoo-r5-i686-Pentium_III_-Katmai-with-gentoo-1.12.13

Timestamp of tree: Tue, 01 Dec 2009 09:30:01 +0000

distcc 3.1 i686-pc-linux-gnu [disabled]

app-shells/bash:     4.0_p28

dev-java/java-config: 1.3.7-r1, 2.1.9-r1

dev-lang/python:     2.5.4-r3, 2.6.2-r1

dev-python/pycrypto: 2.0.1-r8

sys-apps/baselayout: 1.12.13

sys-apps/sandbox:    1.6-r2

sys-devel/autoconf:  2.13, 2.63-r1

sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2

sys-devel/binutils:  2.18-r3

sys-devel/gcc-config: 1.4.1

sys-devel/libtool:   2.2.6a

virtual/os-headers:  2.6.27-r2

ACCEPT_KEYWORDS="x86"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-O2 -mcpu=pentium3 -pipe"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc /var/qmail/alias /var/qmail/control"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/udev/rules.d"

CXXFLAGS="-O2 -mcpu=pentium3 -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"

GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"

LDFLAGS="-Wl,-O1"

MAKEOPTS="-j4"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="acl apache2 berkdb bzip2 cli cracklib crypt directfb dri fortran gdbm gpm iconv java javascript maildir modules mudflap mysql ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline reflection session snmp spl ssl svga sysfs tcpd tiff unicode x86 xml xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="prefork" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

```

Thanks!

hanji

----------

## cach0rr0

howdy mate

the first errors you can indeed ignore

The relevant bit is this:

```

drivers/built-in.o: In function `con_init': 

vt.c:(.init.text+0xfb4): undefined reference to `.L1436' 

```

Which lead me to

http://lkml.org/lkml/2009/7/1/293

and more informative

http://patchwork.kernel.org/patch/56204/

Issue 2

What do you have selected under:

```

-> General setup

  │       -> RCU Subsystem 

  │         -> RCU Implementation (<choice> [=y])

```

Try changing this from "tree" to "preempt" if that's not how you have things currently, and see if that sorts it. Far as I can tell it's a kernel bug (upstream), but maybe this will get you around it. I run with preempt without issue.

----------

## hanj

 *cach0rr0 wrote:*   

> 
> 
> What do you have selected under:
> 
> ```
> ...

 

Hello There!

Thanks for the reply.

I have the following:

```
(X) Classic RCU

( ) Tree-based hierarchical RCU
```

No preempt option?

Thanks!

hanji

----------

## cach0rr0

this is fine

twas making a somewhat wild guess - weird though, on 2.6.31-r6 gentoo sources I have that

that was my only idea for getting around this, someone else will have to pick this up

EDIT: ah right, imagine it has something to do with me having this enabled:

```

Symbol: PREEMPT [=y]

  │ Prompt: Preemptible Kernel (Low-Latency Desktop)

  │   Defined at kernel/Kconfig.preempt:36

  │   Depends on: <choice>

  │   Location:

  │     -> Processor type and features

  │       -> Preemption Model (<choice> [=y])

```

I guess the other shot in the dark - switching over to another revision of GCC (one from the 4.x family if you have it on there) and seeing if you hit the same thing? It's just rubbing me like it may be a GCC issue based upon the error, can't put my finger on it.

----------

## rafo

Today when building a 2.6.31-r10 kernel I stumbled over pretty much the same problem (undefined reference in con_init).

Changing the RCU configuration to "classic" did not help. Switching the GCC version from 3.4.6 to 4.3.4 made the problem go away.

----------

## amwales

Hi People

Just joined the forum so I could share some info.

Building linux-2.6.33.2 with GCC 3.4.3 I also stumbled across the error

drivers/built-in.o(.init.text+0x3406): In function `con_init': vt.c: undefined reference to `.L1500'

after a quick search I found my way here.

It took a little over an hour to find the problem. grepping the sources

for .L1500 was fruitless. Building vt.c with -E provided no further clues, so

I compiled the vt.c file to assembler with the -S switch and found that the

code make a reference to a label .L1500 that does not exist.  Suspecting a 

GCC bug I recompiled vt.o WITHOUT -0s (Optimize for size) and was able 

to successfully link the kernel.

( I'm not using Gentoo but an old LFS build, and replacing the compiler 

seems like overkill )

Good Luck

----------

