linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG report] UML linux-2.6 latest BK doesn't compile
@ 2005-02-08 10:09 Anton Altaparmakov
  2005-02-08 10:22 ` Blaisorblade
  2005-02-08 18:29 ` Jeff Dike
  0 siblings, 2 replies; 17+ messages in thread
From: Anton Altaparmakov @ 2005-02-08 10:09 UTC (permalink / raw)
  To: Jeff Dike, Blaisorblade; +Cc: lkml

[-- Attachment #1: Type: text/plain, Size: 939 bytes --]

Hi,

With the current linux-2.6 BK tree I get this when trying to compile
UML:

  CC      init/version.o
  LD      init/built-in.o
  LD      .tmp_vmlinux1
arch/um/kernel/built-in.o(__ksymtab+0x2b0): In function `um_execve':
arch/um/kernel/exec_kern.c:59: undefined reference to `__bb_init_func'
collect2: ld returned 1 exit status
  KSYM    .tmp_kallsyms1.S
nm: '.tmp_vmlinux1': No such file
/bin/bash: line 1: 26161 Exit 1                  nm -n .tmp_vmlinux1
     26162 Segmentation fault      | scripts/kallsyms >.tmp_kallsyms1.S
make: *** [.tmp_kallsyms1.S] Error 139

This is with SKAS mode enabled and TT disabled.  My .config is attached.

Best regards,

        Anton
-- 
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net
WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/

[-- Attachment #2: uml.config --]
[-- Type: text/plain, Size: 11019 bytes --]

#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.11-rc3
# Tue Feb  8 09:53:02 2005
#
CONFIG_GENERIC_HARDIRQS=y
CONFIG_USERMODE=y
CONFIG_MMU=y
CONFIG_UID16=y
CONFIG_RWSEM_GENERIC_SPINLOCK=y
CONFIG_GENERIC_CALIBRATE_DELAY=y

#
# UML-specific options
#
# CONFIG_MODE_TT is not set
# CONFIG_STATIC_LINK is not set
CONFIG_MODE_SKAS=y
# CONFIG_64_BIT is not set
CONFIG_TOP_ADDR=0xc0000000
# CONFIG_3_LEVEL_PGTABLES is not set
CONFIG_ARCH_HAS_SC_SIGNALS=y
CONFIG_ARCH_REUSE_HOST_VSYSCALL_AREA=y
CONFIG_LD_SCRIPT_DYN=y
CONFIG_NET=y
CONFIG_BINFMT_ELF=y
CONFIG_BINFMT_MISC=y
CONFIG_HOSTFS=y
# CONFIG_HPPFS is not set
CONFIG_MCONSOLE=y
CONFIG_MAGIC_SYSRQ=y
# CONFIG_HOST_2G_2G is not set
CONFIG_NEST_LEVEL=0
CONFIG_KERNEL_HALF_GIGS=1
# CONFIG_HIGHMEM is not set
CONFIG_KERNEL_STACK_ORDER=2
CONFIG_UML_REAL_TIME_CLOCK=y

#
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
# CONFIG_CLEAN_COMPILE is not set
CONFIG_BROKEN=y
CONFIG_BROKEN_ON_SMP=y

#
# General setup
#
CONFIG_LOCALVERSION=""
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
# CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_SYSCTL=y
# CONFIG_AUDIT is not set
CONFIG_LOG_BUF_SHIFT=17
CONFIG_HOTPLUG=y
CONFIG_KOBJECT_UEVENT=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
# CONFIG_EMBEDDED is not set
CONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_ALL is not set
# CONFIG_KALLSYMS_EXTRA_PASS is not set
CONFIG_FUTEX=y
CONFIG_EPOLL=y
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
CONFIG_SHMEM=y
CONFIG_CC_ALIGN_FUNCTIONS=0
CONFIG_CC_ALIGN_LABELS=0
CONFIG_CC_ALIGN_LOOPS=0
CONFIG_CC_ALIGN_JUMPS=0
# CONFIG_TINY_SHMEM is not set

#
# Loadable module support
#
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y
CONFIG_OBSOLETE_MODPARM=y
# CONFIG_MODULE_SRCVERSION_ALL is not set
CONFIG_KMOD=y

#
# Generic Driver Options
#
# CONFIG_STANDALONE is not set
CONFIG_PREVENT_FIRMWARE_BUILD=y
# CONFIG_FW_LOADER is not set
# CONFIG_DEBUG_DRIVER is not set

#
# Character Devices
#
CONFIG_STDERR_CONSOLE=y
CONFIG_STDIO_CONSOLE=y
CONFIG_SSL=y
CONFIG_NULL_CHAN=y
CONFIG_PORT_CHAN=y
CONFIG_PTY_CHAN=y
CONFIG_TTY_CHAN=y
CONFIG_XTERM_CHAN=y
# CONFIG_NOCONFIG_CHAN is not set
CONFIG_CON_ZERO_CHAN="fd:0,fd:1"
CONFIG_CON_CHAN="xterm"
CONFIG_SSL_CHAN="pty"
CONFIG_UNIX98_PTYS=y
CONFIG_LEGACY_PTYS=y
CONFIG_LEGACY_PTY_COUNT=256
CONFIG_WATCHDOG=y
CONFIG_WATCHDOG_NOWAYOUT=y
CONFIG_SOFT_WATCHDOG=y
CONFIG_UML_WATCHDOG=y
# CONFIG_UML_SOUND is not set
# CONFIG_SOUND is not set
# CONFIG_HOSTAUDIO is not set

#
# Block devices
#
CONFIG_BLK_DEV_UBD=y
# CONFIG_BLK_DEV_UBD_SYNC is not set
CONFIG_BLK_DEV_COW_COMMON=y
# CONFIG_MMAPPER is not set
CONFIG_BLK_DEV_LOOP=y
# CONFIG_BLK_DEV_CRYPTOLOOP is not set
CONFIG_BLK_DEV_NBD=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=64000
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
# CONFIG_LBD is not set

#
# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y
# CONFIG_IOSCHED_DEADLINE is not set
# CONFIG_IOSCHED_CFQ is not set
# CONFIG_ATA_OVER_ETH is not set
CONFIG_NETDEVICES=y

#
# UML Network Devices
#
CONFIG_UML_NET=y
# CONFIG_UML_NET_ETHERTAP is not set
CONFIG_UML_NET_TUNTAP=y
# CONFIG_UML_NET_SLIP is not set
CONFIG_UML_NET_DAEMON=y
# CONFIG_UML_NET_MCAST is not set
# CONFIG_UML_NET_PCAP is not set
# CONFIG_UML_NET_SLIRP is not set

#
# Networking support
#

#
# Networking options
#
CONFIG_PACKET=y
CONFIG_PACKET_MMAP=y
CONFIG_NETLINK_DEV=y
CONFIG_UNIX=y
# CONFIG_NET_KEY is not set
CONFIG_INET=y
# CONFIG_IP_MULTICAST is not set
# CONFIG_IP_ADVANCED_ROUTER is not set
# CONFIG_IP_PNP is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_ARPD is not set
# CONFIG_SYN_COOKIES is not set
# CONFIG_INET_AH is not set
# CONFIG_INET_ESP is not set
# CONFIG_INET_IPCOMP is not set
# CONFIG_INET_TUNNEL is not set
CONFIG_IP_TCPDIAG=y
# CONFIG_IP_TCPDIAG_IPV6 is not set
# CONFIG_IPV6 is not set
# CONFIG_NETFILTER is not set

#
# SCTP Configuration (EXPERIMENTAL)
#
CONFIG_IP_SCTP=y
# CONFIG_SCTP_DBG_MSG is not set
# CONFIG_SCTP_DBG_OBJCNT is not set
# CONFIG_SCTP_HMAC_NONE is not set
# CONFIG_SCTP_HMAC_SHA1 is not set
CONFIG_SCTP_HMAC_MD5=y
# CONFIG_ATM is not set
# CONFIG_BRIDGE is not set
# CONFIG_VLAN_8021Q is not set
# CONFIG_DECNET is not set
# CONFIG_LLC2 is not set
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_NET_DIVERT is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set

#
# QoS and/or fair queueing
#
# CONFIG_NET_SCHED is not set
# CONFIG_NET_CLS_ROUTE is not set

#
# Network testing
#
# CONFIG_NET_PKTGEN is not set
CONFIG_NETPOLL=y
CONFIG_NETPOLL_RX=y
CONFIG_NETPOLL_TRAP=y
CONFIG_NET_POLL_CONTROLLER=y
# CONFIG_HAMRADIO is not set
# CONFIG_IRDA is not set
# CONFIG_BT is not set
CONFIG_DUMMY=y
# CONFIG_BONDING is not set
# CONFIG_EQUALIZER is not set
CONFIG_TUN=y
# CONFIG_ETHERTAP is not set

#
# Ethernet (10 or 100Mbit)
#
CONFIG_NET_ETHERNET=y
CONFIG_MII=y

#
# Ethernet (1000 Mbit)
#

#
# Ethernet (10000 Mbit)
#

#
# Token Ring devices
#

#
# Wireless LAN (non-hamradio)
#
# CONFIG_NET_RADIO is not set

#
# PCMCIA network device support
#
# CONFIG_NET_PCMCIA is not set

#
# Wan interfaces
#
# CONFIG_WAN is not set
CONFIG_PPP=y
# CONFIG_PPP_MULTILINK is not set
CONFIG_PPP_FILTER=y
CONFIG_PPP_ASYNC=y
CONFIG_PPP_SYNC_TTY=y
CONFIG_PPP_DEFLATE=y
CONFIG_PPP_BSDCOMP=y
CONFIG_PPPOE=y
# CONFIG_SLIP is not set
# CONFIG_SHAPER is not set
CONFIG_NETCONSOLE=y

#
# File systems
#
# CONFIG_EXT2_FS is not set
CONFIG_EXT3_FS=y
CONFIG_EXT3_FS_XATTR=y
CONFIG_EXT3_FS_POSIX_ACL=y
CONFIG_EXT3_FS_SECURITY=y
CONFIG_JBD=y
# CONFIG_JBD_DEBUG is not set
CONFIG_FS_MBCACHE=y
# CONFIG_REISERFS_FS is not set
# CONFIG_JFS_FS is not set
CONFIG_FS_POSIX_ACL=y

#
# XFS support
#
# CONFIG_XFS_FS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_ROMFS_FS is not set
CONFIG_QUOTA=y
# CONFIG_QFMT_V1 is not set
CONFIG_QFMT_V2=y
CONFIG_QUOTACTL=y
CONFIG_DNOTIFY=y
# CONFIG_AUTOFS_FS is not set
CONFIG_AUTOFS4_FS=y

#
# CD-ROM/DVD Filesystems
#
CONFIG_ISO9660_FS=y
CONFIG_JOLIET=y
CONFIG_ZISOFS=y
CONFIG_ZISOFS_FS=y
CONFIG_UDF_FS=y
CONFIG_UDF_NLS=y

#
# DOS/FAT/NT Filesystems
#
CONFIG_FAT_FS=y
CONFIG_MSDOS_FS=y
CONFIG_VFAT_FS=y
CONFIG_FAT_DEFAULT_CODEPAGE=437
CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-15"
CONFIG_NTFS_FS=m
CONFIG_NTFS_DEBUG=y
CONFIG_NTFS_RW=y

#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_PROC_KCORE=y
CONFIG_SYSFS=y
# CONFIG_DEVFS_FS is not set
CONFIG_DEVPTS_FS_XATTR=y
CONFIG_DEVPTS_FS_SECURITY=y
CONFIG_TMPFS=y
CONFIG_TMPFS_XATTR=y
CONFIG_TMPFS_SECURITY=y
# CONFIG_HUGETLBFS is not set
# CONFIG_HUGETLB_PAGE is not set
CONFIG_RAMFS=y

#
# Miscellaneous filesystems
#
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_HFSPLUS_FS is not set
# CONFIG_BEFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_EFS_FS is not set
# CONFIG_CRAMFS is not set
# CONFIG_VXFS_FS is not set
# CONFIG_HPFS_FS is not set
# CONFIG_QNX4FS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set

#
# Network File Systems
#
CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
CONFIG_NFS_V4=y
CONFIG_NFS_DIRECTIO=y
CONFIG_NFSD=y
CONFIG_NFSD_V3=y
CONFIG_NFSD_V4=y
CONFIG_NFSD_TCP=y
CONFIG_LOCKD=y
CONFIG_LOCKD_V4=y
CONFIG_EXPORTFS=y
CONFIG_SUNRPC=y
CONFIG_SUNRPC_GSS=y
CONFIG_RPCSEC_GSS_KRB5=y
# CONFIG_RPCSEC_GSS_SPKM3 is not set
# CONFIG_SMB_FS is not set
# CONFIG_CIFS is not set
CONFIG_NCP_FS=y
CONFIG_NCPFS_PACKET_SIGNING=y
CONFIG_NCPFS_IOCTL_LOCKING=y
CONFIG_NCPFS_STRONG=y
CONFIG_NCPFS_NFS_NS=y
CONFIG_NCPFS_OS2_NS=y
CONFIG_NCPFS_SMALLDOS=y
CONFIG_NCPFS_NLS=y
CONFIG_NCPFS_EXTRAS=y
# CONFIG_CODA_FS is not set
# CONFIG_AFS_FS is not set

#
# Partition Types
#
CONFIG_PARTITION_ADVANCED=y
# CONFIG_ACORN_PARTITION is not set
# CONFIG_OSF_PARTITION is not set
# CONFIG_AMIGA_PARTITION is not set
# CONFIG_ATARI_PARTITION is not set
# CONFIG_MAC_PARTITION is not set
CONFIG_MSDOS_PARTITION=y
# CONFIG_BSD_DISKLABEL is not set
# CONFIG_MINIX_SUBPARTITION is not set
# CONFIG_SOLARIS_X86_PARTITION is not set
# CONFIG_UNIXWARE_DISKLABEL is not set
# CONFIG_LDM_PARTITION is not set
# CONFIG_SGI_PARTITION is not set
# CONFIG_ULTRIX_PARTITION is not set
# CONFIG_SUN_PARTITION is not set
# CONFIG_EFI_PARTITION is not set

#
# Native Language Support
#
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="utf8"
CONFIG_NLS_CODEPAGE_437=y
# CONFIG_NLS_CODEPAGE_737 is not set
# CONFIG_NLS_CODEPAGE_775 is not set
CONFIG_NLS_CODEPAGE_850=y
# CONFIG_NLS_CODEPAGE_852 is not set
CONFIG_NLS_CODEPAGE_855=y
# CONFIG_NLS_CODEPAGE_857 is not set
# CONFIG_NLS_CODEPAGE_860 is not set
# CONFIG_NLS_CODEPAGE_861 is not set
# CONFIG_NLS_CODEPAGE_862 is not set
# CONFIG_NLS_CODEPAGE_863 is not set
# CONFIG_NLS_CODEPAGE_864 is not set
# CONFIG_NLS_CODEPAGE_865 is not set
CONFIG_NLS_CODEPAGE_866=y
# CONFIG_NLS_CODEPAGE_869 is not set
# CONFIG_NLS_CODEPAGE_936 is not set
# CONFIG_NLS_CODEPAGE_950 is not set
# CONFIG_NLS_CODEPAGE_932 is not set
# CONFIG_NLS_CODEPAGE_949 is not set
# CONFIG_NLS_CODEPAGE_874 is not set
# CONFIG_NLS_ISO8859_8 is not set
CONFIG_NLS_CODEPAGE_1250=y
CONFIG_NLS_CODEPAGE_1251=y
CONFIG_NLS_ASCII=y
CONFIG_NLS_ISO8859_1=y
CONFIG_NLS_ISO8859_2=y
# CONFIG_NLS_ISO8859_3 is not set
# CONFIG_NLS_ISO8859_4 is not set
CONFIG_NLS_ISO8859_5=y
# CONFIG_NLS_ISO8859_6 is not set
# CONFIG_NLS_ISO8859_7 is not set
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_ISO8859_13 is not set
# CONFIG_NLS_ISO8859_14 is not set
CONFIG_NLS_ISO8859_15=y
CONFIG_NLS_KOI8_R=y
CONFIG_NLS_KOI8_U=y
CONFIG_NLS_UTF8=y

#
# Security options
#
# CONFIG_KEYS is not set
# CONFIG_SECURITY is not set

#
# Cryptographic options
#
CONFIG_CRYPTO=y
CONFIG_CRYPTO_HMAC=y
CONFIG_CRYPTO_NULL=y
CONFIG_CRYPTO_MD4=y
CONFIG_CRYPTO_MD5=y
CONFIG_CRYPTO_SHA1=y
CONFIG_CRYPTO_SHA256=y
CONFIG_CRYPTO_SHA512=y
CONFIG_CRYPTO_WP512=y
CONFIG_CRYPTO_DES=y
CONFIG_CRYPTO_BLOWFISH=y
CONFIG_CRYPTO_TWOFISH=y
CONFIG_CRYPTO_SERPENT=y
CONFIG_CRYPTO_AES=y
CONFIG_CRYPTO_CAST5=y
CONFIG_CRYPTO_CAST6=y
CONFIG_CRYPTO_TEA=y
CONFIG_CRYPTO_ARC4=y
CONFIG_CRYPTO_KHAZAD=y
CONFIG_CRYPTO_ANUBIS=y
CONFIG_CRYPTO_DEFLATE=y
CONFIG_CRYPTO_MICHAEL_MIC=y
CONFIG_CRYPTO_CRC32C=y
# CONFIG_CRYPTO_TEST is not set

#
# Hardware crypto devices
#

#
# Library routines
#
CONFIG_CRC_CCITT=y
CONFIG_CRC32=y
CONFIG_LIBCRC32C=y
CONFIG_ZLIB_INFLATE=y
CONFIG_ZLIB_DEFLATE=y

#
# SCSI support
#
# CONFIG_SCSI is not set

#
# Multi-device support (RAID and LVM)
#
CONFIG_MD=y
CONFIG_BLK_DEV_MD=y
CONFIG_MD_LINEAR=y
CONFIG_MD_RAID0=y
CONFIG_MD_RAID1=y
CONFIG_MD_RAID10=y
CONFIG_MD_RAID5=y
CONFIG_MD_RAID6=y
CONFIG_MD_MULTIPATH=y
CONFIG_MD_FAULTY=y
CONFIG_BLK_DEV_DM=y
CONFIG_DM_CRYPT=y
CONFIG_DM_SNAPSHOT=y
CONFIG_DM_MIRROR=y
CONFIG_DM_ZERO=y

#
# Memory Technology Devices (MTD)
#
# CONFIG_MTD is not set
# CONFIG_INPUT is not set

#
# Kernel hacking
#
CONFIG_DEBUG_KERNEL=y
# CONFIG_SCHEDSTATS is not set
CONFIG_DEBUG_SLAB=y
CONFIG_DEBUG_SPINLOCK=y
CONFIG_DEBUG_SPINLOCK_SLEEP=y
# CONFIG_DEBUG_KOBJECT is not set
CONFIG_DEBUG_INFO=y
CONFIG_DEBUG_FS=y
CONFIG_FRAME_POINTER=y
CONFIG_PT_PROXY=y
CONFIG_GPROF=y
CONFIG_GCOV=y

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [BUG report] UML linux-2.6 latest BK doesn't compile
  2005-02-08 10:09 [BUG report] UML linux-2.6 latest BK doesn't compile Anton Altaparmakov
@ 2005-02-08 10:22 ` Blaisorblade
  2005-02-08 10:40   ` Anton Altaparmakov
  2005-02-08 18:29 ` Jeff Dike
  1 sibling, 1 reply; 17+ messages in thread
From: Blaisorblade @ 2005-02-08 10:22 UTC (permalink / raw)
  To: Anton Altaparmakov; +Cc: Jeff Dike, lkml, user-mode-linux-devel

On Tuesday 08 February 2005 11:09, Anton Altaparmakov wrote:
> Hi,
>
> With the current linux-2.6 BK tree I get this when trying to compile
> UML:
>
>   CC      init/version.o
>   LD      init/built-in.o
>   LD      .tmp_vmlinux1
> arch/um/kernel/built-in.o(__ksymtab+0x2b0): In function `um_execve':
> arch/um/kernel/exec_kern.c:59: undefined reference to `__bb_init_func'
> collect2: ld returned 1 exit status
>   KSYM    .tmp_kallsyms1.S
> nm: '.tmp_vmlinux1': No such file
> /bin/bash: line 1: 26161 Exit 1                  nm -n .tmp_vmlinux1
>      26162 Segmentation fault      | scripts/kallsyms >.tmp_kallsyms1.S
> make: *** [.tmp_kallsyms1.S] Error 139
>
> This is with SKAS mode enabled and TT disabled.  My .config is attached.

Hmm - I do not understand at all where `__bb_init_func' comes from (not from 
UML by sure, only from kernel headers possibly). And from preprocessing the 
source (of the -bk4 snapshot), nothing similar comes out.

long um_execve(char *file, char * *argv, char * *env)
{
 long err;

 err = execve1(file, argv, env);
 if(!err)
  do_longjmp((current_thread_info()->task)->thread.exec_buf, 1);
 return(err);
}

make arch/um/kernel/exec_kern.i ARCH=um

grep bb_init arch/um/kernel/exec_kern.i
gives nothing (tested with your config, too).

Try adding a "#undef execve1" before the problematic line, and reporting (here 
I don't get the failure).
-- 
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729
http://www.user-mode-linux.org/~blaisorblade


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [BUG report] UML linux-2.6 latest BK doesn't compile
  2005-02-08 10:22 ` Blaisorblade
@ 2005-02-08 10:40   ` Anton Altaparmakov
  2005-02-08 17:48     ` [uml-devel] " Blaisorblade
  0 siblings, 1 reply; 17+ messages in thread
From: Anton Altaparmakov @ 2005-02-08 10:40 UTC (permalink / raw)
  To: Blaisorblade; +Cc: Jeff Dike, lkml, user-mode-linux-devel

On Tue, 2005-02-08 at 11:22 +0100, Blaisorblade wrote:
> On Tuesday 08 February 2005 11:09, Anton Altaparmakov wrote:
> > Hi,
> >
> > With the current linux-2.6 BK tree I get this when trying to compile
> > UML:
> >
> >   CC      init/version.o
> >   LD      init/built-in.o
> >   LD      .tmp_vmlinux1
> > arch/um/kernel/built-in.o(__ksymtab+0x2b0): In function `um_execve':
> > arch/um/kernel/exec_kern.c:59: undefined reference to `__bb_init_func'
> > collect2: ld returned 1 exit status
> >   KSYM    .tmp_kallsyms1.S
> > nm: '.tmp_vmlinux1': No such file
> > /bin/bash: line 1: 26161 Exit 1                  nm -n .tmp_vmlinux1
> >      26162 Segmentation fault      | scripts/kallsyms >.tmp_kallsyms1.S
> > make: *** [.tmp_kallsyms1.S] Error 139
> >
> > This is with SKAS mode enabled and TT disabled.  My .config is attached.
> 
> Hmm - I do not understand at all where `__bb_init_func' comes from (not from 
> UML by sure, only from kernel headers possibly). And from preprocessing the 
> source (of the -bk4 snapshot), nothing similar comes out.

It is from UML.  'bk -r grep __bb_init_func' gives:

arch/um/kernel/gmon_syms.c      1.1     extern void __bb_init_func(void
*);
arch/um/kernel/gmon_syms.c      1.1     EXPORT_SYMBOL(__bb_init_func);

The kernel compiles fine with the same .config but TT mode also enabled.

So I suspect that in the non-TT case the gmon_syms binary doesn't get
linked into the kernel so the symbol is missing or something like
that...

Also note I am using the latest BK as pulled about an hour ago.  I don't
know how old the snapshot you are using is in comparison.  Lots of UML
changes were pulled in by my pull...

Best regards,

        Anton
-- 
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net
WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [BUG report] UML linux-2.6 latest BK doesn't compile
  2005-02-08 18:29 ` Jeff Dike
@ 2005-02-08 17:37   ` Blaisorblade
  2005-02-08 22:22     ` Jeff Dike
  0 siblings, 1 reply; 17+ messages in thread
From: Blaisorblade @ 2005-02-08 17:37 UTC (permalink / raw)
  To: Anton Altaparmakov, Jeff Dike; +Cc: lkml, user-mode-linux-devel

On Tuesday 08 February 2005 19:29, Jeff Dike wrote:
> aia21@cam.ac.uk said:
> > arch/um/kernel/exec_kern.c:59: undefined reference to `__bb_init_func'
>
> The __bb_init_func export is to allow modules to be built with a
> gcov-enabled UML.  I get a bunch of undefines in the module links when I
> get rid of it.
>
> This is probably being too intimate with libc, and yours probably doesn't
> have __bb_init_func.
>
> Try the patch below and see if it helps.  Modules won't work, but you
> should get a working UML.

Why not simply disable CONFIG_GCOV for him, in this case?

Sorry for my previous answer, I was misleaded by the error message (which 
*does not* make sense). And it's the first time anybody sees a such error 
message, in my experience, so please post more details about your glibc (and 
whether gcov is installed).
-- 
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729
http://www.user-mode-linux.org/~blaisorblade


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [uml-devel] Re: [BUG report] UML linux-2.6 latest BK doesn't compile
  2005-02-08 10:40   ` Anton Altaparmakov
@ 2005-02-08 17:48     ` Blaisorblade
  2005-02-08 22:21       ` Jeff Dike
  0 siblings, 1 reply; 17+ messages in thread
From: Blaisorblade @ 2005-02-08 17:48 UTC (permalink / raw)
  To: user-mode-linux-devel; +Cc: Anton Altaparmakov, Jeff Dike, lkml

On Tuesday 08 February 2005 11:40, Anton Altaparmakov wrote:
> On Tue, 2005-02-08 at 11:22 +0100, Blaisorblade wrote:
> > On Tuesday 08 February 2005 11:09, Anton Altaparmakov wrote:
> > > Hi,
> > >
> > > With the current linux-2.6 BK tree I get this when trying to compile
> > > UML:
> > >
> > >   CC      init/version.o
> > >   LD      init/built-in.o
> > >   LD      .tmp_vmlinux1
> > > arch/um/kernel/built-in.o(__ksymtab+0x2b0): In function `um_execve':
> > > arch/um/kernel/exec_kern.c:59: undefined reference to `__bb_init_func'
> > > collect2: ld returned 1 exit status
> > >   KSYM    .tmp_kallsyms1.S
> > > nm: '.tmp_vmlinux1': No such file
> > > /bin/bash: line 1: 26161 Exit 1                  nm -n .tmp_vmlinux1
> > >      26162 Segmentation fault      | scripts/kallsyms >.tmp_kallsyms1.S
> > > make: *** [.tmp_kallsyms1.S] Error 139
> > >
> > > This is with SKAS mode enabled and TT disabled.  My .config is
> > > attached.
> >
> > Hmm - I do not understand at all where `__bb_init_func' comes from (not
> > from UML by sure, only from kernel headers possibly). And from
> > preprocessing the source (of the -bk4 snapshot), nothing similar comes
> > out.
>
> It is from UML.  'bk -r grep __bb_init_func' gives:
>
> arch/um/kernel/gmon_syms.c      1.1     extern void __bb_init_func(void
> *);
> arch/um/kernel/gmon_syms.c      1.1     EXPORT_SYMBOL(__bb_init_func);
>
> The kernel compiles fine with the same .config but TT mode also enabled.

