diff --git a/build_library/base_image_util.sh b/build_library/base_image_util.sh index 84b31118c7..c53578a41b 100755 --- a/build_library/base_image_util.sh +++ b/build_library/base_image_util.sh @@ -177,6 +177,21 @@ create_base_image() { 'usr/include' 'sys-include' # Link-time objects. '*.[ao]' + # Link-time symlinks & linker scripts. + 'usr/lib*/lib*.so' + # We mount /var manually so this gets thrown away. + 'var' + # Debug commands not used by normal runtime code. + 'usr/bin/'{getent,ldd} + # LD_PRELOAD objects for debugging. + 'lib*/lib'{memusage,pcprofile,SegFault}.so 'usr/lib*/audit' + # Libraries used for translating between charsets -- but we use libicu + # in Chromium, so there's no need for these. http://crosbug.com/23105 + 'usr/*/gconv' + # We only use files & dns with nsswitch, so throw away the others. + 'lib*/libnss_'{compat,db,hesiod,nis,nisplus}'*.so*' + # This is only for very old packages which we don't have. + 'lib*/libBrokenLocale*.so*' ) pbzip2 -dc --ignore-trailing-garbage=1 "${LIBC_PATH}" | \ sudo tar xpf - -C "${root_fs_dir}" ./usr/${CHOST} \ diff --git a/build_library/dev_image_util.sh b/build_library/dev_image_util.sh index 1e9f1c1e5f..c2a27fe663 100755 --- a/build_library/dev_image_util.sh +++ b/build_library/dev_image_util.sh @@ -60,12 +60,8 @@ install_dev_packages() { # Leave core files for developers to inspect. sudo touch "${root_fs_dir}/root/.leave_core" - # This hack is only needed for devs who have old versions of glibc, which - # filtered out ldd when cross-compiling. TODO(davidjames): Remove this hack - # once everybody has upgraded to a new version of glibc. - if [[ ! -x "${root_fs_dir}/usr/bin/ldd" ]]; then - sudo cp -a "$(which ldd)" "${root_fs_dir}/usr/bin" - fi + # Release images do not include these, so install it for dev images. + sudo cp -a "${BOARD_ROOT}"/usr/bin/{getent,ldd} "${root_fs_dir}/usr/bin/" # If vim is installed, then a vi symlink would probably help. if [[ -x "${root_fs_dir}/usr/local/bin/vim" ]]; then