View previous topic :: View next topic |
Author |
Message |
IRON n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 21 Nov 2004 Posts: 71
|
Posted: Tue Dec 11, 2007 2:34 pm Post subject: ld error after comple hardened kernel |
|
|
Hello all.
After updating installed package list to latest versions, I try to compile hardened kernel, and receive error:
Code: | # cd /usr/src/linux
# make
CHK include/linux/version.h
CHK include/linux/utsrelease.h
CHK include/linux/compile.h
GEN .version
CHK include/linux/compile.h
UPD include/linux/compile.h
CC init/version.o
LD init/built-in.o
LD vmlinux
ld: vmlinux: section `.init.text' can't be allocated in segment 0
ld: final link failed: Bad value
make: *** [vmlinux] Error 1 |
Code: | # emerge --info
Portage 2.1.3.19 (hardened/x86/2.6, gcc-3.4.6, glibc-2.6.1-r0, 2.6.20-hardened-r10 i686)
=================================================================
System uname: 2.6.20-hardened-r10 i686 Intel(R) Pentium(R) D CPU 3.00GHz
Timestamp of tree: Tue, 11 Dec 2007 13:30:01 +0000
app-shells/bash: 3.2_p17
dev-lang/python: 2.4.4-r6
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.9-r2
sys-apps/sandbox: 1.2.18.1-r2
sys-devel/autoconf: 2.13, 2.61-r1
sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils: 2.18-r1
sys-devel/gcc-config: 1.3.16
sys-devel/libtool: 1.5.24
virtual/os-headers: 2.6.22-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=nocona -fomit-frame-pointer -pipe -mmmx -msse2 -msse3"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O3 -march=nocona -fomit-frame-pointer -pipe -mmmx -msse2 -msse3"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks loadpolicy metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/"
LANG="en_US.UTF-8"
LINGUAS="ru"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl apache2 bzip2 cli cracklib crypt curl dba dhcp dlz exiscan exiscan-acl extensions gmp hardened icq imap ithreads mailwrapper mbox mhash midi mmx mppe-mppc mysql nls nptl nptlonly pam passwordsave pic ppp readline rsbac session sse sse2 ssl threads unicode urandom vhosts winbind x86 xml xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="mouse keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="ru" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"
Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
|
How I can solve this problem?
Many thanks... |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
djinnZ Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/3978748614ef08bfa7f764.jpg)
Joined: 02 Nov 2006 Posts: 4831 Location: somewhere in L.O.S.
|
Posted: Tue Dec 11, 2007 5:13 pm Post subject: Re: ld error after comple hardened kernel |
|
|
IRON wrote: | CFLAGS="-O3 -march=nocona -fomit-frame-pointer -pipe -mmmx -msse2 -msse3" |
this is the best way to have an unusable, damaged c compiler on hardened profiles.
Can be also an hardware (memory) error or a misconfiguration of the kernel.
My suggestion is to save the actual kernel config do a make mrproper and try to rebuild it. Be sure to not have too many modules built-in.
If it will not work try to save a binary package of the gcc and rebuild it with -O2.
if you have updated the linux headers is better to rebuild the libc.
Last: by default a simple "make" will not launch a "make bzImage modules", in my experience it will rarely work and only for very small kernels. _________________ scita et risus abundant in ore stultorum sed etiam semper severi insani sunt
mala tempora currunt...mater stultorum semper pregna est
Murpy'sLaw:If anything can go wrong, it will - O'Toole's Corollary:Murphy was an optimist ![Wink :wink:](images/smiles/icon_wink.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
IRON n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 21 Nov 2004 Posts: 71
|
Posted: Tue Dec 11, 2007 7:43 pm Post subject: |
|
|
My CFLAGS is changed to:
Code: | -O2 -march=prescott -fomit-frame-pointer -pipe -mmmx -msse2 |
I have rebuild gcc and glibc, but still have receive this error again .
I must rebuild all packages with new CFLAGS (emerge -e world) ? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
IRON n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 21 Nov 2004 Posts: 71
|
Posted: Fri Dec 14, 2007 6:04 pm Post subject: |
|
|
Hello all again.
I have reemerged all packages with new CFLAGS, but still receiving this error :
Code: | ......................
CC lib/rwsem.o
CC lib/semaphore-sleepers.o
CC lib/sha1.o
CC lib/string.o
CC lib/vsprintf.o
AR lib/lib.a
LD arch/i386/lib/built-in.o
CC arch/i386/lib/bitops.o
AS arch/i386/lib/checksum.o
CC arch/i386/lib/delay.o
AS arch/i386/lib/getuser.o
CC arch/i386/lib/memcpy.o
AS arch/i386/lib/putuser.o
AS arch/i386/lib/semaphore.o
CC arch/i386/lib/strstr.o
CC arch/i386/lib/usercopy.o
AR arch/i386/lib/lib.a
GEN .version
CHK include/linux/compile.h
UPD include/linux/compile.h
CC init/version.o
LD init/built-in.o
LD vmlinux
ld: vmlinux: section `.init.text' can't be allocated in segment 0
ld: final link failed: Bad value
make: *** [vmlinux] Error 1 |
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ovaron_gen n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 06 Aug 2006 Posts: 4
|
Posted: Mon Dec 17, 2007 10:40 pm Post subject: |
|
|
it helped me to use a binutils < 2.18
Code: | # emerge -a \<sys-devel/binutils-2.18 |
then try to build your kernel |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|