> So I suspect that in the non-TT case the gmon_syms binary
> linked into the kernel
I think it *is* still linked.
> so the symbol is missing or something like 
> that...
Hmm, the difference is likely in the build commands:

1) Simply because the build is dynamic in the non-TT mode case (no idea)
2) bug in Makefiles.... but I didn't see anything strange:

arch/um/Makefile-skas (included only when SKAS mode is enabled):

PROFILE += -pg

CFLAGS-$(CONFIG_GCOV) += -fprofile-arcs -ftest-coverage
CFLAGS-$(CONFIG_GPROF) += $(PROFILE)
LINK-$(CONFIG_GPROF) += $(PROFILE)

the Makefiles were heavily changed, however, recently (after 2.6.10).
> Also note I am using the latest BK as pulled about an hour ago.  I don't
> know how old the snapshot you are using is in comparison.
Last daily snapshot, when I posted. (Now we are at -bk5). However I only built 
the file on which you saw the warning, not everything.
> Lots of UML 
> changes were pulled in by my pull...

-- 
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729
http://www.user-mode-linux.org/~blaisorblade


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [BUG report] UML linux-2.6 latest BK doesn't compile
  2005-02-08 10:09 [BUG report] UML linux-2.6 latest BK doesn't compile Anton Altaparmakov
  2005-02-08 10:22 ` Blaisorblade
@ 2005-02-08 18:29 ` Jeff Dike
  2005-02-08 17:37   ` Blaisorblade
  1 sibling, 1 reply; 17+ messages in thread
From: Jeff Dike @ 2005-02-08 18:29 UTC (permalink / raw)
  To: Anton Altaparmakov; +Cc: Blaisorblade, lkml

aia21@cam.ac.uk said:
> arch/um/kernel/exec_kern.c:59: undefined reference to `__bb_init_func'

