UML linux-2.6 latest BK doesn't compile
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
Signature · 4 lines
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/
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.11-rc3
# Tue Feb 8 09:53:02 2005
#CONFIG_GENERIC_HARDIRQS=yCONFIG_USERMODE=yCONFIG_MMU=yCONFIG_UID16=yCONFIG_RWSEM_GENERIC_SPINLOCK=yCONFIG_GENERIC_CALIBRATE_DELAY=y
#
# UML-specific options
#
# CONFIG_MODE_TT is not set
# CONFIG_STATIC_LINK is not setCONFIG_MODE_SKAS=y
# CONFIG_64_BIT is not setCONFIG_TOP_ADDR=0xc0000000
# CONFIG_3_LEVEL_PGTABLES is not setCONFIG_ARCH_HAS_SC_SIGNALS=yCONFIG_ARCH_REUSE_HOST_VSYSCALL_AREA=yCONFIG_LD_SCRIPT_DYN=yCONFIG_NET=yCONFIG_BINFMT_ELF=yCONFIG_BINFMT_MISC=yCONFIG_HOSTFS=y
# CONFIG_HPPFS is not setCONFIG_MCONSOLE=yCONFIG_MAGIC_SYSRQ=y
# CONFIG_HOST_2G_2G is not setCONFIG_NEST_LEVEL=0CONFIG_KERNEL_HALF_GIGS=1
# CONFIG_HIGHMEM is not setCONFIG_KERNEL_STACK_ORDER=2CONFIG_UML_REAL_TIME_CLOCK=y
#
# Code maturity level options
#CONFIG_EXPERIMENTAL=y
# CONFIG_CLEAN_COMPILE is not setCONFIG_BROKEN=yCONFIG_BROKEN_ON_SMP=y
#
# General setup
#CONFIG_LOCALVERSION=""CONFIG_SWAP=yCONFIG_SYSVIPC=yCONFIG_POSIX_MQUEUE=y
# CONFIG_BSD_PROCESS_ACCT is not setCONFIG_SYSCTL=y
# CONFIG_AUDIT is not setCONFIG_LOG_BUF_SHIFT=17CONFIG_HOTPLUG=yCONFIG_KOBJECT_UEVENT=yCONFIG_IKCONFIG=yCONFIG_IKCONFIG_PROC=y
# CONFIG_EMBEDDED is not setCONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_ALL is not set
# CONFIG_KALLSYMS_EXTRA_PASS is not setCONFIG_FUTEX=yCONFIG_EPOLL=y
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not setCONFIG_SHMEM=yCONFIG_CC_ALIGN_FUNCTIONS=0CONFIG_CC_ALIGN_LABELS=0CONFIG_CC_ALIGN_LOOPS=0CONFIG_CC_ALIGN_JUMPS=0
# CONFIG_TINY_SHMEM is not set
#
# Loadable module support
#CONFIG_MODULES=yCONFIG_MODULE_UNLOAD=yCONFIG_MODULE_FORCE_UNLOAD=yCONFIG_OBSOLETE_MODPARM=y
# CONFIG_MODULE_SRCVERSION_ALL is not setCONFIG_KMOD=y
#
# Generic Driver Options
#
# CONFIG_STANDALONE is not setCONFIG_PREVENT_FIRMWARE_BUILD=y
# CONFIG_FW_LOADER is not set
# CONFIG_DEBUG_DRIVER is not set
#
# Character Devices
#CONFIG_STDERR_CONSOLE=yCONFIG_STDIO_CONSOLE=yCONFIG_SSL=yCONFIG_NULL_CHAN=yCONFIG_PORT_CHAN=yCONFIG_PTY_CHAN=yCONFIG_TTY_CHAN=yCONFIG_XTERM_CHAN=y
# CONFIG_NOCONFIG_CHAN is not setCONFIG_CON_ZERO_CHAN="fd:0,fd:1"CONFIG_CON_CHAN="xterm"CONFIG_SSL_CHAN="pty"CONFIG_UNIX98_PTYS=yCONFIG_LEGACY_PTYS=yCONFIG_LEGACY_PTY_COUNT=256CONFIG_WATCHDOG=yCONFIG_WATCHDOG_NOWAYOUT=yCONFIG_SOFT_WATCHDOG=yCONFIG_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 setCONFIG_BLK_DEV_COW_COMMON=y
# CONFIG_MMAPPER is not setCONFIG_BLK_DEV_LOOP=y
# CONFIG_BLK_DEV_CRYPTOLOOP is not setCONFIG_BLK_DEV_NBD=yCONFIG_BLK_DEV_RAM=yCONFIG_BLK_DEV_RAM_COUNT=16CONFIG_BLK_DEV_RAM_SIZE=64000CONFIG_BLK_DEV_INITRD=yCONFIG_INITRAMFS_SOURCE=""
# CONFIG_LBD is not set
#
# IO Schedulers
#CONFIG_IOSCHED_NOOP=yCONFIG_IOSCHED_AS=y
# CONFIG_IOSCHED_DEADLINE is not set
# CONFIG_IOSCHED_CFQ is not set
# CONFIG_ATA_OVER_ETH is not setCONFIG_NETDEVICES=y
#
# UML Network Devices
#CONFIG_UML_NET=y
# CONFIG_UML_NET_ETHERTAP is not setCONFIG_UML_NET_TUNTAP=y
# CONFIG_UML_NET_SLIP is not setCONFIG_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=yCONFIG_PACKET_MMAP=yCONFIG_NETLINK_DEV=yCONFIG_UNIX=y
# CONFIG_NET_KEY is not setCONFIG_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 setCONFIG_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 setCONFIG_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 setCONFIG_NETPOLL=yCONFIG_NETPOLL_RX=yCONFIG_NETPOLL_TRAP=yCONFIG_NET_POLL_CONTROLLER=y
# CONFIG_HAMRADIO is not set
# CONFIG_IRDA is not set
# CONFIG_BT is not setCONFIG_DUMMY=y
# CONFIG_BONDING is not set
# CONFIG_EQUALIZER is not setCONFIG_TUN=y
# CONFIG_ETHERTAP is not set
#
# Ethernet (10 or 100Mbit)
#CONFIG_NET_ETHERNET=yCONFIG_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 setCONFIG_PPP=y
# CONFIG_PPP_MULTILINK is not setCONFIG_PPP_FILTER=yCONFIG_PPP_ASYNC=yCONFIG_PPP_SYNC_TTY=yCONFIG_PPP_DEFLATE=yCONFIG_PPP_BSDCOMP=yCONFIG_PPPOE=y
# CONFIG_SLIP is not set
# CONFIG_SHAPER is not setCONFIG_NETCONSOLE=y
#
# File systems
#
# CONFIG_EXT2_FS is not setCONFIG_EXT3_FS=yCONFIG_EXT3_FS_XATTR=yCONFIG_EXT3_FS_POSIX_ACL=yCONFIG_EXT3_FS_SECURITY=yCONFIG_JBD=y
# CONFIG_JBD_DEBUG is not setCONFIG_FS_MBCACHE=y
# CONFIG_REISERFS_FS is not set
# CONFIG_JFS_FS is not setCONFIG_FS_POSIX_ACL=y
#
# XFS support
#
# CONFIG_XFS_FS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_ROMFS_FS is not setCONFIG_QUOTA=y
# CONFIG_QFMT_V1 is not setCONFIG_QFMT_V2=yCONFIG_QUOTACTL=yCONFIG_DNOTIFY=y
# CONFIG_AUTOFS_FS is not setCONFIG_AUTOFS4_FS=y
#
# CD-ROM/DVD Filesystems
#CONFIG_ISO9660_FS=yCONFIG_JOLIET=yCONFIG_ZISOFS=yCONFIG_ZISOFS_FS=yCONFIG_UDF_FS=yCONFIG_UDF_NLS=y
#
# DOS/FAT/NT Filesystems
#CONFIG_FAT_FS=yCONFIG_MSDOS_FS=yCONFIG_VFAT_FS=yCONFIG_FAT_DEFAULT_CODEPAGE=437CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-15"CONFIG_NTFS_FS=mCONFIG_NTFS_DEBUG=yCONFIG_NTFS_RW=y
#
# Pseudo filesystems
#CONFIG_PROC_FS=yCONFIG_PROC_KCORE=yCONFIG_SYSFS=y
# CONFIG_DEVFS_FS is not setCONFIG_DEVPTS_FS_XATTR=yCONFIG_DEVPTS_FS_SECURITY=yCONFIG_TMPFS=yCONFIG_TMPFS_XATTR=yCONFIG_TMPFS_SECURITY=y
# CONFIG_HUGETLBFS is not set
# CONFIG_HUGETLB_PAGE is not setCONFIG_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=yCONFIG_NFS_V3=yCONFIG_NFS_V4=yCONFIG_NFS_DIRECTIO=yCONFIG_NFSD=yCONFIG_NFSD_V3=yCONFIG_NFSD_V4=yCONFIG_NFSD_TCP=yCONFIG_LOCKD=yCONFIG_LOCKD_V4=yCONFIG_EXPORTFS=yCONFIG_SUNRPC=yCONFIG_SUNRPC_GSS=yCONFIG_RPCSEC_GSS_KRB5=y
# CONFIG_RPCSEC_GSS_SPKM3 is not set
# CONFIG_SMB_FS is not set
# CONFIG_CIFS is not setCONFIG_NCP_FS=yCONFIG_NCPFS_PACKET_SIGNING=yCONFIG_NCPFS_IOCTL_LOCKING=yCONFIG_NCPFS_STRONG=yCONFIG_NCPFS_NFS_NS=yCONFIG_NCPFS_OS2_NS=yCONFIG_NCPFS_SMALLDOS=yCONFIG_NCPFS_NLS=yCONFIG_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 setCONFIG_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=yCONFIG_NLS_DEFAULT="utf8"CONFIG_NLS_CODEPAGE_437=y
# CONFIG_NLS_CODEPAGE_737 is not set
# CONFIG_NLS_CODEPAGE_775 is not setCONFIG_NLS_CODEPAGE_850=y
# CONFIG_NLS_CODEPAGE_852 is not setCONFIG_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 setCONFIG_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 setCONFIG_NLS_CODEPAGE_1250=yCONFIG_NLS_CODEPAGE_1251=yCONFIG_NLS_ASCII=yCONFIG_NLS_ISO8859_1=yCONFIG_NLS_ISO8859_2=y
# CONFIG_NLS_ISO8859_3 is not set
# CONFIG_NLS_ISO8859_4 is not setCONFIG_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 setCONFIG_NLS_ISO8859_15=yCONFIG_NLS_KOI8_R=yCONFIG_NLS_KOI8_U=yCONFIG_NLS_UTF8=y
#
# Security options
#
# CONFIG_KEYS is not set
# CONFIG_SECURITY is not set
#
# Cryptographic options
#CONFIG_CRYPTO=yCONFIG_CRYPTO_HMAC=yCONFIG_CRYPTO_NULL=yCONFIG_CRYPTO_MD4=yCONFIG_CRYPTO_MD5=yCONFIG_CRYPTO_SHA1=yCONFIG_CRYPTO_SHA256=yCONFIG_CRYPTO_SHA512=yCONFIG_CRYPTO_WP512=yCONFIG_CRYPTO_DES=yCONFIG_CRYPTO_BLOWFISH=yCONFIG_CRYPTO_TWOFISH=yCONFIG_CRYPTO_SERPENT=yCONFIG_CRYPTO_AES=yCONFIG_CRYPTO_CAST5=yCONFIG_CRYPTO_CAST6=yCONFIG_CRYPTO_TEA=yCONFIG_CRYPTO_ARC4=yCONFIG_CRYPTO_KHAZAD=yCONFIG_CRYPTO_ANUBIS=yCONFIG_CRYPTO_DEFLATE=yCONFIG_CRYPTO_MICHAEL_MIC=yCONFIG_CRYPTO_CRC32C=y
# CONFIG_CRYPTO_TEST is not set
#
# Hardware crypto devices
#
#
# Library routines
#CONFIG_CRC_CCITT=yCONFIG_CRC32=yCONFIG_LIBCRC32C=yCONFIG_ZLIB_INFLATE=yCONFIG_ZLIB_DEFLATE=y
#
# SCSI support
#
# CONFIG_SCSI is not set
#
# Multi-device support (RAID and LVM)
#CONFIG_MD=yCONFIG_BLK_DEV_MD=yCONFIG_MD_LINEAR=yCONFIG_MD_RAID0=yCONFIG_MD_RAID1=yCONFIG_MD_RAID10=yCONFIG_MD_RAID5=yCONFIG_MD_RAID6=yCONFIG_MD_MULTIPATH=yCONFIG_MD_FAULTY=yCONFIG_BLK_DEV_DM=yCONFIG_DM_CRYPT=yCONFIG_DM_SNAPSHOT=yCONFIG_DM_MIRROR=yCONFIG_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 setCONFIG_DEBUG_SLAB=yCONFIG_DEBUG_SPINLOCK=yCONFIG_DEBUG_SPINLOCK_SLEEP=y
# CONFIG_DEBUG_KOBJECT is not setCONFIG_DEBUG_INFO=yCONFIG_DEBUG_FS=yCONFIG_FRAME_POINTER=yCONFIG_PT_PROXY=yCONFIG_GPROF=yCONFIG_GCOV=y
Quoted 17 lines · Anton Altaparmakov
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_vmlinux1arch/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
Quoted 1 line
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).
Signature · 3 lines
Paolo Giarrusso, aka Blaisorblade Linux registered user n. 292729 http://www.user-mode-linux.org/~blaisorblade
Quoted 18 lines · Blaisorblade
Quoted 17 lines · Anton Altaparmakov
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_vmlinux1arch/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
Quoted 5 lines
Quoted 1 line
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
Signature · 4 lines
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/
Quoted 1 line · [email protected] 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
arch/um/kernel/Makefile +0 -1
@@ -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
arch/um/kernel/gmon_syms.c +0 -20
@@ -1,20 +0,0 @@ -/* -* Copyright (C) 2001, 2002 Jeff Dike ([email protected]) -* 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: -*/
Quoted 7 lines · Jeff Dike
Quoted 1 line · [email protected] said:
arch/um/kernel/exec_kern.c:59: undefined reference to `__bb_init_func'The
__bb_init_funcexport 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.
Quoted 5 lines
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).
Signature · 3 lines
Paolo Giarrusso, aka Blaisorblade Linux registered user n. 292729 http://www.user-mode-linux.org/~blaisorblade
Quoted 29 lines · Anton Altaparmakov
Quoted 18 lines · Blaisorblade
Quoted 17 lines · Anton Altaparmakov
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_vmlinux1arch/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 139Quoted 7 lines
Quoted 2 lines
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:
Quoted 8 lines
arch/um/kernel/gmon_syms.c1.1 extern void __bb_init_func(void
*);arch/um/kernel/gmon_syms.c1.1EXPORT_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_symsbinary linked into the kernel
I think it *is* still linked.
Quoted 2 lines
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).
Quoted 2 lines
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.
Quoted 2 lines
Lots of UML
changes were pulled in by my pull...
Signature · 16 lines
Paolo Giarrusso, aka Blaisorblade Linux registered user n. 292729 http://www.user-mode-linux.org/~blaisorblade ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ User-mode-linux-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 1 line · [email protected] said:
Why not simply disable
CONFIG_GCOVfor him, in this case?
Anton presumably turned on CONFIG_GCOV because he wanted to do some profiling...
Jeff
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 1 line · [email protected] said:
the Makefiles were heavily changed, however, recently (after 2.6.10).
There was a bug in that patch. The fix is:
arch/um/Makefile 2005-02-08 12:33:23.000000000 -0500 renamed from arch/um/Makefile 2005-02-08 12:33:23.000000000 -0500 +2 -2
@@ -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
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Partial fix! - Was: Re: [BUG report] UML linux-2.6 latest BK doesn't compile
In reply to Jeff DikeQuoted 4 lines · Jeff Dike
Quoted 1 line · [email protected] said:
Why not simply disable
CONFIG_GCOVfor him, in this case?Anton presumably turned on
CONFIG_GCOVbecause 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:
arch/um/kernel/gmon_syms.c renamed from arch/um/kernel/gmon_syms.c.old +3 -0
@@ -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
Signature · 17 lines
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/ ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ User-mode-linux-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Re: [uml-devel] Partial fix! - Was: Re: [BUG report] UML linux-2.6 latest BK doesn't compile
Quoted 13 lines · Anton Altaparmakov
Quoted 5 lines · Jeff Dike
Quoted 1 line · [email protected] said:
Why not simply disable
CONFIG_GCOVfor him, in this case?Anton presumably turned on
CONFIG_GCOVbecause 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_funcproblem I already reported). But compiling without TT but WITH static build the__bb_init_funcproblem goes away but instead I get a__gcov_initmissing symbol in my modules.
Quoted 3 lines
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...
Quoted 19 lines
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.c2005-02-14 11:26:49.191117739 +0000 @@ -8,6 +8,9 @@
extern void__bb_init_func(void *);EXPORT_SYMBOL(__bb_init_func);arch/um/kernel/gmon_syms.c renamed from arch/um/kernel/gmon_syms.c.old +3
-0+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
Signature · 16 lines
Paolo Giarrusso, aka Blaisorblade Linux registered user n. 292729 http://www.user-mode-linux.org/~blaisorblade ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ User-mode-linux-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Re: Partial fix! - Was: Re: [BUG report] UML linux-2.6 latest BK doesn't compile
In reply to Anton AltaparmakovQuoted 10 lines · [email protected] 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_funcproblem I already reported). But compiling without TT but WITH static build the__bb_init_funcproblem goes away but instead I get a__gcov_initmissing 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
arch/um/kernel/gmon_syms.c +6 -0
@@ -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.
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Re: Partial fix! - Was: Re: [BUG report] UML linux-2.6 latest BK doesn't compile
Quoted 22 lines · Jeff Dike
Quoted 10 lines · [email protected] 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_funcproblem I already reported). But compiling without TT but WITH static build the__bb_init_funcproblem goes away but instead I get a__gcov_initmissing 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_initor__bb_init_funcdepending on your gcc version.Jeff
Index:
linux-2.6.10/arch/um/kernel/gmon_syms.c
===================================================================
arch/um/kernel/gmon_syms.c line 9
Quoted 5 lines
arch/um/kernel/gmon_syms.c +2
-0@@ -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 ...
arch/um/kernel/gmon_syms.c line 15
Quoted 7 lines
arch/um/kernel/gmon_syms.c +4
-0+extern void __gcov_init (void *); +EXPORT_SYMBOL (__gcov_init); +#else extern void __bb_init_func (void *);EXPORT_SYMBOL (__bb_init_func); +#endif
cu
Adrian
Signature · 16 lines
"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
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-develRe: [uml-devel] Re: Partial fix! - Was: Re: [BUG report] UML linux-2.6 latest BK doesn't compile
In reply to Jeff DikeQuoted 7 lines · Jeff Dike
Quoted 6 lines · [email protected] 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_funcproblem I already reported). But compiling without TT but WITH static build the__bb_init_funcproblem goes away but instead I get a__gcov_initmissing symbol in my modules.
Quoted 7 lines
Quoted 4 lines
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_initor__bb_init_funcdepending 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.
Signature · 16 lines
Paolo Giarrusso, aka Blaisorblade Linux registered user n. 292729 http://www.user-mode-linux.org/~blaisorblade ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ User-mode-linux-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Re: [uml-devel] Re: Partial fix! - Was: Re: [BUG report] UML linux-2.6 latest BK doesn't compile
Quoted 1 line · [email protected] said:
a) wrong because you say
__GNUC_PATCHLEVEL__> 4 rather than >=
Correct, this is now fixed.
Quoted 2 lines
b) wrong because for he the link failed on
__bb_init_funcat 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
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Re: [uml-devel] Re: Partial fix! - Was: Re: [BUG report] UML linux-2.6 latest BK doesn't compile
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.
Quoted 10 lines · Jeff Dike
Quoted 1 line · [email protected] said:
a) wrong because you say
__GNUC_PATCHLEVEL__> 4 rather than >=Correct, this is now fixed.
Quoted 2 lines
b) wrong because for he the link failed on
__bb_init_funcat 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:
Quoted 5 lines
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_funcproblem I already reported). But compiling without TT but WITH static build the__bb_init_funcproblem goes away but instead I get a__gcov_initmissing 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).
Signature · 17 lines
Paolo Giarrusso, aka Blaisorblade Linux registered user n. 292729 http://www.user-mode-linux.org/~blaisorblade ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ User-mode-linux-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Re: [uml-devel] Partial fix! - Was: Re: [BUG report] UML linux-2.6 latest BK doesn't compile
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
Done: make clean && make distclean && make allmodconfig ARCH=um
# CONFIG_GPROF is not setCONFIG_GCOV=y
#
# UML-specific options
#
# CONFIG_MODE_TT is not set
# CONFIG_STATIC_LINK is not setCONFIG_MODE_SKAS=y
Build: make linux ARCH=um
edit file: uml/arch/um/os-Linux/sys-i386/registers.c
err = ptrace(PTRACE_GETFPREGS, pid, 0, exec_fp_regs);
if(err)
panic("check_ptrace : PTRACE_GETFPREGS failed, errno = %d",
errno);
}#ifndef JB_PC
#define JB_PC 5
#define JB_SP 4
#define JB_BP 3
#endif
void get_thread_regs(union uml_pt_regs *uml_regs, void *buffer)
Edit file: uml/arch/um/os-Linux/sys-x86_64/registers.c
panic("check_ptrace : PTRACE_GETFPREGS failed, errno = %d",
errno);
}#ifndef JB_PC
#define JB_PC 7
#define JB_RSP 6
#define JB_RBP 1
#endif
void get_thread_regs(union uml_pt_regs *uml_regs, void *buffer)
{
struct __jmp_buf_tag *jmpbuf = buffer;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'
collect2: ld returned 1 exit status
KSYM .tmp_kallsyms1.S
nm: '.tmp_vmlinux1': No such file
No valid symbol.
make: *** [.tmp_kallsyms1.S] Error 1
I see it must be solved. So wat is happend now?
Ron Wezeman
-----Original Message-----
From: [email protected] on behalf of Blaisorblade
Sent: Sun 3/13/2005 9:06 PM
To: [email protected]
Cc: Jeff Dike; Anton Altaparmakov; lkml
Subject: Re: [uml-devel] Re: Partial fix! - Was: Re: [BUG report] UML linux-2.6 latest BK doesn't compile
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.
Quoted 10 lines · Jeff Dike
Quoted 1 line · [email protected] said:
a) wrong because you say
__GNUC_PATCHLEVEL__> 4 rather than >=Correct, this is now fixed.
Quoted 2 lines
b) wrong because for he the link failed on
__bb_init_funcat 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:
Quoted 5 lines
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_funcproblem I already reported). But compiling without TT but WITH static build the__bb_init_funcproblem goes away but instead I get a__gcov_initmissing 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).
Signature · 11 lines
Paolo Giarrusso, aka Blaisorblade Linux registered user n. 292729 http://www.user-mode-linux.org/~blaisorblade - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Re: [uml-devel] Re: Partial fix! - Was: Re: [BUG report] UML linux-2.6 latest BK doesn't compile
Quoted 4 lines · On Saturday 09 September 2006 00:25, [email protected] 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).
Quoted 4 lines
Done: make clean && make distclean && make allmodconfig ARCH=um
#
CONFIG_GPROFis not setCONFIG_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).
Quoted 14 lines
#
# UML-specific options
#
#CONFIG_MODE_TTis not set
#CONFIG_STATIC_LINKis not setCONFIG_MODE_SKAS=yBuild: make linux ARCH=um
edit file:
uml/arch/um/os-Linux/sys-i386/registers.cEnding:
Quoted 8 lines
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.
Quoted 3 lines
I see it must be solved. So wat is happend now?
Ron Wezeman
Signature · 5 lines
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
Re: [uml-devel] Partial fix! - Was: Re: [BUG report] UML linux-2.6 latest BK doesn't compile
In reply to a message not in the archiveQuoted 1 line · On Saturday 09 September 2006 15:39, [email protected] wrote:
The 'Try removing' will not work.
In all these cases you get a message about `get_safe_registers', i.e. another error; do you get the error about __bb_init_func with the "try removing" thing?
Also, it should compile by disabling CONFIG_GCOV (as you know probably), and this option is only for debugging - if it does not compile in that case there's something _very_ strange going on (like if `get_safe_registers' had been removed by hand-editing); anyway this discussion is useful to find the fix to the bug.
Quoted 30 lines
So have do the 'Better yet ' with make
clean, make distclean, make allmodconfig ARCH=um and make linux ARCH=umNow got the same error after 'Better yet':
CC init/version.o LD init/built-in.o LD .tmp_vmlinux1
arch/um/os-Linux/built-in.o: In function `do_syscall_stub':arch/um/os-Linux/skas/mem.c:63: undefined reference toget_safe_registers' arch/um/os-Linux/built-in.o: In functioncopy_context_skas0':arch/um/os-Linux/skas/process.c:333: undefined reference to `get_safe_registers' collect2: ld returned 1 exit status
KSYM.tmp_kallsyms1.S
nm: '.tmp_vmlinux1': No such file
No valid symbol.
make: *** [.tmp_kallsyms1.S] Error 1error, do: #CONFIG_MODE_TT=y
make clean and make linux ARCH=umNow got the same error as with 'Better yet'
error, do:
CONFIG_STATIC_LINK=y
make clean and make linux ARCH=umSame error as with 'Better yet'
error, do:
CONFIG_GPROF=y
make clean and make linux ARCH=um
Quoted 6 lines
Same error as with 'Better yet'
TODO:
get_safe_registershould be undefined only
because of the previous failure.In which to undefine?
No, don't undefine it. I was talking about this error message, which I can't explain - I thought it was just a conseguence of the error above.
Quoted 6 lines
Quoted 6 lines
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 get_safe_registers is defined in arch/um/os-Linux/sys-i386/registers.c, this error does not make a lot of sense. Make sure you haven't removed the definition by mistake - the other possibility is that file is not linked with the rest, but this would cause also other "undefined reference" errors.
Signature · 16 lines
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 ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ User-mode-linux-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Re: [uml-devel] Re: Partial fix! - Was: Re: [BUG report] UML linux-2.6 latest BK doesn't compile
In reply to BlaisorbladeQuoted 5 lines · Blaisorblade
Quoted 4 lines · On Saturday 09 September 2006 00:25, [email protected] 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.
Quoted 4 lines
Try removing from
arch/um/kernel/gmon_syms.cthese 2 lines:extern void
__bb_init_func(void *);EXPORT_SYMBOL(__bb_init_func);
And this seems to fix it.
Quoted 5 lines
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
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Re: [uml-devel] Partial fix! - Was: Re: [BUG report] UML linux-2.6 latest BK doesn't compile
Quoted 16 lines · Jeff Dike
Quoted 5 lines · Blaisorblade
Quoted 4 lines · On Saturday 09 September 2006 00:25, [email protected] 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.
Quoted 4 lines
Try removing from
arch/um/kernel/gmon_syms.cthese 2 lines:extern void
__bb_init_func(void *);EXPORT_SYMBOL(__bb_init_func);And this seems to fix it.
Quoted 7 lines
Quoted 5 lines
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.
Ok, I expect you to send the final patch, thanks... it should go for 2.6.18 possibly, and since you tested it you have it almost ready.
Bye bye
Signature · 16 lines
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 ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ User-mode-linux-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel