[uClibc 0000844]: SuperH "Only load shared libraries which can share their text segment" breaks busybox

bugs at busybox.net bugs at busybox.net
Sat Apr 22 12:00:40 UTC 2006


A NOTE has been added to this issue. 
====================================================================== 
http://busybox.net/bugs/view.php?id=844 
====================================================================== 
Reported By:                mastag
Assigned To:                uClibc
====================================================================== 
Project:                    uClibc
Issue ID:                   844
Category:                   Shared Library Support
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     assigned
====================================================================== 
Date Submitted:             04-21-2006 03:02 PDT
Last Modified:              04-22-2006 05:00 PDT
====================================================================== 
Summary:                    SuperH  "Only load shared libraries which can share
their text segment" breaks busybox
Description: 
I tried building a buildroot enviroment for sh4 little endian (gcc3.4.5)
It completes with success but when I try to load it on the dreamcast the
kernel will get tainted with an error about /lib/libbusybox.so containing
text.

I tried doing a make menuconfig in the toolchain_build_sh4/uClibc
directory and under "General Library Settings" there is support for shared
libraries.
However the option "---   Only load shared libraries which can share their
text segment" cannot be unchecked when Support for shared libraries is
checked.

This prevents me from running busybox.
I'm sorry for my bad english.

Regards,

Gino
====================================================================== 

---------------------------------------------------------------------- 
 psm - 04-21-06 03:23  
---------------------------------------------------------------------- 
there is only one case when that option can't be unselected, if you also
checked
UCLIBC_BUILD_PIE (Build utilities as ET_DYN/PIE executables).
Please reassign this bug to busybox, shared libs should not have text
relocations 

---------------------------------------------------------------------- 
 psm - 04-21-06 03:26  
---------------------------------------------------------------------- 
correction: for SH4 targets this option is enforced, probably the arch does
not
support text relocations at all 

---------------------------------------------------------------------- 
 mastag - 04-21-06 07:55  
---------------------------------------------------------------------- 
Well busybox used to work a few revisions earlier so I don't know what
caused it to not accept text relocations.
I don't know how important text relocations are, but if they are indeed
not supported on SH4 you should maybe disable it or change the config so
its not enforced.

Just a suggestion tough since it keeps me and others from running busybox. 

---------------------------------------------------------------------- 
 psm - 04-21-06 08:45  
---------------------------------------------------------------------- 
text relocations are bad, if SH4 does not support them, then it is no use
not
enforcing that option, as I said that is busybox's trouble building a
"faulty"
lib. I wonder though why you even build the lib, for busybox you do not
need it
(config option) 

---------------------------------------------------------------------- 
 mastag - 04-21-06 11:41  
---------------------------------------------------------------------- 
Well I just let buildroot do it's thing.
Normally it would always run but since last week the text relocation
problem occured. Maybe you could point me to what to edit in order to get
it working. 

---------------------------------------------------------------------- 
 psm - 04-21-06 12:26  
---------------------------------------------------------------------- 
run in the busybox directory make menuconfig, enable/disable what you want,
save
and copy .config to buildroot/package/busybox/busybox.config
for your case be sure you disabled CONFIG_BUILD_LIBBUSYBOX 

---------------------------------------------------------------------- 
 mastag - 04-22-06 05:00  
---------------------------------------------------------------------- 
I tried disabling shared libbusybox and built busybox staticly.
However it will still psnic and reboot when busybox gets executed

---------------------------------------------------
VFS: Mounted root (nfs filesystem).
Freeing unused kernel memory: 64k freed
&http://busybox.net/bugs/view.php?id=65533;BusyBox v1.2.0-pre0
(2006.04.22-11:52+0000) multi-call binary

Kernel panic - not syncing: Attempted to kill init!
 <0>Rebooting in 3 seconds..
                               or: [function] [arguments]...

        BusyBox is a multi-call binary that combines many common Unix
        utilities into a single executable.  Most people will create a
        link to busybox for each function they wish to use and BusyBox
        will act like whatever it was invoked as!

Currently defined functions:
        [, [[, addgroup, adduser, ash, basename, bunzip2, busybox, bzcat,
        cat, chgrp, chmod, chown, chroot, chvt, clear, cmp, cp, cut,
date,
        dc, dd, deallocvt, delgroup, deluser, df, dirname, dmesg,
dos2unix,
        du, dumpleases, echo, egrep, env, expr, false, fdformat, fdisk,
        fgrep, find, free, getopt, getty, grep, gunzip, gzip, halt, head,
        hexdump, hostid, hostname, hwclock, id, ifconfig, ifdown, ifup,
        init, insmod, install, kill, killall, klogd, linuxrc, ln, logger,
        login, logname, ls, lsmod, md5sum, mkdir, mknod, mktemp,
modprobe,
        more, mount, mt, mv, netstat, nslookup, openvt, passwd, pidof,
        ping, pivot_root, poweroff, ps, pwd, rdate, readlink, reboot,
        reset, rm, rmdir, rmmod, route, run-parts, sed, sh, sha1sum,
sleep,
        sort, start-stop-daemon, strings, stty, su, sulogin, swapoff,
        swapon, sync, syslogd, tail, tar, tee, telnet, test, time, touch,
        true, tty, udhcpc, udhcpd, umount, uname, uniq, unix2dos, unzip,
        uptime, usleep, uudecode, uuencode, vi, vlock, wc, wget, which,
        whoami, xargs, yes, zcat
--------------------------------------------------
It seems like it also wont run the gnu bournce shell either
(init=/bin/bash) so my guess is that uClibc is not propperly configured
for SH4. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
04-21-06 03:02  mastag         New Issue                                    
04-21-06 03:02  mastag         Status                   new => assigned     
04-21-06 03:02  mastag         Assigned To               => uClibc          
04-21-06 03:23  psm            Note Added: 0001312                          
04-21-06 03:26  psm            Note Added: 0001313                          
04-21-06 07:55  mastag         Note Added: 0001315                          
04-21-06 08:45  psm            Note Added: 0001316                          
04-21-06 11:41  mastag         Note Added: 0001317                          
04-21-06 12:26  psm            Note Added: 0001318                          
04-22-06 05:00  mastag         Note Added: 0001321                          
======================================================================




More information about the uClibc-cvs mailing list