The __bb_init_func export is to allow modules to be built with a gcov-enabled
UML.  I get a bunch of undefines in the module links when I get rid of it.

This is probably being too intimate with libc, and yours probably doesn't have
__bb_init_func.

Try the patch below and see if it helps.  Modules won't work, but you should
get a working UML.

				Jeff
Index: 2.6.10/arch/um/kernel/Makefile
===================================================================
--- 2.6.10.orig/arch/um/kernel/Makefile	2005-02-07 12:45:56.000000000 -0500
+++ 2.6.10/arch/um/kernel/Makefile	2005-02-08 10:23:31.000000000 -0500
@@ -15,7 +15,6 @@
 
 obj-$(CONFIG_BLK_DEV_INITRD) += initrd.o
 obj-$(CONFIG_GPROF)	+= gprof_syms.o
-obj-$(CONFIG_GCOV)	+= gmon_syms.o
 obj-$(CONFIG_TTY_LOG)	+= tty_log.o
 obj-$(CONFIG_SYSCALL_DEBUG) += syscall_user.o
 
Index: 2.6.10/arch/um/kernel/gmon_syms.c
===================================================================
--- 2.6.10.orig/arch/um/kernel/gmon_syms.c	2004-12-24 16:35:39.000000000 -0500
+++ 2.6.10/arch/um/kernel/gmon_syms.c	2003-09-15 09:40:47.000000000 -0400
@@ -1,20 +0,0 @@
-/* 
- * Copyright (C) 2001, 2002 Jeff Dike (jdike@karaya.com)
- * Licensed under the GPL
- */
-
-#include "linux/module.h"
-
-extern void __bb_init_func(void *);
-EXPORT_SYMBOL(__bb_init_func);
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [uml-devel] Re: [BUG report] UML linux-2.6 latest BK doesn't compile
  2005-02-08 17:48     ` [uml-devel] " Blaisorblade
@ 2005-02-08 22:21       ` Jeff Dike
  0 siblings, 0 replies; 17+ messages in thread
