On 04/30/2011 12:53 PM, Denys Vlasenko wrote:
On Thursday 28 April 2011 23:49, Steve Iribarne wrote:
I'm working with 1.15.3 (we have a release out there, so this is what
I'm stuck with).

I've verified that my issue is still in the latest 1.18.4 version.  Here
is my issue:

I have both CONFIG_FEATURE_SHARED_BUSYBOX=y and CONFIG_BUILD_LIBBUSYBOX=y.


Everything was working great until I added selinux and pam.
I started getting linker errors.

======
ld-linux.so.3 needed by
/opt/tools/cs/bin/../arm-none-linux-gnueabi/libc/lib/libc.so.6
found ld-linux.so.3 at
/opt/tools/cs/bin/../arm-none-linux-gnueabi/libc/lib/ld-linux.so.3/opt/tools/cs/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/../../../../arm-none-linux-gnueabi/bin/ld:
warning: libpam.so.0, needed by 0_lib/libbusybox.so, not found (try
using -rpath or -rpath-link)
/opt/tools/cs/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/../../../../arm-none-linux-gnueabi/bin/ld:
warning: libpam_misc.so.0, needed by 0_lib/libbusybox.so, not found (try
using -rpath or -rpath-link)
/opt/tools/cs/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/../../../../arm-none-linux-gnueabi/bin/ld:
warning: libselinux.so.1, needed by 0_lib/libbusybox.so, not found (try
using -rpath or -rpath-link)
/opt/tools/cs/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/../../../../arm-none-linux-gnueabi/bin/ld:
warning: libsepol.so.1, needed by 0_lib/libbusybox.so, not found (try
using -rpath or -rpath-link)
0_lib/libbusybox.so: undefined reference to `context_role_set'
0_lib/libbusybox.so: undefined reference to `lsetfilecon'
0_lib/libbusybox.so: undefined reference to `getcon'
0_lib/libbusybox.so: undefined reference to `freecon'
0_lib/libbusybox.so: undefined reference to `pam_strerror@LIBPAM_1.0'
0_lib/libbusybox.so: undefined reference to `pam_set_item@LIBPAM_1.0'
0_lib/libbusybox.so: undefined reference to `setexeccon'
0_lib/libbusybox.so: undefined reference to `pam_open_session@LIBPAM_1.0'
0_lib/libbusybox.so: undefined reference to `context_str'
0_lib/libbusybox.so: undefined reference to `get_default_context'
.......
========


   I think I have it tracked down to scripts/trylink  around line 257.

I think it needs to include the $l_list at that point.  Otherwise those
libs aren't included.  I can give a patch if you'd like.
Yes, please send a tested patch.

Enclosed is the tested patch.


diff -crB busybox-1.15.3/scripts/trylink busybox-1.15.3.modified/scripts/trylink
*** busybox-1.15.3/scripts/trylink	2009-12-11 17:45:09.000000000 -0800
--- busybox-1.15.3.modified/scripts/trylink	2011-04-28 14:32:32.432314991 -0700
***************
*** 254,259 ****
--- 254,260 ----
  	    $GC_SECTIONS \
  	    -Wl,--start-group $O_FILES -Wl,--end-group \
  	    -L"$sharedlib_dir" -lbusybox \
+ 	    $l_list \
  	    -Wl,--warn-common \
  	    -Wl,-Map,$EXE.map \
  	    -Wl,--verbose \

_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to