From: Jeff Dike @ 2005-02-08 22:21 UTC (permalink / raw)
  To: Blaisorblade; +Cc: user-mode-linux-devel, Anton Altaparmakov, lkml

blaisorblade@yahoo.it said:
> the Makefiles were heavily changed, however, recently (after 2.6.10). 

There was a bug in that patch.  The fix is:

Index: 2.6.10/arch/um/Makefile
===================================================================
--- 2.6.10.orig/arch/um/Makefile        2005-02-08 12:33:23.000000000 -0500
+++ 2.6.10/arch/um/Makefile     2005-02-08 12:33:23.000000000 -0500
@@ -36,8 +36,8 @@
 MAKEFILES-INCL += $(foreach mode,$(um-modes-y),\
                   $(srctree)/$(ARCH_DIR)/Makefile-$(mode))
 
-ifneq ($(MAKEFILE-INCL),)
-  include $(MAKEFILE-INCL)
+ifneq ($(MAKEFILES-INCL),)
+  include $(MAKEFILES-INCL)
 endif
 
 ARCH_INCLUDE   := -I$(ARCH_DIR)/include

				Jeff


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [BUG report] UML linux-2.6 latest BK doesn't compile
  2005-02-08 17:37   ` Blaisorblade
@ 2005-02-08 22:22     ` Jeff Dike
  2005-02-14 11:35       ` Partial fix! - Was: " Anton Altaparmakov
  0 siblings, 1 reply; 17+ messages in thread
From: Jeff Dike @ 2005-02-08 22:22 UTC (permalink / raw)
  To: Blaisorblade; +Cc: Anton Altaparmakov, lkml, user-mode-linux-devel

blaisorblade@yahoo.it said:
> Why not simply disable CONFIG_GCOV for him, in this case? 

Anton presumably turned on CONFIG_GCOV because he wanted to do some profiling...

				Jeff


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Partial fix! - Was: Re: [BUG report] UML linux-2.6 latest BK doesn't compile
  2005-02-08 22:22     ` Jeff Dike
@ 2005-02-14 11:35       ` Anton Altaparmakov
  2005-02-16 18:27         ` [uml-devel] " Blaisorblade
  2005-03-05 19:45         ` Jeff Dike
  0 siblings, 2 replies; 17+ messages in thread
From: Anton Altaparmakov @ 2005-02-14 11:35 UTC (permalink / raw)
  To: Jeff Dike; +Cc: Blaisorblade, lkml, user-mode-linux-devel

On Tue, 2005-02-08 at 17:22 -0500, Jeff Dike wrote:
> blaisorblade@yahoo.it said:
> > Why not simply disable CONFIG_GCOV for him, in this case? 
> 
> Anton presumably turned on CONFIG_GCOV because he wanted to do some profiling...

Yes.  I finally found a way to get it to compile.  Compiling without TT
mode and WITHOUT static build it still fails with the same problem
(__bb_init_func problem I already reported).  But compiling without TT
but WITH static build the __bb_init_func problem goes away but instead I
get a __gcov_init missing symbol in my modules.

Note I have gcc-3.3.4-11 (SuSE 9.2) and it defines __gcov_init.  So I
added this as an export symbol and lo and behold the kernel and modules
compiled and I am now up an running with UML and NTFS as a module.  (-:

Here is the patch that I used to fix this:

--- ntfs-2.6-devel/arch/um/kernel/gmon_syms.c.old	2005-02-14 11:27:04.789474410 +0000
+++ ntfs-2.6-devel/arch/um/kernel/gmon_syms.c	2005-02-14 11:26:49.191117739 +0000
@@ -8,6 +8,9 @@
 extern void __bb_init_func(void *);
 EXPORT_SYMBOL(__bb_init_func);
 
+extern void __gcov_init(void *);
+EXPORT_SYMBOL(__gcov_init);
+
 /*
  * Overrides for Emacs so that we follow Linus's tabbing style.
  * Emacs will notice this stuff at the end of the file and automatically

Best regards,

        Anton
-- 
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net
WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [uml-devel] Partial fix! - Was: Re: [BUG report] UML linux-2.6 latest BK doesn't compile
  2005-02-14 11:35       ` Partial fix! - Was: " Anton Altaparmakov
@ 2005-02-16 18:27         ` Blaisorblade
  2005-03-05 19:45         ` Jeff Dike
  1 sibling, 0 replies; 17+ messages in thread
From: Blaisorblade @ 2005-02-16 18:27 UTC (permalink / raw)
  To: user-mode-linux-devel; +Cc: Anton Altaparmakov, Jeff Dike, lkml

On Monday 14 February 2005 12:35, Anton Altaparmakov wrote:
> On Tue, 2005-02-08 at 17:22 -0500, Jeff Dike wrote:
> > blaisorblade@yahoo.it said:
> > > Why not simply disable CONFIG_GCOV for him, in this case?
> >
> > Anton presumably turned on CONFIG_GCOV because he wanted to do some
> > profiling...
>
> Yes.  I finally found a way to get it to compile.  Compiling without TT
> mode and WITHOUT static build it still fails with the same problem
> (__bb_init_func problem I already reported).  But compiling without TT
> but WITH static build the __bb_init_func problem goes away but instead I
> get a __gcov_init missing symbol in my modules.
>
> Note I have gcc-3.3.4-11 (SuSE 9.2) and it defines __gcov_init.  So I
> added this as an export symbol and lo and behold the kernel and modules
> compiled and I am now up an running with UML and NTFS as a module.  (-:

What do we do for previous GCC, which probably do not define _gcov_init (at 
least I guess, since things worked before)? We'll get a "unresolved symbol" 
in the kernel linking, I guess (unverified).

It is possible, even if ugly, to $(NM) the relevant libraries to choose what 
to do, by adding a -D__EXPORT_GCOV_INIT_ (or even, if we know well, to 
indicate the GCC version needed for this).

So, for now, I guess we must defer this to later than 2.6.11...

> Here is the patch that I used to fix this:
>
> --- ntfs-2.6-devel/arch/um/kernel/gmon_syms.c.old 2005-02-14
> 11:27:04.789474410 +0000 +++
> ntfs-2.6-devel/arch/um/kernel/gmon_syms.c 2005-02-14 11:26:49.191117739
> +0000 @@ -8,6 +8,9 @@
>  extern void __bb_init_func(void *);
>  EXPORT_SYMBOL(__bb_init_func);
>
> +extern void __gcov_init(void *);
> +EXPORT_SYMBOL(__gcov_init);
> +
>  /*
>   * Overrides for Emacs so that we follow Linus's tabbing style.
>   * Emacs will notice this stuff at the end of the file and automatically
>
> Best regards,
>
>         Anton

-- 
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729
http://www.user-mode-linux.org/~blaisorblade


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Partial fix! - Was: Re: [BUG report] UML linux-2.6 latest BK doesn't compile
  2005-03-05 19:45         ` Jeff Dike
@ 2005-03-05 18:31           ` Adrian Bunk
  2005-03-07 19:44           ` [uml-devel] " Blaisorblade
  1 sibling, 0 replies; 17+ messages in thread
From: Adrian Bunk @ 2005-03-05 18:31 UTC (permalink / raw)
  To: Jeff Dike; +Cc: Anton Altaparmakov, Blaisorblade, lkml, user-mode-linux-devel

On Sat, Mar 05, 2005 at 02:45:18PM -0500, Jeff Dike wrote:
> aia21@cam.ac.uk said:
> > Yes.  I finally found a way to get it to compile.  Compiling without
> > TT mode and WITHOUT static build it still fails with the same problem
> > (__bb_init_func problem I already reported).  But compiling without TT
> > but WITH static build the __bb_init_func problem goes away but instead
> > I get a __gcov_init missing symbol in my modules.
> >
> > Note I have gcc-3.3.4-11 (SuSE 9.2) and it defines __gcov_init.  So I
> > added this as an export symbol and lo and behold the kernel and
> > modules compiled and I am now up an running with UML and NTFS as a
> > module.  (-: 
> 
> Can you try this patch?  It exports either __gcov_init or __bb_init_func
> depending on your gcc version.
> 
> 			Jeff
> 
> Index: linux-2.6.10/arch/um/kernel/gmon_syms.c
> ===================================================================
> --- linux-2.6.10.orig/arch/um/kernel/gmon_syms.c	2005-02-28 17:22:29.000000000 -0500
> +++ linux-2.6.10/arch/um/kernel/gmon_syms.c	2005-03-02 12:19:14.000000000 -0500
> @@ -5,8 +5,14 @@
>  
>  #include "linux/module.h"
>  
> +#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 3) || \
> +	(__GNUC__ == 3 && __GNUC_MINOR__ == 3 && __GNUC_PATCHLEVEL__ > 4)

This line has to be something like

( (__GNUC__ == 3 && __GNUC_MINOR__ == 3 && __GNUC_PATCHLEVEL__ >= 4) && \
   HEAVILY_PATCHES_SUSE_GCC ) 


I hope SuSE has added some #define to distinguish what they call 
"gcc 3.3.4" from GNU gcc 3.3.4 ...


> +extern void __gcov_init(void *);
> +EXPORT_SYMBOL(__gcov_init);
> +#else
>  extern void __bb_init_func(void *);
>  EXPORT_SYMBOL(__bb_init_func);
> +#endif
>...

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Partial fix! - Was: Re: [BUG report] UML linux-2.6 latest BK doesn't compile
  2005-02-14 11:35       ` Partial fix! - Was: " Anton Altaparmakov
  2005-02-16 18:27         ` [uml-devel] " Blaisorblade
@ 2005-03-05 19:45         ` Jeff Dike
  2005-03-05 18:31           ` Adrian Bunk
  2005-03-07 19:44           ` [uml-devel] " Blaisorblade
  1 sibling, 2 replies; 17+ messages in thread
From: Jeff Dike @ 2005-03-05 19:45 UTC (permalink / raw)
  To: Anton Altaparmakov; +Cc: Blaisorblade, lkml, user-mode-linux-devel

aia21@cam.ac.uk said:
> Yes.  I finally found a way to get it to compile.  Compiling without
> TT mode and WITHOUT static build it still fails with the same problem
> (__bb_init_func problem I already reported).  But compiling without TT
> but WITH static build the __bb_init_func problem goes away but instead
> I get a __gcov_init missing symbol in my modules.
>
> Note I have gcc-3.3.4-11 (SuSE 9.2) and it defines __gcov_init.  So I
> added this as an export symbol and lo and behold the kernel and
> modules compiled and I am now up an running with UML and NTFS as a
> module.  (-: 

Can you try this patch?  It exports either __gcov_init or __bb_init_func
depending on your gcc version.

			Jeff

Index: linux-2.6.10/arch/um/kernel/gmon_syms.c
===================================================================
--- linux-2.6.10.orig/arch/um/kernel/gmon_syms.c	2005-02-28 17:22:29.000000000 -0500
+++ linux-2.6.10/arch/um/kernel/gmon_syms.c	2005-03-02 12:19:14.000000000 -0500
@@ -5,8 +5,14 @@
 
 #include "linux/module.h"
 
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 3) || \
+	(__GNUC__ == 3 && __GNUC_MINOR__ == 3 && __GNUC_PATCHLEVEL__ > 4)
+extern void __gcov_init(void *);
+EXPORT_SYMBOL(__gcov_init);
+#else
 extern void __bb_init_func(void *);
 EXPORT_SYMBOL(__bb_init_func);
+#endif
 
 /*
  * Overrides for Emacs so that we follow Linus's tabbing style.


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [uml-devel] Re: Partial fix! - Was: Re: [BUG report] UML linux-2.6 latest BK doesn't compile
  2005-03-05 19:45         ` Jeff Dike
  2005-03-05 18:31           ` Adrian Bunk
@ 2005-03-07 19:44           ` Blaisorblade
  2005-03-08  0:10             ` Jeff Dike
  1 sibling, 1 reply; 17+ messages in thread
From: Blaisorblade @ 2005-03-07 19:44 UTC (permalink / raw)
  To: user-mode-linux-devel; +Cc: Jeff Dike, Anton Altaparmakov, lkml

On Saturday 05 March 2005 20:45, Jeff Dike wrote:
> aia21@cam.ac.uk said:
> > Yes.  I finally found a way to get it to compile.  Compiling without
> > TT mode and WITHOUT static build it still fails with the same problem
> > (__bb_init_func problem I already reported).  But compiling without TT
> > but WITH static build the __bb_init_func problem goes away but instead
> > I get a __gcov_init missing symbol in my modules.
> >
> > Note I have gcc-3.3.4-11 (SuSE 9.2) and it defines __gcov_init.  So I
> > added this as an export symbol and lo and behold the kernel and
> > modules compiled and I am now up an running with UML and NTFS as a
> > module.  (-:
>
> Can you try this patch?  It exports either __gcov_init or __bb_init_func
> depending on your gcc version.
a) wrong because you say __GNUC_PATCHLEVEL__ > 4 rather than >=
b) wrong because for he the link failed on __bb_init_func at the beginning. So 
in the case you need to export BOTH symbols.

-- 
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729
http://www.user-mode-linux.org/~blaisorblade


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [uml-devel] Re: Partial fix! - Was: Re: [BUG report] UML linux-2.6 latest BK doesn't compile
  2005-03-07 19:44           ` [uml-devel] " Blaisorblade
@ 2005-03-08  0:10             ` Jeff Dike
  2005-03-13 20:06               ` Blaisorblade
  0 siblings, 1 reply; 17+ messages in thread
From: Jeff Dike @ 2005-03-08  0:10 UTC (permalink / raw)
  To: Blaisorblade; +Cc: user-mode-linux-devel, Anton Altaparmakov, lkml

blaisorblade@yahoo.it said:
> a) wrong because you say __GNUC_PATCHLEVEL__ > 4 rather than >= 

Correct, this is now fixed.

> b) wrong because for he the link failed on __bb_init_func at the
> beginning. So  in the case you need to export BOTH symbols. 

Incorrect, the link failure was caused by trying to export __bb_init_func,
which makes a reference to it, which was subsequently not being resolved.

You can't export a symbol which doesn't exist.

				Jeff


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [uml-devel] Re: Partial fix! - Was: Re: [BUG report] UML linux-2.6 latest BK doesn't compile
  2005-03-08  0:10             ` Jeff Dike
@ 2005-03-13 20:06               ` Blaisorblade
       [not found]                 ` <EBD0B8CF381E8B44BB99E8EA137E27C0021AD010@CPEXBE-EML06.kpnsp.local>
  0 siblings, 1 reply; 17+ messages in thread
From: Blaisorblade @ 2005-03-13 20:06 UTC (permalink / raw)
  To: user-mode-linux-devel; +Cc: Jeff Dike, Anton Altaparmakov, lkml

Ok, I think I finally solved this problem.

A note for Jeff: I forgot to send this email and complained to you because you 
didn't answer... Sorry Jeff.

However, I explained what I say here to him in chat and we agreed on the fix.

I'm sending this anyway... and I'm attaching the correct fix we discussed.

On Tuesday 08 March 2005 01:10, Jeff Dike wrote:
> blaisorblade@yahoo.it said:
> > a) wrong because you say __GNUC_PATCHLEVEL__ > 4 rather than >=

> Correct, this is now fixed.

> > b) wrong because for he the link failed on __bb_init_func at the
> > beginning. So  in the case you need to export BOTH symbols.

> Incorrect, the link failure was caused by trying to export __bb_init_func,
> which makes a reference to it, which was subsequently not being resolved.
No, the link failure was when linking the first object together in the final 
file.

The symbol was referred to by the wrappers inserted by GCC for gprof / 
gcov, not by the symbol exporting.

Quoting Anton:
> Yes.  I finally found a way to get it to compile.  Compiling without TT
> mode and WITHOUT static build it still fails with the same problem
> (__bb_init_func problem I already reported).  But compiling without TT
> but WITH static build the __bb_init_func problem goes away but instead I
> get a __gcov_init missing symbol in my modules.

And it was fixed when linking statically, as you see (because the symbol is 
not defined in dynamic libraries - don't know if this is a bug of glibc, I 
hope not).

What was needed was the addition of another EXPORT_SYMBOL, but it couldn't be 
added for everybody because it causes the build to fail for old compilers 
which don't export the symbol.

And "old compilers" include normal gcc 3.3.4 (I verified this on my Gentoo 
system).

Also, maybe adding a dependency on static linking for GCOV is needed, maybe.

After some successful testing (maybe I didn't test all cases), however, 
something strange happened: the build started failing because now GCC 
requires the GCOV options (-fprofile-arcs -ftest-coverage) even during 
linking (because the gcov helper functions are now in a separate library). I 
said "strange" because the same build succeeded with gcc 3.3.4, and I didn't 
understand the difference at first.

This required two changes:
- excluding the profiling options from the mk_* utilities.
- adding the GCOV options to linking (this is even documented now). I've 
retested that this wasn't needed with gcc 3.3.4 (and I guess older ones).

Finally, I got an unresolved symbol on __bb_fork_func, and I wasn't able to 
solve this (is it maybe a bug in libc or whatever? I don't know).
-- 
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729
http://www.user-mode-linux.org/~blaisorblade



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [uml-devel] Re: Partial fix! - Was: Re: [BUG report] UML linux-2.6 latest BK doesn't compile
       [not found]                 ` <EBD0B8CF381E8B44BB99E8EA137E27C0021AD010@CPEXBE-EML06.kpnsp.local>
@ 2006-09-09  9:31                   ` Blaisorblade
  2006-09-11 15:27                     ` Jeff Dike
  0 siblings, 1 reply; 17+ messages in thread
From: Blaisorblade @ 2006-09-09  9:31 UTC (permalink / raw)
  To: i.r.wezeman; +Cc: user-mode-linux-devel, Jeff Dike, Anton Altaparmakov, lkml

On Saturday 09 September 2006 00:25, i.r.wezeman@hetnet.nl wrote:
> Hi there.
> 
> I got a error undefined reference to `__bb_init_func' when
> compiling uml with kernel 2.6.17.6, gcc 4.1.1 and glibc-2.4

Ok, that's new. The below mail is about a very similar problem but with an 
older Gcc, and since these symbols are provided by gcc, this makes a 
difference.

Try removing from arch/um/kernel/gmon_syms.c these 2 lines:

extern void __bb_init_func(void *);
EXPORT_SYMBOL(__bb_init_func);

and recompiling. Better yet, try if adding the weak attribute like below fixes 
the problem:

extern void __bb_init_func(void *) __attribute__((weak));
EXPORT_SYMBOL(__bb_init_func);

Another possible thing to check is what happens with CONFIG_STATIC_LINK=y 
(edit it by hand and do not enable GPROF for now, that is yet another thing).

> Done: make clean && make distclean && make allmodconfig ARCH=um

> # CONFIG_GPROF is not set
> CONFIG_GCOV=y

This results from allmodconfig? Mmpf, that is not so nice (allmodconfig should 
not result in a debug kernel). Even if allmodconfig is not a _smart_ setting 
(set to y or m everything).

> #
> # UML-specific options
> #
> # CONFIG_MODE_TT is not set
> # CONFIG_STATIC_LINK is not set
> CONFIG_MODE_SKAS=y

> Build: make linux ARCH=um
> 
> 
> edit file: uml/arch/um/os-Linux/sys-i386/registers.c

> Ending:
> 
> arch/um/kernel/built-in.o:(__ksymtab+0x238): undefined reference to
> `__bb_init_func'
> arch/um/os-Linux/built-in.o: In function `do_syscall_stub':
> arch/um/os-Linux/skas/mem.c:63: undefined reference to
> `get_safe_registers'
> arch/um/os-Linux/built-in.o: In function `copy_context_skas0':
> arch/um/os-Linux/skas/process.c:333: undefined reference to
> `get_safe_registers'

Since it arrives to this point, get_safe_register should be undefined only 
because of the previous failure.

> I see it must be solved. So wat is happend now?
> 
> Ron Wezeman
-- 
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade
http://www.user-mode-linux.org/~blaisorblade
Chiacchiera con i tuoi amici in tempo reale! 
 http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com 

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [uml-devel] Re: Partial fix! - Was: Re: [BUG report] UML linux-2.6 latest BK doesn't compile
  2006-09-09  9:31                   ` Blaisorblade
@ 2006-09-11 15:27                     ` Jeff Dike
  0 siblings, 0 replies; 17+ messages in thread
From: Jeff Dike @ 2006-09-11 15:27 UTC (permalink / raw)
  To: Blaisorblade; +Cc: i.r.wezeman, user-mode-linux-devel, Anton Altaparmakov, lkml

On Sat, Sep 09, 2006 at 11:31:36AM +0200, Blaisorblade wrote:
> On Saturday 09 September 2006 00:25, i.r.wezeman@hetnet.nl wrote:
> > Hi there.
> > 
> > I got a error undefined reference to `__bb_init_func' when
> > compiling uml with kernel 2.6.17.6, gcc 4.1.1 and glibc-2.4

Happens to me with -rc6.

> Try removing from arch/um/kernel/gmon_syms.c these 2 lines:
> 
> extern void __bb_init_func(void *);
> EXPORT_SYMBOL(__bb_init_func);

And this seems to fix it.

> Better yet, try if adding the weak attribute like below fixes 
> the problem:
> 
> extern void __bb_init_func(void *) __attribute__((weak));
> EXPORT_SYMBOL(__bb_init_func);

And this fixes it even better.

				Jeff

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2006-09-11 15:29 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-08 10:09 [BUG report] UML linux-2.6 latest BK doesn't compile Anton Altaparmakov
2005-02-08 10:22 ` Blaisorblade
2005-02-08 10:40   ` Anton Altaparmakov
2005-02-08 17:48     ` [uml-devel] " Blaisorblade
2005-02-08 22:21       ` Jeff Dike
2005-02-08 18:29 ` Jeff Dike
2005-02-08 17:37   ` Blaisorblade
2005-02-08 22:22     ` Jeff Dike
2005-02-14 11:35       ` Partial fix! - Was: " Anton Altaparmakov
2005-02-16 18:27         ` [uml-devel] " Blaisorblade
2005-03-05 19:45         ` Jeff Dike
2005-03-05 18:31           ` Adrian Bunk
2005-03-07 19:44           ` [uml-devel] " Blaisorblade
2005-03-08  0:10             ` Jeff Dike
2005-03-13 20:06               ` Blaisorblade
     [not found]                 ` <EBD0B8CF381E8B44BB99E8EA137E27C0021AD010@CPEXBE-EML06.kpnsp.local>
2006-09-09  9:31                   ` Blaisorblade
2006-09-11 15:27                     ` Jeff Dike

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).