diff --git a/CleanSpec.mk b/CleanSpec.mk
index 7b028ec..70a053f 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -71,13 +71,31 @@
 $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)
 $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
 $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
-$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)
-$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
-$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
-$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)
-$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
-$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/lib/*.so)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/*.so)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/symbols/system/lib/*.so)
+$(call add-clean-step, rm -rf $(HOST_OUT_EXECUTABLES)/iself)
+$(call add-clean-step, rm -rf $(HOST_OUT_EXECUTABLES)/lsd)
+$(call add-clean-step, rm -rf $(HOST_OUT_EXECUTABLES)/apriori)
+$(call add-clean-step, rm -rf $(HOST_OUT_EXECUTABLES)/isprelinked)
+$(call add-clean-step, rm -rf $(HOST_OUT_EXECUTABLES)/soslim)
 
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/lib/*.so)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/*.so)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/symbols/system/lib/*.so)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/YouTube*)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
+
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libstagefright_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libstagefright_omx_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/librtp_jni_intermediates)
+
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/android-info.txt)
 # ************************************************
 # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
 # ************************************************
diff --git a/buildspec.mk.default b/buildspec.mk.default
index 46aee69..2f84016 100644
--- a/buildspec.mk.default
+++ b/buildspec.mk.default
@@ -45,16 +45,9 @@
 #CUSTOM_MODULES:=
 endif
 
-# Uncomment this if you want the simulator, otherwise, build for arm
-ifndef TARGET_SIMULATOR
-#TARGET_SIMULATOR:=true
-endif
-
-# Set this to debug or release if you care.  Otherwise, it defaults to
-# release for arm and debug for the simulator.
+# Set this to debug or release if you care.  Otherwise, it defaults to release.
 ifndef TARGET_BUILD_TYPE
 #TARGET_BUILD_TYPE:=release
-#TARGET_BUILD_TYPE:=debug
 endif
 
 # Uncomment this if you want the host tools built in debug mode.  Otherwise
diff --git a/core/Makefile b/core/Makefile
index 7ebcbfe..14de987 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -16,17 +16,16 @@
 # e.g., "system/etc/file.xml".
 # The filter part means "only eval the copy-one-file rule if this
 # src:dest pair is the first one to match the same dest"
-unique_product_copy_files_destinations := $(sort \
-    $(foreach cf,$(PRODUCT_COPY_FILES), $(call word-colon,2,$(cf))))
+unique_product_copy_files_destinations :=
 $(foreach cf,$(PRODUCT_COPY_FILES), \
     $(eval _src := $(call word-colon,1,$(cf))) \
     $(eval _dest := $(call word-colon,2,$(cf))) \
-    $(if $(filter $(unique_product_copy_files_destinations),$(_dest)), \
+    $(if $(filter $(unique_product_copy_files_destinations),$(_dest)),, \
         $(eval _fulldest := $(call append-path,$(PRODUCT_OUT),$(_dest))) \
         $(eval $(call copy-one-file,$(_src),$(_fulldest))) \
         $(eval ALL_DEFAULT_INSTALLED_MODULES += $(_fulldest)) \
-        $(eval unique_product_copy_files_destinations := $(filter-out $(_dest), \
-            $(unique_product_copy_files_destinations)))))
+        $(eval unique_product_copy_files_destinations += $(_dest))))
+unique_product_copy_files_destinations :=
 
 # -----------------------------------------------------------------
 # docs/index.html
@@ -41,7 +40,11 @@
 INSTALLED_DEFAULT_PROP_TARGET := $(TARGET_ROOT_OUT)/default.prop
 ALL_DEFAULT_INSTALLED_MODULES += $(INSTALLED_DEFAULT_PROP_TARGET)
 ADDITIONAL_DEFAULT_PROPERTIES := \
-	$(call collapse-pairs, $(ADDITIONAL_DEFAULT_PROPERTIES))
+    $(call collapse-pairs, $(ADDITIONAL_DEFAULT_PROPERTIES))
+ADDITIONAL_DEFAULT_PROPERTIES += \
+    $(call collapse-pairs, $(PRODUCT_DEFAULT_PROPERTY_OVERRIDES))
+ADDITIONAL_DEFAULT_PROPERTIES := $(call uniq-pairs-by-first-component, \
+    $(ADDITIONAL_DEFAULT_PROPERTIES),=)
 
 $(INSTALLED_DEFAULT_PROP_TARGET):
 	@echo Target buildinfo: $@
@@ -51,13 +54,16 @@
 	        echo "#" >> $@;
 	$(hide) $(foreach line,$(ADDITIONAL_DEFAULT_PROPERTIES), \
 		echo "$(line)" >> $@;)
+	build/tools/post_process_props.py $@
 
 # -----------------------------------------------------------------
 # build.prop
 INSTALLED_BUILD_PROP_TARGET := $(TARGET_OUT)/build.prop
 ALL_DEFAULT_INSTALLED_MODULES += $(INSTALLED_BUILD_PROP_TARGET)
 ADDITIONAL_BUILD_PROPERTIES := \
-	$(call collapse-pairs, $(ADDITIONAL_BUILD_PROPERTIES))
+    $(call collapse-pairs, $(ADDITIONAL_BUILD_PROPERTIES))
+ADDITIONAL_BUILD_PROPERTIES := $(call uniq-pairs-by-first-component, \
+    $(ADDITIONAL_BUILD_PROPERTIES),=)
 
 # A list of arbitrary tags describing the build configuration.
 # Force ":=" so we can use +=
@@ -161,6 +167,7 @@
 		        echo "#" >> $@; )
 	$(hide) $(foreach line,$(ADDITIONAL_BUILD_PROPERTIES), \
 		echo "$(line)" >> $@;)
+	$(hide) build/tools/post_process_props.py $@
 
 build_desc :=
 
@@ -258,7 +265,7 @@
 DEFAULT_KEY_CERT_PAIR := $(SRC_TARGET_DIR)/product/security/testkey
 
 
-# Rules that need to be present for the simulator, even
+# Rules that need to be present for the all targets, even
 # if they don't do anything.
 .PHONY: systemimage
 systemimage:
@@ -306,8 +313,6 @@
 ALL_DEFAULT_INSTALLED_MODULES += $(event_log_tags_file)
 
 
-ifneq ($(TARGET_SIMULATOR),true)
-
 # #################################################################
 # Targets for boot/OS images
 # #################################################################
@@ -1081,7 +1086,6 @@
 target-files-package: $(BUILT_TARGET_FILES_PACKAGE)
 
 
-ifneq ($(TARGET_SIMULATOR),true)
 ifneq ($(TARGET_PRODUCT),sdk)
 ifeq ($(filter generic%,$(TARGET_DEVICE)),)
 ifneq ($(TARGET_NO_KERNEL),true)
@@ -1142,7 +1146,6 @@
 endif    # TARGET_NO_KERNEL != true
 endif    # TARGET_DEVICE != generic*
 endif    # TARGET_PRODUCT != sdk
-endif    # TARGET_SIMULATOR != true
 
 # -----------------------------------------------------------------
 # installed file list
@@ -1262,8 +1265,6 @@
 	$(hide) find $(TARGET_COMMON_OUT_ROOT) -name "coverage.em" | \
 		zip -@ -q $@
 
-endif	# TARGET_SIMULATOR != true
-
 # -----------------------------------------------------------------
 # dalvik something
 .PHONY: dalvikfiles
@@ -1272,8 +1273,6 @@
 # -----------------------------------------------------------------
 # The emulator package
 
-ifneq ($(TARGET_SIMULATOR),true)
-
 INTERNAL_EMULATOR_PACKAGE_FILES += \
         $(HOST_OUT_EXECUTABLES)/emulator$(HOST_EXECUTABLE_SUFFIX) \
         prebuilt/android-$(TARGET_ARCH)/kernel/kernel-qemu \
@@ -1289,8 +1288,6 @@
 	@echo "Package: $@"
 	$(hide) zip -qj $@ $(INTERNAL_EMULATOR_PACKAGE_FILES)
 
-endif
-
 # -----------------------------------------------------------------
 # The pdk package (Platform Development Kit)
 
@@ -1301,8 +1298,6 @@
 # -----------------------------------------------------------------
 # The SDK
 
-ifneq ($(TARGET_SIMULATOR),true)
-
 # The SDK includes host-specific components, so it belongs under HOST_OUT.
 sdk_dir := $(HOST_OUT)/sdk
 
@@ -1445,8 +1440,6 @@
 include $(TOPDIR)development/build/tools/windows_sdk.mk
 endif
 
-endif # !simulator
-
 # -----------------------------------------------------------------
 # Findbugs
 INTERNAL_FINDBUGS_XML_TARGET := $(PRODUCT_OUT)/findbugs.xml
diff --git a/core/apicheck_msg_current.txt b/core/apicheck_msg_current.txt
index 5d3a913..440e7f8 100644
--- a/core/apicheck_msg_current.txt
+++ b/core/apicheck_msg_current.txt
@@ -6,10 +6,10 @@
    1) You can add "@hide" javadoc comments to the methods, etc. listed in the
       errors above.
 
-   2) You can update current.xml by executing the following command:
+   2) You can update current.txt by executing the following command:
          make update-api
 
-      To submit the revised current.xml to the main Android repository,
+      To submit the revised current.txt to the main Android repository,
       you will need approval.
 ******************************
 
diff --git a/core/base_rules.mk b/core/base_rules.mk
index 25564b2..635a256 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -234,7 +234,7 @@
 endif # LOCAL_SDK_VERSION
 $(aidl_java_sources): PRIVATE_AIDL_FLAGS := -b $(addprefix -p,$(aidl_preprocess_import)) -I$(LOCAL_PATH) -I$(LOCAL_PATH)/src $(addprefix -I,$(LOCAL_AIDL_INCLUDES))
 
-$(aidl_java_sources): $(intermediates.COMMON)/src/%.java: $(TOPDIR)$(LOCAL_PATH)/%.aidl $(PRIVATE_ADDITIONAL_DEPENDENCIES) $(AIDL) $(aidl_preprocess_import)
+$(aidl_java_sources): $(intermediates.COMMON)/src/%.java: $(TOPDIR)$(LOCAL_PATH)/%.aidl $(LOCAL_ADDITIONAL_DEPENDENCIES) $(AIDL) $(aidl_preprocess_import)
 	$(transform-aidl-to-java)
 -include $(aidl_java_sources:%.java=%.P)
 
@@ -368,10 +368,11 @@
 	) \
     )
   # The arguments to jar that will include these files in a jar file.
+  # Quote the file name to handle special characters (such as #) correctly.
   extra_jar_args := \
     $(foreach group,$(java_resource_file_groups), \
-	$(addprefix -C $(word 1,$(subst :,$(space),$(group))) , \
-	    $(wordlist 2,9999,$(subst :,$(space),$(group))) \
+	$(addprefix -C "$(word 1,$(subst :,$(space),$(group)))" , \
+	    $(foreach w, $(wordlist 2,9999,$(subst :,$(space),$(group))), "$(w)" ) \
 	) \
     )
   java_resource_file_groups :=
diff --git a/core/binary.mk b/core/binary.mk
index f81cc5e..dadfd5e 100644
--- a/core/binary.mk
+++ b/core/binary.mk
@@ -9,10 +9,6 @@
 ## Sanity check for LOCAL_NDK_VERSION
 ######################################
 my_ndk_version_root :=
-ifeq ($(TARGET_SIMULATOR),true)
-  # NDK does not support sim build.
-  LOCAL_NDK_VERSION :=
-endif
 ifdef LOCAL_NDK_VERSION
   ifdef LOCAL_IS_HOST_MODULE
     $(error $(LOCAL_PATH): LOCAL_NDK_VERSION can not be used in host module)
@@ -137,6 +133,12 @@
 endif
 endif
 
+ifeq (true,$(LOCAL_GROUP_STATIC_LIBRARIES))
+$(LOCAL_BUILT_MODULE): PRIVATE_GROUP_STATIC_LIBRARIES := true
+else
+$(LOCAL_BUILT_MODULE): PRIVATE_GROUP_STATIC_LIBRARIES :=
+endif
+
 ###########################################################
 ## Define arm-vs-thumb-mode flags.
 ###########################################################
@@ -266,7 +268,7 @@
 ## C++: Compile .cpp files to .o.
 ###########################################################
 
-# we also do this on host modules and sim builds, even though
+# we also do this on host modules, even though
 # it's not really arm, because there are files that are shared.
 cpp_arm_sources    := $(patsubst %$(LOCAL_CPP_EXTENSION).arm,%$(LOCAL_CPP_EXTENSION),$(filter %$(LOCAL_CPP_EXTENSION).arm,$(LOCAL_SRC_FILES)))
 cpp_arm_objects    := $(addprefix $(intermediates)/,$(cpp_arm_sources:$(LOCAL_CPP_EXTENSION)=.o))
@@ -378,7 +380,7 @@
 objc_objects := $(addprefix $(intermediates)/,$(objc_sources:.m=.o))
 
 ifneq ($(strip $(objc_objects)),)
-$(objc_objects): $(intermediates)/%.o: $(TOPDIR)$(LOCAL_PATH)/%.m $(yacc_cpps) $(proto_generated_headers) $(PRIVATE_ADDITIONAL_DEPENDENCIES)
+$(objc_objects): $(intermediates)/%.o: $(TOPDIR)$(LOCAL_PATH)/%.m $(yacc_cpps) $(proto_generated_headers) $(LOCAL_ADDITIONAL_DEPENDENCIES)
 	$(transform-$(PRIVATE_HOST)m-to-o)
 -include $(objc_objects:%.o=%.P)
 endif
@@ -568,6 +570,11 @@
     $(foreach lib,$(LOCAL_STATIC_LIBRARIES) $(LOCAL_WHOLE_STATIC_LIBRARIES), \
       NOTICE-$(if $(LOCAL_IS_HOST_MODULE),HOST,TARGET)-STATIC_LIBRARIES-$(lib))
 
+# Default is -fno-rtti.
+ifeq ($(strip $(LOCAL_RTTI_FLAG)),)
+LOCAL_RTTI_FLAG := -fno-rtti
+endif
+
 ###########################################################
 # Rule-specific variable definitions
 ###########################################################
@@ -575,6 +582,7 @@
 $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_ASFLAGS := $(LOCAL_ASFLAGS)
 $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_CFLAGS := $(LOCAL_CFLAGS)
 $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_CPPFLAGS := $(LOCAL_CPPFLAGS)
+$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_RTTI_FLAG := $(LOCAL_RTTI_FLAG)
 $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_DEBUG_CFLAGS := $(debug_cflags)
 $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_C_INCLUDES := $(LOCAL_C_INCLUDES)
 $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_LDFLAGS := $(LOCAL_LDFLAGS)
diff --git a/core/build-system.html b/core/build-system.html
index e547185..760589a 100644
--- a/core/build-system.html
+++ b/core/build-system.html
@@ -516,16 +516,8 @@
 </tr>
 </table>
 
-<h4>TARGET_SIMULATOR</h4>
-<p>If we're building the simulator, as opposed to the arm or emulator builds,
-<code>TARGET_SIMULATOR</code> will be set to <code>true</code>.
-
 <h4>Some Examples</h4>
-<pre>ifeq ($(TARGET_SIMULATOR),true)
-LOCAL_CFLAGS += -DSIMULATOR
-endif
-
-ifeq ($(TARGET_BUILD_TYPE),release)
+<pre>ifeq ($(TARGET_BUILD_TYPE),release)
 LOCAL_CFLAGS += -DNDEBUG=1
 endif
 
diff --git a/core/cleanbuild.mk b/core/cleanbuild.mk
index 821b03a..2639cae 100644
--- a/core/cleanbuild.mk
+++ b/core/cleanbuild.mk
@@ -117,13 +117,13 @@
   building_sdk :=
 endif
 
-# A change in the list of locales warrants an installclean, too.
-locale_list := $(subst $(space),$(comma),$(strip $(PRODUCT_LOCALES)))
+# A change in the list of aapt configs warrants an installclean, too.
+aapt_config_list := $(strip $(PRODUCT_AAPT_CONFIG))
 
 current_build_config := \
-    $(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT)$(building_sdk)-{$(locale_list)}
+    $(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT)$(building_sdk)-{$(aapt_config_list)}
 building_sdk :=
-locale_list :=
+aapt_config_list :=
 force_installclean := false
 
 # Read the current state from the file, if present.
diff --git a/core/clear_vars.mk b/core/clear_vars.mk
index 2d8c15a..bc085f5 100644
--- a/core/clear_vars.mk
+++ b/core/clear_vars.mk
@@ -27,6 +27,8 @@
 LOCAL_PREBUILT_OBJ_FILES:=
 LOCAL_STATIC_JAVA_LIBRARIES:=
 LOCAL_STATIC_LIBRARIES:=
+# Group static libraries with "-Wl,--start-group" and "-Wl,--end-group" when linking.
+LOCAL_GROUP_STATIC_LIBRARIES:=
 LOCAL_WHOLE_STATIC_LIBRARIES:=
 LOCAL_SHARED_LIBRARIES:=
 LOCAL_IS_HOST_MODULE:=
@@ -40,6 +42,7 @@
 LOCAL_ASFLAGS:=
 LOCAL_CFLAGS:=
 LOCAL_CPPFLAGS:=
+LOCAL_RTTI_FLAG:=
 LOCAL_C_INCLUDES:=
 LOCAL_LDFLAGS:=
 LOCAL_LDLIBS:=
@@ -75,7 +78,6 @@
 LOCAL_COPY_HEADERS:=
 LOCAL_FORCE_STATIC_EXECUTABLE:=
 LOCAL_ADDITIONAL_DEPENDENCIES:=
-LOCAL_PRELINK_MODULE:=
 LOCAL_COMPRESS_MODULE_SYMBOLS:=
 LOCAL_STRIP_MODULE:=
 LOCAL_POST_PROCESS_COMMAND:=true
diff --git a/core/combo/HOST_darwin-x86.mk b/core/combo/HOST_darwin-x86.mk
index b829108..544a29e 100644
--- a/core/combo/HOST_darwin-x86.mk
+++ b/core/combo/HOST_darwin-x86.mk
@@ -66,7 +66,9 @@
         $(PRIVATE_ALL_OBJECTS) \
         $(call normalize-host-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
         $(call normalize-host-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
+        $(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--start-group) \
         $(call normalize-host-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
+        $(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--end-group) \
         $(PRIVATE_LDLIBS) \
         -o $@ \
         $(PRIVATE_LDFLAGS) \
@@ -82,7 +84,9 @@
         $(call normalize-host-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
         $(PRIVATE_ALL_OBJECTS) \
         $(call normalize-host-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
+        $(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--start-group) \
         $(call normalize-host-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
+        $(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--end-group) \
         $(PRIVATE_LDFLAGS) \
         $(PRIVATE_LDLIBS) \
         $(HOST_LIBGCC)
diff --git a/core/combo/HOST_linux-x86.mk b/core/combo/HOST_linux-x86.mk
index c871613..5ae4972 100644
--- a/core/combo/HOST_linux-x86.mk
+++ b/core/combo/HOST_linux-x86.mk
@@ -45,13 +45,8 @@
 # We build everything in 32-bit, because some host tools are
 # 32-bit-only anyway (emulator, acc), and because it gives us
 # more consistency between the host tools and the target.
-# The exception is the host side of the simulator, which
-# requires to use the default size, as wxWidgets code otherwise
-# fails to build.
-ifneq ($(TARGET_SIMULATOR),true)
 HOST_GLOBAL_CFLAGS += -m32
 HOST_GLOBAL_LDFLAGS += -m32
-endif
 
 HOST_GLOBAL_CFLAGS += -fPIC
 HOST_GLOBAL_CFLAGS += \
diff --git a/core/combo/TARGET_linux-arm.mk b/core/combo/TARGET_linux-arm.mk
index c332b41..9748187 100644
--- a/core/combo/TARGET_linux-arm.mk
+++ b/core/combo/TARGET_linux-arm.mk
@@ -55,8 +55,13 @@
     TARGET_AR := $(TARGET_TOOLS_PREFIX)ar$(HOST_EXECUTABLE_SUFFIX)
     TARGET_OBJCOPY := $(TARGET_TOOLS_PREFIX)objcopy$(HOST_EXECUTABLE_SUFFIX)
     TARGET_LD := $(TARGET_TOOLS_PREFIX)ld$(HOST_EXECUTABLE_SUFFIX)
-    TARGET_STRIP := $(HOST_OUT_EXECUTABLES)/soslim$(HOST_EXECUTABLE_SUFFIX)
-    TARGET_STRIP_COMMAND = $(TARGET_STRIP) --strip --shady --quiet $< --outfile $@
+    TARGET_STRIP := $(TARGET_TOOLS_PREFIX)strip$(HOST_EXECUTABLE_SUFFIX)
+    ifeq ($(TARGET_BUILD_VARIANT),user)
+        TARGET_STRIP_COMMAND = $(TARGET_STRIP) --strip-all $< -o $@
+    else
+        TARGET_STRIP_COMMAND = $(TARGET_STRIP) --strip-all $< -o $@ && \
+	    $(TARGET_OBJCOPY) --add-gnu-debuglink=$< $@
+    endif
 endif
 
 TARGET_NO_UNDEFINED_LDFLAGS := -Wl,--no-undefined
@@ -241,7 +246,9 @@
 	-Wl,--whole-archive \
 	$(call normalize-target-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
 	-Wl,--no-whole-archive \
+	$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--start-group) \
 	$(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
+	$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--end-group) \
 	$(call normalize-target-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
 	-o $@ \
 	$(PRIVATE_TARGET_GLOBAL_LDFLAGS) \
@@ -262,7 +269,9 @@
 	$(call normalize-target-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
 	$(if $(filter true,$(PRIVATE_NO_CRT)),,$(TARGET_CRTBEGIN_DYNAMIC_O)) \
 	$(PRIVATE_ALL_OBJECTS) \
+	$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--start-group) \
 	$(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
+	$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--end-group) \
 	$(TARGET_GLOBAL_LDFLAGS) \
 	$(PRIVATE_LDFLAGS) \
 	$(TARGET_FDO_LIB) \
diff --git a/core/combo/TARGET_linux-sh.mk b/core/combo/TARGET_linux-sh.mk
index 654539c..b8e00dd 100644
--- a/core/combo/TARGET_linux-sh.mk
+++ b/core/combo/TARGET_linux-sh.mk
@@ -29,7 +29,13 @@
 TARGET_OBJCOPY := $(TARGET_TOOLS_PREFIX)objcopy$(HOST_EXECUTABLE_SUFFIX)
 TARGET_LD := $(TARGET_TOOLS_PREFIX)ld$(HOST_EXECUTABLE_SUFFIX)
 TARGET_STRIP := $(TARGET_TOOLS_PREFIX)strip$(HOST_EXECUTABLE_SUFFIX)
+
+ifeq ($(TARGET_BUILD_VARIANT),user)
 TARGET_STRIP_COMMAND = $(TARGET_STRIP) --strip-debug $< -o $@
+else
+TARGET_STRIP_COMMAND = $(TARGET_STRIP) --strip-debug $< -o $@ && \
+	$(TARGET_OBJCOPY) --add-gnu-debuglink=$< $@
+endif
 
 TARGET_NO_UNDEFINED_LDFLAGS := -Wl,--no-undefined
 
@@ -125,7 +131,9 @@
 	-Wl,--whole-archive \
 	$(call normalize-target-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
 	-Wl,--no-whole-archive \
+	$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--start-group) \
 	$(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
+	$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--end-group) \
 	$(call normalize-target-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
 	-o $@ \
 	$(PRIVATE_LDFLAGS) \
@@ -145,7 +153,9 @@
 	$(call normalize-target-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
 	$(if $(filter true,$(PRIVATE_NO_CRT)),,$(TARGET_CRTBEGIN_DYNAMIC_O)) \
 	$(PRIVATE_ALL_OBJECTS) \
+	$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--start-group) \
 	$(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
+	$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--end-group) \
 	$(PRIVATE_LDFLAGS) \
 	$(TARGET_LIBGCC) \
 	$(subst -lrt,, $(subst -lpthread,,$(PRIVATE_LDLIBS))) \
@@ -160,7 +170,9 @@
 	$(if $(filter true,$(PRIVATE_NO_CRT)),,$(TARGET_CRTBEGIN_STATIC_O)) \
 	$(PRIVATE_LDFLAGS) \
 	$(PRIVATE_ALL_OBJECTS) \
+	-Wl,--start-group \
 	$(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
+	-Wl,--end-group \
 	$(TARGET_LIBGCC) \
 	$(subst -lrt,, $(subst -lpthread,,$(PRIVATE_LDLIBS))) \
 	$(if $(filter true,$(PRIVATE_NO_CRT)),,$(TARGET_CRTEND_O))
diff --git a/core/combo/TARGET_linux-x86.mk b/core/combo/TARGET_linux-x86.mk
index 98a5f2b..0d05dd2 100644
--- a/core/combo/TARGET_linux-x86.mk
+++ b/core/combo/TARGET_linux-x86.mk
@@ -17,19 +17,6 @@
 # Configuration for Linux on x86 as a target.
 # Included by combo/select.mk
 
-ifeq ($(TARGET_SIMULATOR),true)
-# When building for the simulator, use the HOST settings as TARGET settings
-TARGET_CC := $(HOST_CC)
-TARGET_CXX := $(HOST_CXX)
-TARGET_AR := $(HOST_AR)
-TARGET_GLOBAL_CFLAGS := $(HOST_GLOBAL_CFLAGS) -m32
-TARGET_GLOBAL_LDFLAGS := $(HOST_GLOBAL_LDFLAGS) -m32 -lpthread
-TARGET_NO_UNDEFINED_LDFLAGS := $(HOST_NO_UNDEFINED_LDFLAGS)
-ifeq ($(strip $(TARGET_ARCH_VARIANT)),)
-TARGET_ARCH_VARIANT := x86
-endif
-else #simulator
-
 # Provide a default variant.
 ifeq ($(strip $(TARGET_ARCH_VARIANT)),)
 TARGET_ARCH_VARIANT := x86
@@ -47,7 +34,13 @@
 TARGET_OBJCOPY := $(TARGET_TOOLS_PREFIX)objcopy$(HOST_EXECUTABLE_SUFFIX)
 TARGET_LD := $(TARGET_TOOLS_PREFIX)ld$(HOST_EXECUTABLE_SUFFIX)
 TARGET_STRIP := $(TARGET_TOOLS_PREFIX)strip$(HOST_EXECUTABLE_SUFFIX)
+
+ifeq ($(TARGET_BUILD_VARIANT),user)
 TARGET_STRIP_COMMAND = $(TARGET_STRIP) --strip-debug $< -o $@
+else
+TARGET_STRIP_COMMAND = $(TARGET_STRIP) --strip-debug $< -o $@ && \
+	$(TARGET_OBJCOPY) --add-gnu-debuglink=$< $@
+endif
 
 ifneq ($(wildcard $(TARGET_CC)),)
 TARGET_LIBGCC := \
@@ -91,7 +84,9 @@
 			-funwind-tables \
 			-include $(call select-android-config-h,target_linux-x86)
 
-TARGET_GLOBAL_CFLAGS += -fstack-protector
+# Needs to be fixed later
+#TARGET_GLOBAL_CFLAGS += \
+#			-fstack-protector
 
 # Needs to be added for RELEASE
 #TARGET_GLOBAL_CFLAGS += \
@@ -150,7 +145,9 @@
 	-Wl,--whole-archive \
 	$(call normalize-target-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
 	-Wl,--no-whole-archive \
+	$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--start-group) \
 	$(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
+	$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--end-group) \
 	$(call normalize-target-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
 	-o $@ \
 	$(PRIVATE_LDFLAGS) \
@@ -171,7 +168,9 @@
 	$(call normalize-target-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
 	$(if $(filter true,$(PRIVATE_NO_CRT)),,$(TARGET_CRTBEGIN_DYNAMIC_O)) \
 	$(PRIVATE_ALL_OBJECTS) \
+	$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--start-group) \
 	$(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
+	$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--end-group) \
 	$(PRIVATE_LDFLAGS) \
 	$(TARGET_LIBGCC) \
 	$(if $(filter true,$(PRIVATE_NO_CRT)),,$(TARGET_CRTEND_O))
@@ -192,5 +191,3 @@
 	-Wl,--end-group \
 	$(if $(filter true,$(PRIVATE_NO_CRT)),,$(TARGET_CRTEND_O))
 endef
-
-endif #simulator
diff --git a/core/combo/select.mk b/core/combo/select.mk
index d486255..cdeb68a 100644
--- a/core/combo/select.mk
+++ b/core/combo/select.mk
@@ -56,8 +56,6 @@
 $(combo_target)JNILIB_SUFFIX := $($(combo_target)SHLIB_SUFFIX)
 $(combo_target)STATIC_LIB_SUFFIX := .a
 
-$(combo_target)PRELINKER_MAP := $(BUILD_SYSTEM)/prelink-$(combo_os_arch).map
-
 # Now include the combo for this specific target.
 include $(BUILD_COMBOS)/$(combo_target)$(combo_os_arch).mk
 
diff --git a/core/config.mk b/core/config.mk
index 2a8a05b..0951777 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -102,12 +102,14 @@
 # list of flags to turn specific warnings in to errors
 TARGET_ERROR_FLAGS := -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point
 
+# Temporarily turn off Wunsed-but-set-variables warning in gcc-4.6
+# since this warning becomes an error in dalvik, core and renderscript.
+# This is ignored by gcc-4.4.x.
+TARGET_ERROR_FLAGS += -Wno-unused-but-set-variable
+
 # TODO: do symbol compression
 TARGET_COMPRESS_MODULE_SYMBOLS := false
 
-# Default is to prelink modules.
-TARGET_PRELINK_MODULE := true
-
 # Default shell is mksh. Other possible value is ash.
 TARGET_SHELL := mksh
 
@@ -236,10 +238,6 @@
 LOCALIZE := $(HOST_OUT_EXECUTABLES)/localize$(HOST_EXECUTABLE_SUFFIX)
 EMMA_JAR := external/emma/lib/emma$(COMMON_JAVA_PACKAGE_SUFFIX)
 
-# Binary prelinker/compressor tools
-APRIORI := $(HOST_OUT_EXECUTABLES)/apriori$(HOST_EXECUTABLE_SUFFIX)
-LSD := $(HOST_OUT_EXECUTABLES)/lsd$(HOST_EXECUTABLE_SUFFIX)
-
 # Deal with archaic version of bison on Mac OS X.
 ifeq ($(filter 1.28,$(shell $(YACC) -V)),)
 YACC_HEADER_SUFFIX:= .hpp
@@ -290,6 +288,11 @@
 MD5SUM:=md5sum
 endif
 
+APICHECK_CLASSPATH := $(HOST_JDK_TOOLS_JAR)
+APICHECK_CLASSPATH := $(APICHECK_CLASSPATH):$(HOST_OUT_JAVA_LIBRARIES)/doclava$(COMMON_JAVA_PACKAGE_SUFFIX)
+APICHECK_CLASSPATH := $(APICHECK_CLASSPATH):$(HOST_OUT_JAVA_LIBRARIES)/jsilver$(COMMON_JAVA_PACKAGE_SUFFIX)
+APICHECK_COMMAND := $(APICHECK) -JXmx1024m -J"classpath $(APICHECK_CLASSPATH)"
+
 # ###############################################################
 # Set up final options.
 # ###############################################################
@@ -314,13 +317,9 @@
 
 # Many host compilers don't support these flags, so we have to make
 # sure to only specify them for the target compilers checked in to
-# the source tree. The simulator passes the target flags to the
-# host compiler, so only set them for the target when the target
-# is not the simulator.
-ifneq ($(TARGET_SIMULATOR),true)
+# the source tree.
 TARGET_GLOBAL_CFLAGS += $(TARGET_ERROR_FLAGS)
 TARGET_GLOBAL_CPPFLAGS += $(TARGET_ERROR_FLAGS)
-endif
 
 HOST_GLOBAL_CFLAGS += $(HOST_RELEASE_CFLAGS)
 HOST_GLOBAL_CPPFLAGS += $(HOST_RELEASE_CPPFLAGS)
@@ -362,14 +361,10 @@
     $(patsubst $(HISTORICAL_NDK_VERSIONS_ROOT)/android-ndk-r%,%, \
     $(wildcard $(HISTORICAL_NDK_VERSIONS_ROOT)/android-ndk-r*)))
 
-INTERNAL_PLATFORM_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/public_api.xml
+INTERNAL_PLATFORM_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/public_api.txt
 
 # This is the standard way to name a directory containing prebuilt target
 # objects. E.g., prebuilt/$(TARGET_PREBUILT_TAG)/libc.so
-ifeq ($(TARGET_SIMULATOR),true)
-  TARGET_PREBUILT_TAG := $(TARGET_OS)-$(TARGET_ARCH)
-else
-  TARGET_PREBUILT_TAG := android-$(TARGET_ARCH)
-endif
+TARGET_PREBUILT_TAG := android-$(TARGET_ARCH)
 
 include $(BUILD_SYSTEM)/dumpvar.mk
diff --git a/core/definitions.mk b/core/definitions.mk
index 48c4aed..4c499ad 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -66,7 +66,7 @@
 # These all have an order-only dependency on the copied headers
 ALL_C_CPP_ETC_OBJECTS:=
 
-# The list of dynamic binaries that haven't been stripped/compressed/prelinked.
+# The list of dynamic binaries that haven't been stripped/compressed/etc.
 ALL_ORIGINAL_DYNAMIC_BINARIES:=
 
 # These files go into the SDK
@@ -600,6 +600,21 @@
 endef
 
 ###########################################################
+## Given a list of pairs, if multiple pairs have the same
+## first components, keep only the first pair.
+##
+## $(1): list of pairs
+## $(2): the separator word, such as ":", "=", etc.
+define uniq-pairs-by-first-component
+$(eval _upbfc_fc_set :=)\
+$(strip $(foreach w,$(1), $(eval _first := $(word 1,$(subst $(2),$(space),$(w))))\
+    $(if $(filter $(_upbfc_fc_set),$(_first)),,$(w)\
+        $(eval _upbfc_fc_set += $(_first)))))\
+$(eval _upbfc_fc_set :=)\
+$(eval _first:=)
+endef
+
+###########################################################
 ## MODULE_TAG set operations
 ###########################################################
 
@@ -856,22 +871,19 @@
 @mkdir -p $(dir $@)
 @echo "target $(PRIVATE_ARM_MODE) C++: $(PRIVATE_MODULE) <= $<"
 $(hide) $(PRIVATE_CXX) \
-	$(foreach incdir, \
-	    $(PRIVATE_C_INCLUDES) \
+	$(addprefix -I , $(PRIVATE_C_INCLUDES)) \
+	$(addprefix -isystem ,\
 	    $(if $(PRIVATE_NO_DEFAULT_COMPILER_FLAGS),, \
-		$(PRIVATE_TARGET_PROJECT_INCLUDES) \
-		$(PRIVATE_TARGET_C_INCLUDES) \
-	     ) \
-	  , \
-	    -I $(incdir) \
-	 ) \
+	        $(filter-out $(PRIVATE_C_INCLUDES), \
+	            $(PRIVATE_TARGET_PROJECT_INCLUDES) \
+	            $(PRIVATE_TARGET_C_INCLUDES)))) \
 	-c \
 	$(if $(PRIVATE_NO_DEFAULT_COMPILER_FLAGS),, \
 	    $(PRIVATE_TARGET_GLOBAL_CFLAGS) \
 	    $(PRIVATE_TARGET_GLOBAL_CPPFLAGS) \
 	    $(PRIVATE_ARM_CFLAGS) \
 	 ) \
-	-fno-rtti \
+	$(PRIVATE_RTTI_FLAG) \
 	$(PRIVATE_CFLAGS) \
 	$(PRIVATE_CPPFLAGS) \
 	$(PRIVATE_DEBUG_CFLAGS) \
@@ -888,15 +900,12 @@
 define transform-c-or-s-to-o-no-deps
 @mkdir -p $(dir $@)
 $(hide) $(PRIVATE_CC) \
-	$(foreach incdir, \
-	    $(PRIVATE_C_INCLUDES) \
+	$(addprefix -I , $(PRIVATE_C_INCLUDES)) \
+	$(addprefix -isystem ,\
 	    $(if $(PRIVATE_NO_DEFAULT_COMPILER_FLAGS),, \
-		$(PRIVATE_TARGET_PROJECT_INCLUDES) \
-		$(PRIVATE_TARGET_C_INCLUDES) \
-	     ) \
-	  , \
-	    -I $(incdir) \
-	 ) \
+	        $(filter-out $(PRIVATE_C_INCLUDES), \
+	            $(PRIVATE_TARGET_PROJECT_INCLUDES) \
+	            $(PRIVATE_TARGET_C_INCLUDES)))) \
 	-c \
 	$(if $(PRIVATE_NO_DEFAULT_COMPILER_FLAGS),, \
 	    $(PRIVATE_TARGET_GLOBAL_CFLAGS) \
@@ -952,15 +961,12 @@
 @mkdir -p $(dir $@)
 @echo "host C++: $(PRIVATE_MODULE) <= $<"
 $(hide) $(PRIVATE_CXX) \
-	$(foreach incdir, \
-	    $(PRIVATE_C_INCLUDES) \
+	$(addprefix -I , $(PRIVATE_C_INCLUDES)) \
+	$(addprefix -isystem ,\
 	    $(if $(PRIVATE_NO_DEFAULT_COMPILER_FLAGS),, \
-		$(HOST_PROJECT_INCLUDES) \
-		$(HOST_C_INCLUDES) \
-	     ) \
-	  , \
-	    -I $(incdir) \
-	 ) \
+	        $(filter-out $(PRIVATE_C_INCLUDES), \
+	            $(HOST_PROJECT_INCLUDES) \
+	            $(HOST_C_INCLUDES)))) \
 	-c \
 	$(if $(PRIVATE_NO_DEFAULT_COMPILER_FLAGS),, \
 	    $(HOST_GLOBAL_CFLAGS) \
@@ -982,15 +988,12 @@
 define transform-host-c-or-s-to-o-no-deps
 @mkdir -p $(dir $@)
 $(hide) $(PRIVATE_CC) \
-	$(foreach incdir, \
-	    $(PRIVATE_C_INCLUDES) \
+	$(addprefix -I , $(PRIVATE_C_INCLUDES)) \
+	$(addprefix -isystem ,\
 	    $(if $(PRIVATE_NO_DEFAULT_COMPILER_FLAGS),, \
-		$(HOST_PROJECT_INCLUDES) \
-		$(HOST_C_INCLUDES) \
-	     ) \
-	  , \
-	    -I $(incdir) \
-	 ) \
+	        $(filter-out $(PRIVATE_C_INCLUDES), \
+	            $(HOST_PROJECT_INCLUDES) \
+	            $(HOST_C_INCLUDES)))) \
 	-c \
 	$(if $(PRIVATE_NO_DEFAULT_COMPILER_FLAGS),, \
 	    $(HOST_GLOBAL_CFLAGS) \
@@ -1143,7 +1146,9 @@
 	-Wl,--whole-archive \
 	$(call normalize-host-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
 	-Wl,--no-whole-archive \
+	$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--start-group) \
 	$(call normalize-host-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
+	$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--end-group) \
 	$(call normalize-host-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
 	-o $@ \
 	$(PRIVATE_LDLIBS)
@@ -1191,7 +1196,9 @@
 	-Wl,--whole-archive \
 	$(call normalize-target-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
 	-Wl,--no-whole-archive \
+	$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--start-group) \
 	$(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
+	$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--end-group) \
 	$(call normalize-target-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
 	-o $@ \
 	$(PRIVATE_LDLIBS)
@@ -1221,17 +1228,6 @@
 $(hide) $(TARGET_STRIP_COMMAND)
 endef
 
-define transform-to-prelinked
-@mkdir -p $(dir $@)
-@echo "target Prelink: $(PRIVATE_MODULE) ($@)"
-$(hide) $(APRIORI) \
-		--prelinkmap $(TARGET_PRELINKER_MAP) \
-		--locals-only \
-		--quiet \
-		$< \
-		--output $@
-endef
-
 
 ###########################################################
 ## Commands for running gcc to link an executable
@@ -1251,7 +1247,9 @@
 	-Wl,--whole-archive \
 	$(call normalize-target-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
 	-Wl,--no-whole-archive \
+	$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--start-group) \
 	$(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
+	$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--end-group) \
 	$(call normalize-target-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
 	-o $@ \
 	$(PRIVATE_LDLIBS)
@@ -1302,7 +1300,9 @@
 	-Wl,--whole-archive \
 	$(call normalize-host-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
 	-Wl,--no-whole-archive \
+	$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--start-group) \
 	$(call normalize-host-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
+	$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--end-group) \
 	$(call normalize-host-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
 	-o $@ \
 	$(PRIVATE_LDLIBS)
@@ -1333,12 +1333,12 @@
 # Maybe we should just use approach (1).
 
 # This rule creates the R.java and Manifest.java files, both of which
-# are PRODUCT-neutral.  Don't pass PRODUCT_AAPT_CONFIG to this invocation.
+# are PRODUCT-neutral.  Don't pass PRIVATE_PRODUCT_AAPT_CONFIG to this invocation.
 define create-resource-java-files
 @mkdir -p $(PRIVATE_SOURCE_INTERMEDIATES_DIR)
 @mkdir -p $(dir $(PRIVATE_RESOURCE_PUBLICS_OUTPUT))
 $(hide) $(AAPT) package $(PRIVATE_AAPT_FLAGS) -m \
-    $(eval # PRODUCT_AAPT_CONFIG is intentionally missing-- see comment.) \
+    $(eval # PRIVATE_PRODUCT_AAPT_CONFIG is intentionally missing-- see comment.) \
     $(addprefix -J , $(PRIVATE_SOURCE_INTERMEDIATES_DIR)) \
     $(addprefix -M , $(PRIVATE_ANDROID_MANIFEST)) \
     $(addprefix -P , $(PRIVATE_RESOURCE_PUBLICS_OUTPUT)) \
@@ -1346,8 +1346,8 @@
     $(addprefix -A , $(PRIVATE_ASSET_DIR)) \
     $(addprefix -I , $(PRIVATE_AAPT_INCLUDES)) \
     $(addprefix -G , $(PRIVATE_PROGUARD_OPTIONS_FILE)) \
-    $(addprefix --min-sdk-version , $(DEFAULT_APP_TARGET_SDK)) \
-    $(addprefix --target-sdk-version , $(DEFAULT_APP_TARGET_SDK)) \
+    $(addprefix --min-sdk-version , $(PRIVATE_DEFAULT_APP_TARGET_SDK)) \
+    $(addprefix --target-sdk-version , $(PRIVATE_DEFAULT_APP_TARGET_SDK)) \
     $(if $(filter --version-code,$(PRIVATE_AAPT_FLAGS)),,$(addprefix --version-code , $(PLATFORM_SDK_VERSION))) \
     $(if $(filter --version-name,$(PRIVATE_AAPT_FLAGS)),,$(addprefix --version-name , $(PLATFORM_VERSION)-$(BUILD_NUMBER))) \
     $(addprefix --rename-manifest-package , $(PRIVATE_MANIFEST_PACKAGE_NAME)) \
@@ -1360,6 +1360,12 @@
 xlint_unchecked := -Xlint:unchecked
 endif
 
+ifeq (true, $(ENABLE_INCREMENTALJAVAC))
+incremental_dex := --incremental
+else
+incremental_dex :=
+endif
+
 # emit-line, <word list>, <output file>
 define emit-line
    $(if $(1),echo -n '$(strip $(1)) ' >> $(2))
@@ -1435,7 +1441,7 @@
 fi
 $(hide) tr ' ' '\n' < $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list \
     | sort -u > $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list-uniq
-$(hide) $(1) -encoding ascii \
+$(hide) $(1) -encoding UTF-8 \
     $(strip $(PRIVATE_JAVAC_DEBUG_FLAGS)) \
     $(if $(findstring true,$(LOCAL_WARNINGS_ENABLE)),$(xlint_unchecked),) \
     $(2) \
@@ -1477,7 +1483,7 @@
 @echo "(Incremental) build source files:"
 @cat $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list-uniq
 $(hide) if [ -s $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list-uniq ] ; then \
-    $(1) -encoding ascii \
+    $(1) -encoding UTF-8 \
     $(strip $(PRIVATE_JAVAC_DEBUG_FLAGS)) \
     $(if $(findstring true,$(LOCAL_WARNINGS_ENABLE)),$(xlint_unchecked),) \
     $(2) \
@@ -1518,6 +1524,7 @@
 $(hide) $(DX) \
     $(if $(findstring windows,$(HOST_OS)),,-JXms16M -JXmx1536M) \
     --dex --output=$@ \
+    $(incremental_dex) \
     $(if $(NO_OPTIMIZE_DX), \
         --no-optimize) \
     $(if $(GENERATE_DEX_DEBUG), \
@@ -1550,13 +1557,13 @@
 #them in their manifest.
 define add-assets-to-package
 $(hide) $(AAPT) package -u $(PRIVATE_AAPT_FLAGS) \
-    $(addprefix -c , $(PRODUCT_AAPT_CONFIG)) \
+    $(addprefix -c , $(PRIVATE_PRODUCT_AAPT_CONFIG)) \
     $(addprefix -M , $(PRIVATE_ANDROID_MANIFEST)) \
     $(addprefix -S , $(PRIVATE_RESOURCE_DIR)) \
     $(addprefix -A , $(PRIVATE_ASSET_DIR)) \
     $(addprefix -I , $(PRIVATE_AAPT_INCLUDES)) \
-    $(addprefix --min-sdk-version , $(DEFAULT_APP_TARGET_SDK)) \
-    $(addprefix --target-sdk-version , $(DEFAULT_APP_TARGET_SDK)) \
+    $(addprefix --min-sdk-version , $(PRIVATE_DEFAULT_APP_TARGET_SDK)) \
+    $(addprefix --target-sdk-version , $(PRIVATE_DEFAULT_APP_TARGET_SDK)) \
     $(addprefix --product , $(TARGET_AAPT_CHARACTERISTICS)) \
     $(if $(filter --version-code,$(PRIVATE_AAPT_FLAGS)),,$(addprefix --version-code , $(PLATFORM_SDK_VERSION))) \
     $(if $(filter --version-name,$(PRIVATE_AAPT_FLAGS)),,$(addprefix --version-name , $(PLATFORM_VERSION)-$(BUILD_NUMBER))) \
@@ -1584,7 +1591,9 @@
 endef
 
 define add-java-resources-to-package
-$(hide) jar uf $@ $(PRIVATE_EXTRA_JAR_ARGS)
+$(call dump-words-to-file, $(PRIVATE_EXTRA_JAR_ARGS), $(dir $@)jar-arg-list)
+$(hide) jar uf $@ @$(dir $@)jar-arg-list
+@rm -f $(dir $@)jar-arg-list
 endef
 
 # Sign a package using the specified key/cert.
@@ -1627,7 +1636,7 @@
 define transform-host-java-to-package
 @echo "host Java: $(PRIVATE_MODULE) ($(PRIVATE_CLASS_INTERMEDIATES_DIR))"
 $(call compile-java,$(HOST_JAVAC),$(PRIVATE_BOOTCLASSPATH))
-$(hide) if [ ! -z "$(PRIVATE_EXTRA_JAR_ARGS)" ]; then jar uf $@ $(PRIVATE_EXTRA_JAR_ARGS); fi
+$(if $(PRIVATE_EXTRA_JAR_ARGS), $(call add-java-resources-to-package))
 endef
 
 ###########################################################
diff --git a/core/droiddoc.mk b/core/droiddoc.mk
index 051c16a..91d8166 100644
--- a/core/droiddoc.mk
+++ b/core/droiddoc.mk
@@ -82,13 +82,13 @@
 
 endif # !LOCAL_IS_HOST_MODULE
 
-intermediates := $(call local-intermediates-dir)
+intermediates.COMMON := $(call local-intermediates-dir,COMMON)
 
 $(full_target): PRIVATE_SOURCE_PATH := $(call normalize-path-list,$(LOCAL_DROIDDOC_SOURCE_PATH))
 $(full_target): PRIVATE_JAVA_FILES := $(filter %.java,$(full_src_files))
 $(full_target): PRIVATE_JAVA_FILES += $(addprefix $($(my_prefix)OUT_COMMON_INTERMEDIATES)/, $(filter %.java,$(LOCAL_INTERMEDIATE_SOURCES)))
-$(full_target): PRIVATE_SOURCE_INTERMEDIATES_DIR := $(intermediates)/src
-$(full_target): PRIVATE_SRC_LIST_FILE := $(intermediates)/droiddoc-src-list
+$(full_target): PRIVATE_SOURCE_INTERMEDIATES_DIR := $(intermediates.COMMON)/src
+$(full_target): PRIVATE_SRC_LIST_FILE := $(intermediates.COMMON)/droiddoc-src-list
 
 ifneq ($(strip $(LOCAL_ADDITIONAL_JAVA_DIR)),)
 $(full_target): PRIVATE_ADDITIONAL_JAVA_DIR := $(LOCAL_ADDITIONAL_JAVA_DIR)
diff --git a/core/dumpvar.mk b/core/dumpvar.mk
index 831ed97..e0de464 100644
--- a/core/dumpvar.mk
+++ b/core/dumpvar.mk
@@ -5,14 +5,10 @@
 
 ABP:=$(PWD)/$(HOST_OUT_EXECUTABLES)
 
-ifeq ($(TARGET_SIMULATOR),true)
-	ABP:=$(ABP):$(TARGET_OUT_EXECUTABLES)
-else
-	# Add the toolchain bin dir if it actually exists
-	ifneq ($(wildcard $(PWD)/prebuilt/$(HOST_PREBUILT_TAG)/toolchain/arm-linux-androideabi-4.4.x/bin),)
-		# this should be copied to HOST_OUT_EXECUTABLES instead
-		ABP:=$(ABP):$(PWD)/prebuilt/$(HOST_PREBUILT_TAG)/toolchain/arm-linux-androideabi-4.4.x/bin
-	endif
+# Add the toolchain bin dir if it actually exists
+ifneq ($(wildcard $(PWD)/prebuilt/$(HOST_PREBUILT_TAG)/toolchain/arm-linux-androideabi-4.4.x/bin),)
+	# this should be copied to HOST_OUT_EXECUTABLES instead
+	ABP:=$(ABP):$(PWD)/prebuilt/$(HOST_PREBUILT_TAG)/toolchain/arm-linux-androideabi-4.4.x/bin
 endif
 ANDROID_BUILD_PATHS := $(ABP)
 ANDROID_PREBUILTS := prebuilt/$(HOST_PREBUILT_TAG)
@@ -68,7 +64,6 @@
 $(info   PLATFORM_VERSION=$(PLATFORM_VERSION))
 $(info   TARGET_PRODUCT=$(TARGET_PRODUCT))
 $(info   TARGET_BUILD_VARIANT=$(TARGET_BUILD_VARIANT))
-$(info   TARGET_SIMULATOR=$(TARGET_SIMULATOR))
 $(info   TARGET_BUILD_TYPE=$(TARGET_BUILD_TYPE))
 $(info   TARGET_BUILD_APPS=$(TARGET_BUILD_APPS))
 $(info   TARGET_ARCH=$(TARGET_ARCH))
diff --git a/core/dynamic_binary.mk b/core/dynamic_binary.mk
index 005ccf3..0ca1858 100644
--- a/core/dynamic_binary.mk
+++ b/core/dynamic_binary.mk
@@ -86,49 +86,20 @@
 compress_output := $(compress_input)
 endif
 
-
 ###########################################################
-## Pre-link
+## Store a copy with symbols for symbolic debugging
 ###########################################################
-prelink_input := $(compress_output)
-# The output of the prelink step is the binary we want to use
-# for symbolic debugging;  the prelink step may move sections
-# around, so we have to use this version.
-prelink_output := $(LOCAL_UNSTRIPPED_PATH)/$(LOCAL_BUILT_MODULE_STEM)
-
-# Skip prelinker if it is FDO instrumentation build.
-ifneq ($(strip $(BUILD_FDO_INSTRUMENT)),)
-ifneq ($(LOCAL_NO_FDO_SUPPORT),true)
-LOCAL_PRELINK_MODULE := false
-endif
-endif
-
-ifeq ($(LOCAL_PRELINK_MODULE),true)
-$(prelink_output): $(prelink_input) $(TARGET_PRELINKER_MAP) $(APRIORI)
-	$(transform-to-prelinked)
-else
-# Don't prelink the binary, just copy it.  We can't skip this step
-# because people always expect a copy of the binary to appear
-# in the UNSTRIPPED directory.
-#
-# If the binary we're copying is acp or a prerequisite,
-# use cp(1) instead.
-ifneq ($(LOCAL_ACP_UNAVAILABLE),true)
-$(prelink_output): $(prelink_input) | $(ACP)
-	@echo "target Non-prelinked: $(PRIVATE_MODULE) ($@)"
+symbolic_input := $(compress_output)
+symbolic_output := $(LOCAL_UNSTRIPPED_PATH)/$(LOCAL_BUILT_MODULE_STEM)
+$(symbolic_output) : $(symbolic_input) | $(ACP)
+	@echo "target Symbolic: $(PRIVATE_MODULE) ($@)"
 	$(copy-file-to-target)
-else
-$(prelink_output): $(prelink_input)
-	@echo "target Non-prelinked: $(PRIVATE_MODULE) ($@)"
-	$(copy-file-to-target-with-cp)
-endif
-endif
 
 
 ###########################################################
 ## Strip
 ###########################################################
-strip_input := $(prelink_output)
+strip_input := $(symbolic_output)
 strip_output := $(LOCAL_BUILT_MODULE)
 
 ifeq ($(strip $(LOCAL_STRIP_MODULE)),)
@@ -160,5 +131,5 @@
 $(cleantarget): PRIVATE_CLEAN_FILES := \
 			$(PRIVATE_CLEAN_FILES) \
 			$(linked_module) \
-			$(compress_output) \
-			$(prelink_output)
+			$(symbolic_output) \
+			$(compress_output)
diff --git a/core/envsetup.mk b/core/envsetup.mk
index 800a9bf..016560a 100644
--- a/core/envsetup.mk
+++ b/core/envsetup.mk
@@ -1,6 +1,5 @@
 # Variables we check:
 #     HOST_BUILD_TYPE = { release debug }
-#     TARGET_SIMULATOR = { true <null> }
 #     TARGET_BUILD_TYPE = { release debug }
 # and we output a bunch of variables, see the case statement at
 # the bottom for the full list
@@ -19,16 +18,12 @@
 CORRECT_BUILD_ENV_SEQUENCE_NUMBER := 10
 
 # ---------------------------------------------------------------
-# The product defaults to generic on hardware and sim on sim
+# The product defaults to generic on hardware
 # NOTE: This will be overridden in product_config.mk if make
 # was invoked with a PRODUCT-xxx-yyy goal.
 ifeq ($(TARGET_PRODUCT),)
-ifeq ($(TARGET_SIMULATOR),true)
-TARGET_PRODUCT := sim
-else
 TARGET_PRODUCT := full
 endif
-endif
 
 
 # the variant -- the set of files that are included for a build
@@ -36,18 +31,6 @@
 TARGET_BUILD_VARIANT := eng
 endif
 
-# Read the product specs so we an get TARGET_DEVICE and other
-# variables that we need in order to locate the output files.
-include $(BUILD_SYSTEM)/product_config.mk
-
-build_variant := $(filter-out eng user userdebug tests,$(TARGET_BUILD_VARIANT))
-ifneq ($(build_variant)-$(words $(TARGET_BUILD_VARIANT)),-1)
-$(warning bad TARGET_BUILD_VARIANT: $(TARGET_BUILD_VARIANT))
-$(error must be empty or one of: eng user userdebug tests)
-endif
-
-
-
 # ---------------------------------------------------------------
 # Set up configuration for host machine.  We don't do cross-
 # compiles except for arm, so the HOST is whatever we are
@@ -119,17 +102,15 @@
   HOST_PREBUILT_TAG := $(HOST_OS)-$(HOST_ARCH)
 endif
 
-# Default to building dalvikvm on hosts that support it...
-ifeq ($(HOST_OS),linux)
-# ... but not if we're building the sim...
-ifneq ($(TARGET_SIMULATOR),true)
-# ... or if the if the option is already set
-ifeq ($(WITH_HOST_DALVIK),)
-	WITH_HOST_DALVIK := true
-endif
-endif
-endif
+# Read the product specs so we an get TARGET_DEVICE and other
+# variables that we need in order to locate the output files.
+include $(BUILD_SYSTEM)/product_config.mk
 
+build_variant := $(filter-out eng user userdebug tests,$(TARGET_BUILD_VARIANT))
+ifneq ($(build_variant)-$(words $(TARGET_BUILD_VARIANT)),-1)
+$(warning bad TARGET_BUILD_VARIANT: $(TARGET_BUILD_VARIANT))
+$(error must be empty or one of: eng user userdebug tests)
+endif
 
 # ---------------------------------------------------------------
 # Set up configuration for target machine.
@@ -138,20 +119,10 @@
 # 		TARGET_ARCH = { arm | x86 }
 
 
-# if we're build the simulator, HOST_* is TARGET_* (except for BUILD_TYPE)
-# otherwise  it's <arch>-linux
-ifeq ($(TARGET_SIMULATOR),true)
-ifneq ($(HOST_OS),linux)
-$(error TARGET_SIMULATOR=true is only supported under Linux)
-endif
-TARGET_ARCH := $(HOST_ARCH)
-TARGET_OS := $(HOST_OS)
-else
 ifeq ($(TARGET_ARCH),)
 TARGET_ARCH := arm
 endif
 TARGET_OS := linux
-endif
 
 # the target build type defaults to release
 ifneq ($(TARGET_BUILD_TYPE),debug)
@@ -183,15 +154,7 @@
 
 BUILD_OUT := $(OUT_DIR)/host/$(BUILD_OS)-$(BUILD_ARCH)
 
-ifeq ($(TARGET_SIMULATOR),true)
-  # Any arch- or os-specific parts of the simulator (everything
-  # under product/) are actually host-dependent.
-  # But, the debug type is controlled by TARGET_BUILD_TYPE and not
-  # HOST_BUILD_TYPE.
-  TARGET_PRODUCT_OUT_ROOT := $(HOST_OUT_$(TARGET_BUILD_TYPE))/pr
-else
-  TARGET_PRODUCT_OUT_ROOT := $(TARGET_OUT_ROOT)/product
-endif
+TARGET_PRODUCT_OUT_ROOT := $(TARGET_OUT_ROOT)/product
 
 TARGET_COMMON_OUT_ROOT := $(TARGET_OUT_ROOT)/common
 HOST_COMMON_OUT_ROOT := $(HOST_OUT_ROOT)/common
diff --git a/core/executable.mk b/core/executable.mk
index 623c766..6138adb 100644
--- a/core/executable.mk
+++ b/core/executable.mk
@@ -12,11 +12,6 @@
 LOCAL_MODULE_SUFFIX := $(TARGET_EXECUTABLE_SUFFIX)
 endif
 
-# Executables are not prelinked.  If we decide to start prelinking
-# them, the LOCAL_PRELINK_MODULE definitions should be moved from
-# here and shared_library.make and consolidated in dynamic_binary.make.
-LOCAL_PRELINK_MODULE := false
-
 include $(BUILD_SYSTEM)/dynamic_binary.mk
 
 ifeq ($(LOCAL_FORCE_STATIC_EXECUTABLE),true)
diff --git a/core/host_native_test.mk b/core/host_native_test.mk
index 2a77f1e..a5d87e4 100644
--- a/core/host_native_test.mk
+++ b/core/host_native_test.mk
@@ -5,10 +5,9 @@
 
 LOCAL_CFLAGS += -DGTEST_OS_LINUX -DGTEST_HAS_STD_STRING -O0 -g
 LOCAL_C_INCLUDES +=  \
-                    bionic/libstdc++/include \
-                    external/gtest/include \
-                    external/astl/include
-LOCAL_STATIC_LIBRARIES += libgtest_host libgtest_main_host libastl_host
+    external/gtest/include
+
+LOCAL_STATIC_LIBRARIES += libgtest_host libgtest_main_host
 LOCAL_SHARED_LIBRARIES +=
 
 include $(BUILD_HOST_EXECUTABLE)
diff --git a/core/java.mk b/core/java.mk
index 464f772..5324e7d 100644
--- a/core/java.mk
+++ b/core/java.mk
@@ -331,17 +331,33 @@
 
 ALL_MODULES.$(LOCAL_MODULE).PROGUARD_ENABLED:=$(LOCAL_PROGUARD_ENABLED)
 
+# Override PRIVATE_INTERMEDIATES_DIR so that install-dex-debug
+# will work even when intermediates != intermediates.COMMON.
+$(built_dex_intermediate): PRIVATE_INTERMEDIATES_DIR := $(intermediates.COMMON)
+
+ifeq (,$(filter --target-api=%, $(LOCAL_DX_FLAGS)))
+possible_dx_target_api :=
+ifneq (,$(LOCAL_MANIFEST_FILE))
+  manifest_min_sdk_version := \
+      $(shell grep -o 'android:minSdkVersion="[0-9]\{1,\}"' $(LOCAL_PATH)/$(LOCAL_MANIFEST_FILE) 2>/dev/null)
+  possible_dx_target_api := $(patsubst android:minSdkVersion="%",%,$(firstword $(manifest_min_sdk_version)))
+endif
+ifeq (,$(possible_dx_target_api))
+# In case minSdkVersion is not available, eg shared library built against SDK,
+# LOCAL_SDK_VERSION may be a good guess
+ifneq (,$(filter-out current, $(LOCAL_SDK_VERSION)))
+  possible_dx_target_api := $(LOCAL_SDK_VERSION)
+endif
+endif
+LOCAL_DX_FLAGS += $(addprefix --target-api=, $(possible_dx_target_api))
+endif # --target-api not defined in LOCAL_DX_FLAGS
+$(built_dex_intermediate): PRIVATE_DX_FLAGS := $(LOCAL_DX_FLAGS)
 # If you instrument class files that have local variable debug information in
 # them emma does not correctly maintain the local variable table.
 # This will cause an error when you try to convert the class files for Android.
 # The workaround here is to build different dex file here based on emma switch
 # then later copy into classes.dex. When emma is on, dx is run with --no-locals
 # option to remove local variable information
-
-# Override PRIVATE_INTERMEDIATES_DIR so that install-dex-debug
-# will work even when intermediates != intermediates.COMMON.
-$(built_dex_intermediate): PRIVATE_INTERMEDIATES_DIR := $(intermediates.COMMON)
-$(built_dex_intermediate): PRIVATE_DX_FLAGS := $(LOCAL_DX_FLAGS)
 ifneq ($(LOCAL_NO_EMMA_COMPILE),true)
 $(built_dex_intermediate): PRIVATE_DX_FLAGS += --no-locals
 endif
diff --git a/core/java_library.mk b/core/java_library.mk
index dbf6981..23417d0 100644
--- a/core/java_library.mk
+++ b/core/java_library.mk
@@ -42,10 +42,13 @@
 #################################
 
 ifeq ($(LOCAL_IS_STATIC_JAVA_LIBRARY),true)
-# No dex or resources; all we want are the .class files.
-$(common_javalib.jar) : $(full_classes_jar)
+# No dex; all we want are the .class files with resources.
+$(common_javalib.jar) : $(full_classes_jar) $(java_resource_sources)
 	@echo "target Static Jar: $(PRIVATE_MODULE) ($@)"
 	$(copy-file-to-target)
+ifneq ($(extra_jar_args),)
+	$(add-java-resources-to-package)
+endif
 
 $(LOCAL_BUILT_MODULE): $(common_javalib.jar)
 	$(copy-file-to-target)
diff --git a/core/legacy_prebuilts.mk b/core/legacy_prebuilts.mk
index 6a999c1..41943b1 100644
--- a/core/legacy_prebuilts.mk
+++ b/core/legacy_prebuilts.mk
@@ -40,7 +40,6 @@
 	bp.img \
 	brcm_guci_drv \
 	bypassfactory \
-	cacerts.bks \
 	cdt.bin \
 	chat-ril \
 	cmu6plus.ok.zip \
diff --git a/core/main.mk b/core/main.mk
index d608fcb..959cd83 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -231,13 +231,15 @@
     enable_target_debugging :=
   endif
 
-  # TODO: Remove this and the corresponding block in
-  # config/product_config.make once host-based Dalvik preoptimization is
-  # working.
+  # Turn on Dalvik preoptimization for user builds, but only if not
+  # explicitly disabled and the build is running on Linux (since host
+  # Dalvik isn't built for non-Linux hosts).
   ifneq (true,$(DISABLE_DEXPREOPT))
-  ifeq ($(HOST_OS)-$(WITH_DEXPREOPT_buildbot),linux-true)
-    WITH_DEXPREOPT := true
-  endif
+    ifeq ($(user_variant),user)
+      ifeq ($(HOST_OS),linux)
+        WITH_DEXPREOPT := true
+      endif
+    endif
   endif
 
   # Disallow mock locations by default for user builds
@@ -254,12 +256,12 @@
 
 ifeq (true,$(strip $(enable_target_debugging)))
   # Target is more debuggable and adbd is on by default
-  ADDITIONAL_DEFAULT_PROPERTIES += ro.debuggable=1 persist.service.adb.enable=1
+  ADDITIONAL_DEFAULT_PROPERTIES += ro.debuggable=1
   # Include the debugging/testing OTA keys in this build.
   INCLUDE_TEST_OTA_KEYS := true
 else # !enable_target_debugging
   # Target is less debuggable and adbd is off by default
-  ADDITIONAL_DEFAULT_PROPERTIES += ro.debuggable=0 persist.service.adb.enable=0
+  ADDITIONAL_DEFAULT_PROPERTIES += ro.debuggable=0
 endif # !enable_target_debugging
 
 ## eng ##
@@ -464,10 +466,6 @@
 	build/libs \
 	build/target \
 	build/tools/acp \
-	build/tools/apriori \
-	build/tools/soslim \
-	external/elfcopy \
-	external/elfutils \
 	external/yaffs2 \
 	external/zlib
 else	# !BUILD_TINY_ANDROID
diff --git a/core/package.mk b/core/package.mk
index 8ca9033..e79059a 100644
--- a/core/package.mk
+++ b/core/package.mk
@@ -19,7 +19,7 @@
 ##
 ## Additional inputs from base_rules.make:
 ## LOCAL_PACKAGE_NAME: The name of the package; the directory
-##		will be called this.
+## will be called this.
 ##
 ## MODULE, MODULE_PATH, and MODULE_SUFFIX will
 ## be set for you.
@@ -163,7 +163,14 @@
 
 full_android_manifest := $(LOCAL_PATH)/$(LOCAL_MANIFEST_FILE)
 $(LOCAL_INTERMEDIATE_TARGETS): \
-	PRIVATE_ANDROID_MANIFEST := $(full_android_manifest)
+    PRIVATE_ANDROID_MANIFEST := $(full_android_manifest)
+ifneq (,$(filter-out current, $(LOCAL_SDK_VERSION)))
+$(LOCAL_INTERMEDIATE_TARGETS): \
+    PRIVATE_DEFAULT_APP_TARGET_SDK := $(LOCAL_SDK_VERSION)
+else
+$(LOCAL_INTERMEDIATE_TARGETS): \
+    PRIVATE_DEFAULT_APP_TARGET_SDK := $(DEFAULT_APP_TARGET_SDK)
+endif
 
 ifneq ($(all_resources),)
 
@@ -192,15 +199,15 @@
 					-name Manifest.java 2> /dev/null`; do \
 		dir=`awk '/package/{gsub(/\./,"/",$$2);gsub(/;/,"",$$2);print $$2;exit}' $$GENERATED_MANIFEST_FILE`; \
 		mkdir -p $(TARGET_COMMON_OUT_ROOT)/R/$$dir; \
-		$(ACP) -fpt $$GENERATED_MANIFEST_FILE $(TARGET_COMMON_OUT_ROOT)/R/$$dir; \
+		$(ACP) -fp $$GENERATED_MANIFEST_FILE $(TARGET_COMMON_OUT_ROOT)/R/$$dir; \
 	done;
 	$(hide) for GENERATED_R_FILE in `find $(PRIVATE_SOURCE_INTERMEDIATES_DIR) \
 					-name R.java 2> /dev/null`; do \
 		dir=`awk '/package/{gsub(/\./,"/",$$2);gsub(/;/,"",$$2);print $$2;exit}' $$GENERATED_R_FILE`; \
 		mkdir -p $(TARGET_COMMON_OUT_ROOT)/R/$$dir; \
-		$(ACP) -fpt $$GENERATED_R_FILE $(TARGET_COMMON_OUT_ROOT)/R/$$dir \
+		$(ACP) -fp $$GENERATED_R_FILE $(TARGET_COMMON_OUT_ROOT)/R/$$dir \
 			|| exit 31; \
-		$(ACP) -fpt $$GENERATED_R_FILE $@ || exit 32; \
+		$(ACP) -fp $$GENERATED_R_FILE $@ || exit 32; \
 	done; \
 
 $(proguard_options_file): $(R_file_stamp)
@@ -214,7 +221,7 @@
 
 # add-assets-to-package looks at PRODUCT_AAPT_CONFIG, but this target
 # can't know anything about PRODUCT.  Clear it out just for this target.
-$(resource_export_package): PRODUCT_AAPT_CONFIG :=
+$(resource_export_package): PRIVATE_PRODUCT_AAPT_CONFIG :=
 $(resource_export_package): $(all_res_assets) $(full_android_manifest) $(RenderScript_file_stamp) $(AAPT)
 	@echo "target Export Resources: $(PRIVATE_MODULE) ($@)"
 	$(create-empty-package)
@@ -233,7 +240,7 @@
 $(full_classes_compiled_jar): $(R_file_stamp)
 endif
 
-endif	# all_resources
+endif  # all_resources
 
 ifeq ($(LOCAL_NO_STANDARD_LIBRARIES),true)
 # We need to explicitly clear this var so that we don't
@@ -246,20 +253,20 @@
 ifneq ($(filter-out current,$(LOCAL_SDK_VERSION)),)
 # for released sdk versions, the platform resources were built into android.jar.
 framework_res_package_export := \
-	$(HISTORICAL_SDK_VERSIONS_ROOT)/$(LOCAL_SDK_VERSION)/android.jar
+    $(HISTORICAL_SDK_VERSIONS_ROOT)/$(LOCAL_SDK_VERSION)/android.jar
 framework_res_package_export_deps := $(framework_res_package_export)
 else # LOCAL_SDK_VERSION
 framework_res_package_export := \
-	$(call intermediates-dir-for,APPS,framework-res,,COMMON)/package-export.apk
+    $(call intermediates-dir-for,APPS,framework-res,,COMMON)/package-export.apk
 # We can't depend directly on the export.apk file; it won't get its
 # PRIVATE_ vars set up correctly if we do.  Instead, depend on the
 # corresponding R.stamp file, which lists the export.apk as a dependency.
 framework_res_package_export_deps := \
-	$(dir $(framework_res_package_export))src/R.stamp
+    $(dir $(framework_res_package_export))src/R.stamp
 endif # LOCAL_SDK_VERSION
 $(R_file_stamp): $(framework_res_package_export_deps)
 $(LOCAL_INTERMEDIATE_TARGETS): \
-	PRIVATE_AAPT_INCLUDES := $(framework_res_package_export)
+    PRIVATE_AAPT_INCLUDES := $(framework_res_package_export)
 endif # LOCAL_NO_STANDARD_LIBRARIES
 
 ifneq ($(full_classes_jar),)
@@ -330,7 +337,9 @@
     LOCAL_AAPT_INCLUDE_ALL_RESOURCES := true
 endif
 ifeq ($(LOCAL_AAPT_INCLUDE_ALL_RESOURCES),true)
-    $(LOCAL_BUILT_MODULE): PRODUCT_AAPT_CONFIG :=
+    $(LOCAL_BUILT_MODULE): PRIVATE_PRODUCT_AAPT_CONFIG :=
+else
+    $(LOCAL_BUILT_MODULE): PRIVATE_PRODUCT_AAPT_CONFIG := $(PRODUCT_AAPT_CONFIG)
 endif
 $(LOCAL_BUILT_MODULE): $(all_res_assets) $(jni_shared_libraries) $(full_android_manifest)
 	@echo "target Package: $(PRIVATE_MODULE) ($@)"
diff --git a/core/pathmap.mk b/core/pathmap.mk
index 428594f..6c6ff2e 100644
--- a/core/pathmap.mk
+++ b/core/pathmap.mk
@@ -48,7 +48,8 @@
     libthread_db:bionic/libthread_db/include \
     mkbootimg:system/core/mkbootimg \
     recovery:bootable/recovery \
-    system-core:system/core/include
+    system-core:system/core/include \
+    speex:external/speex/include
 
 #
 # Returns the path to the requested module's include directory,
@@ -87,7 +88,6 @@
 	    sax \
 	    telephony \
 	    wifi \
-	    vpn \
 	    keystore \
 	    icu4j \
 	    voip \
diff --git a/core/prebuilt.mk b/core/prebuilt.mk
index 8f9eafb..07ecf64 100644
--- a/core/prebuilt.mk
+++ b/core/prebuilt.mk
@@ -26,7 +26,22 @@
 endif
 endif
 
-include $(BUILD_SYSTEM)/base_rules.mk
+ifeq ($(LOCAL_STRIP_MODULE),true)
+  ifdef LOCAL_IS_HOST_MODULE
+    $(error Cannot strip host module LOCAL_PATH=$(LOCAL_PATH))
+  endif
+  ifeq ($(filter SHARED_LIBRARIES EXECUTABLES,$(LOCAL_MODULE_CLASS)),)
+    $(error Can strip only shared libraries or executables LOCAL_PATH=$(LOCAL_PATH))
+  endif
+  ifneq ($(LOCAL_PREBUILT_STRIP_COMMENTS),)
+    $(error Cannot strip scripts LOCAL_PATH=$(LOCAL_PATH))
+  endif
+  include $(BUILD_SYSTEM)/dynamic_binary.mk
+  built_module := $(linked_module)
+else
+  include $(BUILD_SYSTEM)/base_rules.mk
+  built_module := $(LOCAL_BUILT_MODULE)
+endif
 
 # Deal with the OSX library timestamp issue when installing
 # a prebuilt simulator library.
@@ -42,24 +57,24 @@
 ifneq ($(filter APPS,$(LOCAL_MODULE_CLASS)),)
 ifeq ($(LOCAL_DEX_PREOPT),true)
 # Make sure the boot jars get dexpreopt-ed first
-$(LOCAL_BUILT_MODULE): $(DEXPREOPT_BOOT_ODEXS) | $(DEXPREOPT) $(DEXOPT) $(AAPT)
+$(built_module): $(DEXPREOPT_BOOT_ODEXS) | $(DEXPREOPT) $(DEXOPT) $(AAPT)
 endif
-$(LOCAL_BUILT_MODULE) : $(LOCAL_PATH)/$(LOCAL_SRC_FILES) | $(ZIPALIGN)
+$(built_module) : $(LOCAL_PATH)/$(LOCAL_SRC_FILES) | $(ZIPALIGN)
 	$(transform-prebuilt-to-target-with-zipalign)
 ifeq ($(LOCAL_DEX_PREOPT),true)
 	$(hide) rm -f $(patsubst %.apk,%.odex,$@)
 	$(call dexpreopt-one-file,$@,$(patsubst %.apk,%.odex,$@))
 	$(call dexpreopt-remove-classes.dex,$@)
 
-built_odex := $(basename $(LOCAL_BUILT_MODULE)).odex
-$(built_odex): $(LOCAL_BUILT_MODULE)
+built_odex := $(basename $(built_module)).odex
+$(built_odex): $(built_module)
 endif
 else
 ifneq ($(LOCAL_PREBUILT_STRIP_COMMENTS),)
-$(LOCAL_BUILT_MODULE) : $(LOCAL_PATH)/$(LOCAL_SRC_FILES)
+$(built_module) : $(LOCAL_PATH)/$(LOCAL_SRC_FILES)
 	$(transform-prebuilt-to-target-strip-comments)
 else
-$(LOCAL_BUILT_MODULE) : $(LOCAL_PATH)/$(LOCAL_SRC_FILES) | $(ACP)
+$(built_module) : $(LOCAL_PATH)/$(LOCAL_SRC_FILES) | $(ACP)
 	$(transform-prebuilt-to-target)
 endif
 endif
@@ -79,7 +94,7 @@
 	$(transform-prebuilt-to-target)
 
 # make sure the classes.jar and javalib.jar are built before $(LOCAL_BUILT_MODULE)
-$(LOCAL_BUILT_MODULE) : $(common_javalib_jar)
+$(built_module) : $(common_javalib_jar)
 endif # TARGET JAVA_LIBRARIES
 
 ifeq ($(LOCAL_CERTIFICATE),EXTERNAL)
diff --git a/core/prelink-linux-arm.map b/core/prelink-linux-arm.map
deleted file mode 100644
index 41cd8cd..0000000
--- a/core/prelink-linux-arm.map
+++ /dev/null
@@ -1,218 +0,0 @@
-# 0xC0000000 - 0xFFFFFFFF Kernel
-# 0xB0100000 - 0xBFFFFFFF Thread 0 Stack
-# 0xB0000000 - 0xB00FFFFF Linker
-# 0xA0000000 - 0xBFFFFFFF Prelinked System Libraries
-# 0x90000000 - 0x9FFFFFFF Prelinked App Libraries
-# 0x80000000 - 0x8FFFFFFF Non-prelinked Libraries
-# 0x40000000 - 0x7FFFFFFF mmap'd stuff
-# 0x10000000 - 0x3FFFFFFF Thread Stacks
-# 0x00000000 - 0x0FFFFFFF .text / .data / heap
-
-# Note: The general rule is that libraries should be aligned on 1MB
-# boundaries. For ease of updating this file, you will find a comment
-# on each line, indicating the observed size of the library, which is
-# one of:
-#
-#     [<64K] observed to be less than 64K
-#     [~1M] rounded up, one megabyte (similarly for other sizes)
-#     [???] no size observed, assumed to be one megabyte
-#
-# note: look at the LOAD sections in the library header:
-#
-#   arm-linux-androideabi-objdump -x <lib>
-#
-
-# core system libraries
-libdl.so                0xB0100000 # [<64K]
-libc.so                 0xAFF00000 # [~2M]
-libstdc++.so            0xAFE00000 # [<64K]
-libm.so                 0xAFD00000 # [~1M]
-liblog.so               0xAFC00000 # [<64K]
-libcutils.so            0xAFB00000 # [~1M]
-libthread_db.so         0xAFA00000 # [<64K]
-libz.so                 0xAF900000 # [~1M]
-libevent.so             0xAF800000 # [???]
-libssl.so               0xAF600000 # [~2M]
-libcrypto.so            0xAF200000 # [~4M]
-libsysutils.so          0xAF100000 # [~1M]
-
-# bluetooth
-liba2dp.so              0xAF000000 # [~1M]
-input.so                0xAEF00000 # [~1M]
-audio.so                0xAEE00000 # [~1M]
-libglib.so              0xAED00000 # [~1M]
-network.so              0xAEC00000 # [~1M]
-libbluetoothd.so        0xAEA00000 # [~2M]
-libbluedroid.so         0xAE900000 # [<64K]
-libbluetooth.so         0xAE800000 # [~1M]
-libdbus.so              0xAE700000 # [~1M]
-
-# extended system libraries
-libril.so               0xAE600000 # [~1M]
-libreference-ril.so     0xAE500000 # [~1M]
-libwpa_client.so        0xAE400000 # [<64K]
-libnetutils.so          0xAE300000 # [~1M]
-
-# core dalvik runtime support
-libandroid_servers.so   0xAE200000 # [~1M]
-libicuuc.so             0xADE00000 # [~4M]
-libicui18n.so           0xAD900000 # [~5M]
-libandroid_runtime.so   0xAD300000 # [~6M]
-libnativehelper.so      0xAD100000 # [~2M]
-libdvm-ARM.so           0xAD000000 # [???]
-libdvm.so               0xACA00000 # [~6M]
-# Note: libicudata.so intentionally omitted
-
-# graphics
-libpixelflinger.so      0xAC900000 # [~1M]
-# libcorecg is for backward-compatibility with donut
-libcorecg.so            0xAC800000 # [???]
-libsurfaceflinger_client.so 0xAC700000 # [~1M]
-libsurfaceflinger.so    0xAC500000 # [~2M]
-libGLES_android.so      0xAC400000 # [~1M]
-libagl.so               0xAC300000 # [???]
-
-libGLESv1_CM.so         0xAC200000 # [~1M]
-libGLESv2.so            0xAC100000 # [~1M]
-libOpenVG_CM.so         0xAC000000 # [???]
-libOpenVGU_CM.so        0xABF00000 # [???]
-libEGL.so               0xABE00000 # [~1M]
-libETC1.so              0xABD00000 # [<64K]
-
-libacc.so               0xABC00000 # [~1M]
-
-libexif.so              0xABB00000 # [~1M]
-libcamera_client.so     0xABA80000 # [~1M]
-libui.so                0xAB900000 # [~1M]
-libgui.so               0xAB800000 # [~1M]
-libskia.so              0xAB100000 # [~2M]
-librs_jni.so            0xAB000000 # [~1M]
-libRS.so                0xA9E00000 # [~2M]
-libandroid.so           0xA9D80000 # [<64K]
-libjnigraphics.so       0xA9D00000 # [<64K]
-libskiagl.so            0xA9C00000 # [~1M]
-
-# audio
-libaudiopolicy.so       0xA9A00000 # [~1M]
-libeffects.so           0xA9980000 # [<64K]
-libaudioeffect_jni.so   0xA9900000 # [<64K]
-libsoundpool.so         0xA9800000 # [~1M]
-libaudio.so             0xA9700000 # [~1M]
-libspeech.so            0xA9600000 # [~1M]
-libsonivox.so           0xA9500000 # [~1M]
-libvorbisidec.so        0xA9400000 # [~1M]
-libmedia_jni.so         0xA9300000 # [~1M]
-libmediaplayerservice.so 0xA9200000 # [~1M]
-libmedia.so             0xA9000000 # [~2M]
-libFFTEm.so             0xA8F00000 # [~1M]
-libSR_AudioIn.so        0xA8E00000 # [~1M] for external/srec
-libaudioflinger.so      0xA8D00000 # [~1M]
-
-# assorted system libraries
-libsqlite.so            0xA8B00000 # [~2M]
-libexpat.so             0xA8A00000 # [~1M]
-libwebcore.so           0xA8200000 # [~8M]
-libbinder.so            0xA8100000 # [~1M]
-libutils.so             0xA8000000 # [~1M]
-libcameraservice.so     0xA7F00000 # [~1M]
-libhardware.so          0xA7E00000 # [<64K]
-libhardware_legacy.so   0xA7D00000 # [~1M]
-libapp_process.so       0xA7C00000 # [???]
-libsystem_server.so     0xA7B00000 # [~1M]
-libime.so               0xA7A00000 # [???]
-libgps.so               0xA7900000 # [~1M]
-libcamera.so            0xA7800000 # [~1M]
-liboemcamera.so         0xA7600000 # [~2M]
-libdiskconfig.so        0xA7500000 # [<64K]
-libemoji.so             0xA7400000 # [<64K]
-libjni_latinime.so      0xA7300000 # [~1M]
-libjni_pinyinime.so     0xA7200000 # [~1M]
-libttssynthproxy.so     0xA7100000 # [~1M] for frameworks/base
-libttspico.so           0xA6F00000 # [~2M] for external/svox
-libmtp.so               0xA6E00000 # [~1M]
-libusbhost.so           0xA6D00000 # [<64K]
-libinput.so             0xA6C00000 # [~1M]
-
-# pv libraries
-libpvasf.so                    0xA6B00000 # [???]
-libpvasfreg.so                 0xA6A00000 # [???]
-libomx_sharedlibrary.so        0xA6900000 # [~1M]
-libopencore_download.so        0xA6800000 # [~1M]
-libopencore_downloadreg.so     0xA6700000 # [~1M]
-libopencore_net_support.so     0xA6400000 # [~3M]
-libopencore_rtsp.so            0xA5E00000 # [~6M]
-libopencore_rtspreg.so         0xA5D00000 # [~1M]
-libopencore_author.so          0xA5900000 # [~4M]
-libomx_aacdec_sharedlibrary.so 0xA5700000 # [~2M]
-libomx_amrdec_sharedlibrary.so 0xA5600000 # [~1M]
-libomx_amrenc_sharedlibrary.so 0xA5500000 # [~1M]
-libomx_avcdec_sharedlibrary.so 0xA5400000 # [~1M]
-libomx_avcenc_sharedlibrary.so 0xA5300000 # [???]
-libomx_m4vdec_sharedlibrary.so 0xA5200000 # [~1M]
-libomx_m4venc_sharedlibrary.so 0xA5100000 # [???]
-libomx_mp3dec_sharedlibrary.so 0xA5000000 # [~1M]
-libopencore_mp4local.so        0xA4E00000 # [~2M]
-libopencore_mp4localreg.so     0xA4D00000 # [~1M]
-libopencore_player.so          0xA4400000 # [~9M]
-
-# opencore hardware support
-libmm-adspsvc.so              0xA4300000 # [<64K]
-libOmxCore.so                 0xA4200000 # [<64K]
-libOmxMpeg4Dec.so             0xA4100000 # [~1M]
-libOmxH264Dec.so              0xA4000000 # [~1M]
-libOmxVidEnc.so               0xA3F00000 # [~1M]
-libopencorehw.so              0xA3E00000 # [~1M]
-libOmxVdec.so                 0xA3D00000 # [~1M]
-libmm-omxcore.so              0xA3C00000 # [<64K]
-
-# pv libraries
-libopencore_common.so         0xA3500000 # [~7M]
-libqcomm_omx.so               0xA3400000 # [<64K]
-
-# stagefright libraries
-libstagefright_amrnb_common.so     0xA3300000 # [~1M]
-libstagefright_avc_common.so       0xA3200000 # [~1M]
-libstagefright_color_conversion.so 0xA3100000 # [<64K]
-libstagefright_omx.so              0xA3000000 # [~1M]
-libstagefrighthw.so                0xA2F00000 # [~1M]
-libstagefright.so                  0xA2B00000 # [~4M]
-
-# libraries for specific hardware
-libgsl.so               0xA2A00000 # [~1M]
-libhtc_acoustic.so      0xA2900000 # [<64K]
-libhtc_ril.so           0xA2800000 # [~1M]
-libreference-cdma-sms.so 0xA2600000 # [<64K] for hardware/ril
-
-# libraries for specific apps or temporary libraries
-libcam_ipl.so           0x9F000000 # [???]
-libwbxml.so             0x9EF00000 # [???]
-libwbxml_jni.so         0x9EE00000 # [~1M]
-libxml2wbxml.so         0x9EB00000 # [~1M]
-libdrm1.so              0x9EA00000 # [~1M]
-libdrm1_jni.so          0x9E900000 # [<64K]
-libwapcore.so           0x9E800000 # [???]
-libstreetview.so        0x9E700000 # [???]
-libwapbrowsertest.so    0x9E600000 # [???]
-libminiglobe.so         0x9E500000 # [???]
-libearth.so             0x9E400000 # [???]
-libembunit.so           0x9E300000 # [<64K]
-libneon.so              0x9E200000 # [???]
-libjni_example.so       0x9E100000 # [???]
-libjni_load_test.so     0x9E000000 # [???]
-libjni_lib_test.so      0x9DF00000 # [???]
-librunperf.so           0x9DE00000 # [???]
-libctest.so             0x9DD00000 # [<64K]
-libUAPI_jni.so          0x9DC00000 # [???]
-librpc.so               0x9DB00000 # [~1M]
-libtrace_test.so        0x9DA00000 # [???]
-libsrec_jni.so          0x9D800000 # [~2M]
-libjpeg.so              0x9D700000 # [~1M]
-libiprouteutil.so       0x9D600000 # [~1M] for external/iproute2
-libnetlink.so           0x9D500000 # [<64K] for external/iproute2
-libpagemap.so           0x9D400000 # [<64K] for system/extras/libpagemap
-libstlport.so           0x9D100000 # [~3M] for external/stlport
-libzxing.so             0x9D000000 # [<64K] for goggles
-libinterstitial.so      0x9CF00000 # [<64K] for goggles
-liblept.so              0x9CA00000 # [~5M] for external/leptonica
-libbcc.so               0x9C600000 # [~4M] for external/llvm
-libchromium_net.so      0x9C400000 # [~2M] for exteral/webkit
diff --git a/core/product.mk b/core/product.mk
index c2b398e..2efc446 100644
--- a/core/product.mk
+++ b/core/product.mk
@@ -63,11 +63,13 @@
     PRODUCT_NAME \
     PRODUCT_MODEL \
     PRODUCT_LOCALES \
+    PRODUCT_AAPT_CONFIG \
     PRODUCT_PACKAGES \
     PRODUCT_DEVICE \
     PRODUCT_MANUFACTURER \
     PRODUCT_BRAND \
     PRODUCT_PROPERTY_OVERRIDES \
+    PRODUCT_DEFAULT_PROPERTY_OVERRIDES \
     PRODUCT_CHARACTERISTICS \
     PRODUCT_COPY_FILES \
     PRODUCT_OTA_PUBLIC_KEYS \
@@ -197,7 +199,6 @@
 	TARGET_BOARD_PLATFORM_GPU \
 	TARGET_BOOTLOADER_BOARD_NAME \
 	TARGET_COMPRESS_MODULE_SYMBOLS \
-	TARGET_PRELINK_MODULE \
 	TARGET_NO_BOOTLOADER \
 	TARGET_NO_KERNEL \
 	TARGET_NO_RECOVERY \
diff --git a/core/product_config.mk b/core/product_config.mk
index 4f4f97d..1567f6d 100644
--- a/core/product_config.mk
+++ b/core/product_config.mk
@@ -124,15 +124,6 @@
     default_goal_substitution := tests-build-target
   endif
 
-  # Hack to make the linux build servers use dexpreopt (emulator-based
-  # preoptimization). Most engineers don't use this type of target
-  # ("make PRODUCT-blah-user"), so this should only tend to happen when
-  # using buildbot.
-  # TODO: Remove this once host Dalvik preoptimization is working.
-  ifeq ($(TARGET_BUILD_VARIANT),user)
-    WITH_DEXPREOPT_buildbot := true
-  endif
-
   # Replace the PRODUCT-* goal with the build goal that it refers to.
   # Note that this will ensure that it appears in the same relative
   # position, in case it matters.
@@ -172,6 +163,14 @@
 $(unbundled_goals): $(MAKECMDGOALS)
 endif # unbundled_goals
 
+# Default to building dalvikvm on hosts that support it...
+ifeq ($(HOST_OS),linux)
+# ... or if the if the option is already set
+ifeq ($(WITH_HOST_DALVIK),)
+  WITH_HOST_DALVIK := true
+endif
+endif
+
 # ---------------------------------------------------------------
 # Include the product definitions.
 # We need to do this to translate TARGET_PRODUCT into its
@@ -226,17 +225,18 @@
   extra_locales :=
 endif
 
+# Add PRODUCT_LOCALES to PRODUCT_AAPT_CONFIG
+PRODUCT_AAPT_CONFIG := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_AAPT_CONFIG))
+PRODUCT_AAPT_CONFIG := $(PRODUCT_LOCALES) $(PRODUCT_AAPT_CONFIG)
+
 # Default to medium-density assets.
-# (Can be overridden in the device config, e.g.: PRODUCT_LOCALES += hdpi)
-PRODUCT_LOCALES := $(strip \
-	$(PRODUCT_LOCALES) \
-	$(if $(filter %dpi,$(PRODUCT_LOCALES)),,mdpi))
+# (Can be overridden in the device config, e.g.: PRODUCT_AAPT_CONFIG += hdpi)
+PRODUCT_AAPT_CONFIG := $(strip \
+	$(PRODUCT_AAPT_CONFIG) \
+	$(if $(filter %dpi,$(PRODUCT_AAPT_CONFIG)),,mdpi))
 
 # Everyone gets nodpi assets which are density-independent.
-PRODUCT_LOCALES += nodpi
-
-# Assemble the list of options.
-PRODUCT_AAPT_CONFIG := $(PRODUCT_LOCALES)
+PRODUCT_AAPT_CONFIG += nodpi
 
 # Convert spaces to commas.
 comma := ,
@@ -282,6 +282,12 @@
 PRODUCT_PROPERTY_OVERRIDES := \
 	$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PROPERTY_OVERRIDES))
 
+# A list of property assignments, like "key = value", with zero or more
+# whitespace characters on either side of the '='.
+# used for adding properties to default.prop
+PRODUCT_DEFAULT_PROPERTY_OVERRIDES := \
+	$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_DEFAULT_PROPERTY_OVERRIDES))
+
 # Should we use the default resources or add any product specific overlays
 PRODUCT_PACKAGE_OVERLAYS := \
 	$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGE_OVERLAYS))
@@ -305,14 +311,3 @@
 
 PRODUCT_EXTRA_RECOVERY_KEYS := $(sort \
     $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_EXTRA_RECOVERY_KEYS))
-
-
-# ---------------------------------------------------------------
-# Simulator overrides
-ifeq ($(TARGET_PRODUCT),sim)
-  # Tell the build system to turn on some special cases
-  # to deal with the simulator product.
-  TARGET_SIMULATOR := true
-  # dexpreopt doesn't work when building the simulator
-  DISABLE_DEXPREOPT := true
-endif
diff --git a/core/shared_library.mk b/core/shared_library.mk
index 940fe61..47a089a 100644
--- a/core/shared_library.mk
+++ b/core/shared_library.mk
@@ -13,9 +13,6 @@
 ifeq ($(strip $(LOCAL_MODULE_SUFFIX)),)
 LOCAL_MODULE_SUFFIX := $(TARGET_SHLIB_SUFFIX)
 endif
-ifeq ($(strip $(LOCAL_PRELINK_MODULE)),)
-LOCAL_PRELINK_MODULE := $(strip $(TARGET_PRELINK_MODULE))
-endif
 ifneq ($(strip $(OVERRIDE_BUILT_MODULE_PATH)),)
 $(error $(LOCAL_PATH): Illegal use of OVERRIDE_BUILT_MODULE_PATH)
 endif
diff --git a/core/tasks/apicheck.mk b/core/tasks/apicheck.mk
index 99a3227..96e0f44 100644
--- a/core/tasks/apicheck.mk
+++ b/core/tasks/apicheck.mk
@@ -19,24 +19,20 @@
 
 ifneq ($(BUILD_TINY_ANDROID), true)
 
-APICHECK_CLASSPATH := $(HOST_JDK_TOOLS_JAR)
-APICHECK_CLASSPATH := $(APICHECK_CLASSPATH):$(HOST_OUT_JAVA_LIBRARIES)/doclava$(COMMON_JAVA_PACKAGE_SUFFIX)
-APICHECK_CLASSPATH := $(APICHECK_CLASSPATH):$(HOST_OUT_JAVA_LIBRARIES)/jsilver$(COMMON_JAVA_PACKAGE_SUFFIX)
-
 .PHONY: checkapi
 
 # eval this to define a rule that runs apicheck.
 #
 # Args:
 #    $(1)  target
-#    $(2)  stable api xml file
-#    $(3)  api xml file to be tested
+#    $(2)  stable api file
+#    $(3)  api file to be tested
 #    $(4)  arguments for apicheck
 #    $(5)  command to run if apicheck failed
 define check-api
 $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/$(strip $(1))-timestamp: $(2) $(3) $(APICHECK)
 	@echo "Checking API:" $(1)
-	$(hide) ( $(APICHECK) -JXmx1024m -J"classpath $(APICHECK_CLASSPATH)" $(4) $(2) $(3) || ( $(5) ; exit 38 ) )
+	$(hide) ( $(APICHECK_COMMAND) $(4) $(2) $(3) || ( $(5) ; exit 38 ) )
 	$(hide) mkdir -p $$(dir $$@)
 	$(hide) touch $$@
 checkapi: $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/$(strip $(1))-timestamp
@@ -45,10 +41,11 @@
 # Run the checkapi rules by default.
 droidcore: checkapi
 
-last_released_sdk_version := $(lastword $(call numerically_sort,\
-    $(patsubst $(SRC_API_DIR)/%.xml,%, \
-    $(filter-out $(SRC_API_DIR)/current.xml, \
-    $(wildcard $(SRC_API_DIR)/*.xml)))))
+last_released_sdk_version := $(lastword $(call numerically_sort, \
+            $(filter-out $(SRC_API_DIR)/current, \
+                $(patsubst $(SRC_API_DIR)/%.txt,%, $(wildcard $(SRC_API_DIR)/*.txt)) \
+             )\
+        ))
 
 # INTERNAL_PLATFORM_API_FILE is the one build by droiddoc.
 
@@ -56,7 +53,7 @@
 # SDK version.
 $(eval $(call check-api, \
 	checkapi-last, \
-	$(SRC_API_DIR)/$(last_released_sdk_version).xml, \
+	$(SRC_API_DIR)/$(last_released_sdk_version).txt, \
 	$(INTERNAL_PLATFORM_API_FILE), \
 	-hide 2 -hide 3 -hide 4 -hide 5 -hide 6 -hide 24 -hide 25 \
 	-error 7 -error 8 -error 9 -error 10 -error 11 -error 12 -error 13 -error 14 -error 15 \
@@ -68,7 +65,7 @@
 # SDK version.
 $(eval $(call check-api, \
 	checkapi-current, \
-	$(SRC_API_DIR)/current.xml, \
+	$(SRC_API_DIR)/current.txt, \
 	$(INTERNAL_PLATFORM_API_FILE), \
 	-error 2 -error 3 -error 4 -error 5 -error 6 \
 	-error 7 -error 8 -error 9 -error 10 -error 11 -error 12 -error 13 -error 14 -error 15 \
@@ -79,7 +76,7 @@
 
 .PHONY: update-api
 update-api: $(INTERNAL_PLATFORM_API_FILE) | $(ACP)
-	@echo Copying current.xml
-	$(hide) $(ACP) $(INTERNAL_PLATFORM_API_FILE) $(SRC_API_DIR)/current.xml
+	@echo Copying current.txt
+	$(hide) $(ACP) $(INTERNAL_PLATFORM_API_FILE) $(SRC_API_DIR)/current.txt
 
 endif
diff --git a/core/tasks/cts.mk b/core/tasks/cts.mk
index 8d7667b..af20da8 100644
--- a/core/tasks/cts.mk
+++ b/core/tasks/cts.mk
@@ -34,12 +34,12 @@
 CTS_TF_README_PATH := $(cts_tools_src_dir)/tradefed-host/README
 
 CTS_CORE_CASE_LIST := \
-	android.core.tests.dom \
-	android.core.tests.luni.io \
-	android.core.tests.luni.lang \
-	android.core.tests.luni.net \
-	android.core.tests.luni.util \
-	android.core.tests.xml \
+	android.core.tests.libcore.package.dalvik \
+	android.core.tests.libcore.package.com \
+	android.core.tests.libcore.package.sun \
+	android.core.tests.libcore.package.tests \
+	android.core.tests.libcore.package.org \
+	android.core.tests.libcore.package.libcore \
 	android.core.tests.runner
 
 -include cts/CtsTestCaseList.mk
@@ -72,58 +72,62 @@
 # Parameters:
 # $1 : The output file where the description should be written (without the '.xml' extension)
 # $2 : The AndroidManifest.xml corresponding to the test package
-# $3 : The name of the TestSuite generator class to use
-# $4 : The directory containing vogar expectations files
-# $5 : The Android.mk corresponding to the test package (required for host-side tests only)
+# $3 : The jar file name on PRIVATE_CLASSPATH containing junit tests to search for
+# $4 : The package prefix of classes to include, possible empty
+# $5 : The directory containing vogar expectations files
+# $6 : The Android.mk corresponding to the test package (required for host-side tests only)
 define generate-core-test-description
 @echo "Generate core-test description ("$(notdir $(1))")"
-$(hide) java $(PRIVATE_JAVAOPTS) \
-	-classpath $(PRIVATE_CLASSPATH) \
-	$(PRIVATE_PARAMS) CollectAllTests $(1) \
-	$(2) $(3) $(4) $(5)
+$(hide) java -Xmx256M \
+	-classpath $(PRIVATE_CLASSPATH):$(HOST_OUT_JAVA_LIBRARIES)/descGen.jar:$(HOST_JDK_TOOLS_JAR) \
+	$(PRIVATE_PARAMS) CollectAllTests $(1) $(2) $(3) "$(4)" $(5) $(6)
 endef
 
 CORE_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core,,COMMON)
+BOUNCYCASTLE_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,bouncycastle,,COMMON)
+APACHEXML_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,apache-xml,,COMMON)
+SQLITEJDBC_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,sqlite-jdbc,,COMMON)
 JUNIT_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core-junit,,COMMON)
-RUNNER_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core-junitrunner,,COMMON)
-SUPPORT_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core-tests-support,,COMMON)
-DOM_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core-tests-dom,,COMMON)
-XML_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core-tests-xml,,COMMON)
-TESTS_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core-tests,,COMMON)
-GEN_CLASSPATH := $(CORE_INTERMEDIATES)/classes.jar:$(JUNIT_INTERMEDIATES)/classes.jar:$(RUNNER_INTERMEDIATES)/classes.jar:$(SUPPORT_INTERMEDIATES)/classes.jar:$(DOM_INTERMEDIATES)/classes.jar:$(XML_INTERMEDIATES)/classes.jar:$(TESTS_INTERMEDIATES)/classes.jar:$(CORE_INTERMEDIATES)/javalib.jar:$(JUNIT_INTERMEDIATES)/javalib.jar:$(RUNNER_INTERMEDIATES)/javalib.jar:$(SUPPORT_INTERMEDIATES)/javalib.jar:$(DOM_INTERMEDIATES)/javalib.jar:$(XML_INTERMEDIATES)/javalib.jar:$(TESTS_INTERMEDIATES)/javalib.jar:$(HOST_OUT_JAVA_LIBRARIES)/descGen.jar:$(HOST_JDK_TOOLS_JAR)
+CORETESTS_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core-tests,,COMMON)
+
+GEN_CLASSPATH := $(CORE_INTERMEDIATES)/classes.jar:$(BOUNCYCASTLE_INTERMEDIATES)/classes.jar:$(APACHEXML_INTERMEDIATES)/classes.jar:$(JUNIT_INTERMEDIATES)/classes.jar:$(SQLITEJDBC_INTERMEDIATES)/javalib.jar:$(CORETESTS_INTERMEDIATES)/javalib.jar
 
 $(cts_dir)/all_cts_core_files_stamp: PRIVATE_CLASSPATH:=$(GEN_CLASSPATH)
-$(cts_dir)/all_cts_core_files_stamp: PRIVATE_JAVAOPTS:=-Xmx256M
-$(cts_dir)/all_cts_core_files_stamp: PRIVATE_PARAMS:=-Dcts.useSuppliedTestResult=true
-$(cts_dir)/all_cts_core_files_stamp: PRIVATE_PARAMS+=-Dcts.useEnhancedJunit=true
 # Why does this depend on javalib.jar instead of classes.jar?  Because
 # even though the tool will operate on the classes.jar files, the
 # build system requires that dependencies use javalib.jar.  If
 # javalib.jar is up-to-date, then classes.jar is as well.  Depending
 # on classes.jar will build the files incorrectly.
-$(cts_dir)/all_cts_core_files_stamp: $(CTS_CORE_CASE_LIST) $(HOST_OUT_JAVA_LIBRARIES)/descGen.jar $(CORE_INTERMEDIATES)/javalib.jar $(JUNIT_INTERMEDIATES)/javalib.jar $(RUNNER_INTERMEDIATES)/javalib.jar $(SUPPORT_INTERMEDIATES)/javalib.jar $(DOM_INTERMEDIATES)/javalib.jar $(XML_INTERMEDIATES)/javalib.jar $(TESTS_INTERMEDIATES)/javalib.jar $(cts_dir)/all_cts_files_stamp | $(ACP)
-	$(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.dom,\
-		cts/tests/core/dom/AndroidManifest.xml,\
-		tests.dom.AllTests, libcore/expectations)
-	$(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.luni.io,\
-		cts/tests/core/luni-io/AndroidManifest.xml,\
-		tests.luni.AllTestsIo, libcore/expectations)
-	$(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.luni.lang,\
-		cts/tests/core/luni-lang/AndroidManifest.xml,\
-		tests.luni.AllTestsLang, libcore/expectations)
-	$(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.luni.net,\
-		cts/tests/core/luni-net/AndroidManifest.xml,\
-		tests.luni.AllTestsNet, libcore/expectations)
-	$(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.luni.util,\
-		cts/tests/core/luni-util/AndroidManifest.xml,\
-		tests.luni.AllTestsUtil, libcore/expectations)
-	$(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.xml,\
-		cts/tests/core/xml/AndroidManifest.xml,\
-		tests.xml.AllTests, libcore/expectations)
+$(cts_dir)/all_cts_core_files_stamp: $(CTS_CORE_CASE_LIST) $(HOST_OUT_JAVA_LIBRARIES)/descGen.jar $(CORE_INTERMEDIATES)/javalib.jar $(BOUNCYCASTLE_INTERMEDIATES)/javalib.jar $(APACHEXML_INTERMEDIATES)/javalib.jar $(SQLITEJDBC_INTERMEDIATES)/javalib.jar $(JUNIT_INTERMEDIATES)/javalib.jar $(CORETESTS_INTERMEDIATES)/javalib.jar $(cts_dir)/all_cts_files_stamp | $(ACP)
+	$(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.libcore.package.dalvik,\
+		cts/tests/core/libcore/dalvik/AndroidManifest.xml,\
+		$(CORETESTS_INTERMEDIATES)/javalib.jar,dalvik,\
+		libcore/expectations)
+	$(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.libcore.package.com,\
+		cts/tests/core/libcore/com/AndroidManifest.xml,\
+		$(CORETESTS_INTERMEDIATES)/javalib.jar,com,\
+		libcore/expectations)
+	$(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.libcore.package.sun,\
+		cts/tests/core/libcore/sun/AndroidManifest.xml,\
+		$(CORETESTS_INTERMEDIATES)/javalib.jar,sun,\
+		libcore/expectations)
+	$(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.libcore.package.tests,\
+		cts/tests/core/libcore/tests/AndroidManifest.xml,\
+		$(CORETESTS_INTERMEDIATES)/javalib.jar,tests,\
+		libcore/expectations)
+	$(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.libcore.package.org,\
+		cts/tests/core/libcore/org/AndroidManifest.xml,\
+		$(CORETESTS_INTERMEDIATES)/javalib.jar,org,\
+		libcore/expectations)
+	$(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.libcore.package.libcore,\
+		cts/tests/core/libcore/libcore/AndroidManifest.xml,\
+		$(CORETESTS_INTERMEDIATES)/javalib.jar,libcore,\
+		libcore/expectations)
 	$(hide) touch $@
 
 
 # ----- Generate the test descriptions for the vm-tests -----
+#  TODO: remove this section once cts-tf replaces cts.
 #
 CORE_VM_TEST_DESC := $(cts_dir)/$(cts_name)/repository/testcases/android.core.vm-tests
 
@@ -131,22 +135,41 @@
 # core tests only needed to get hold of junit-framework-classes
 CORE_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core,,COMMON)
 JUNIT_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core-junit,,COMMON)
-RUNNER_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core-junitrunner,,COMMON)
-TESTS_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core-tests,,COMMON)
 
-GEN_CLASSPATH := $(CORE_INTERMEDIATES)/classes.jar:$(JUNIT_INTERMEDIATES)/classes.jar:$(RUNNER_INTERMEDIATES)/classes.jar:$(TESTS_INTERMEDIATES)/classes.jar:$(VMTESTS_INTERMEDIATES)/android.core.vm-tests.jar:$(HOST_OUT_JAVA_LIBRARIES)/descGen.jar:$(HOSTTESTLIB_JAR):$(DDMLIB_JAR):$(HOST_JDK_TOOLS_JAR)
+GEN_CLASSPATH := $(CORE_INTERMEDIATES)/classes.jar:$(JUNIT_INTERMEDIATES)/classes.jar:$(VMTESTS_INTERMEDIATES)/android.core.vm-tests.jar:$(HOSTTESTLIB_JAR):$(DDMLIB_JAR)
 
 $(CORE_VM_TEST_DESC): PRIVATE_CLASSPATH:=$(GEN_CLASSPATH)
-$(CORE_VM_TEST_DESC): PRIVATE_PARAMS:=-Dcts.useSuppliedTestResult=true
-$(CORE_VM_TEST_DESC): PRIVATE_PARAMS+=-Dcts.useEnhancedJunit=true
-$(CORE_VM_TEST_DESC): PRIVATE_JAVAOPTS:=-Xmx256M
 # Please see big comment above on why this line depends on javalib.jar instead of classes.jar
-$(CORE_VM_TEST_DESC): vm-tests $(HOST_OUT_JAVA_LIBRARIES)/descGen.jar $(CORE_INTERMEDIATES)/javalib.jar $(JUNIT_INTERMEDIATES)/javalib.jar $(RUNNER_INTERMEDIATES)/javalib.jar $(VMTESTS_INTERMEDIATES)/android.core.vm-tests.jar $(TESTS_INTERMEDIATES)/javalib.jar  $(HOSTTESTLIB_JAR) $(DDMLIB_JAR) $(cts_dir)/all_cts_files_stamp | $(ACP)
+$(CORE_VM_TEST_DESC): vm-tests $(HOST_OUT_JAVA_LIBRARIES)/descGen.jar $(CORE_INTERMEDIATES)/javalib.jar $(JUNIT_INTERMEDIATES)/javalib.jar $(VMTESTS_INTERMEDIATES)/android.core.vm-tests.jar $(HOSTTESTLIB_JAR) $(DDMLIB_JAR) $(cts_dir)/all_cts_files_stamp | $(ACP)
 	$(call generate-core-test-description,$(CORE_VM_TEST_DESC),\
 		cts/tests/vm-tests/AndroidManifest.xml,\
-		dot.junit.AllJunitHostTests, libcore/expectations, cts/tools/vm-tests/Android.mk)
+		$(VMTESTS_INTERMEDIATES)/android.core.vm-tests.jar,"",\
+		libcore/expectations,\
+		cts/tools/vm-tests/Android.mk)
 	$(ACP) -fv $(VMTESTS_INTERMEDIATES)/android.core.vm-tests.jar $(PRIVATE_DIR)/repository/testcases/android.core.vm-tests.jar
 
+# ----- Generate the test descriptions for the vm-tests-tf -----
+#
+CORE_VM_TEST_TF_DESC := $(cts_dir)/$(cts_name)/repository/testcases/android.core.vm-tests-tf
+
+VMTESTSTF_INTERMEDIATES :=$(call intermediates-dir-for,EXECUTABLES,vm-tests-tf,1,)
+# core tests only needed to get hold of junit-framework-classes
+CORE_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core,,COMMON)
+JUNIT_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core-junit,,COMMON)
+
+GEN_CLASSPATH := $(CORE_INTERMEDIATES)/classes.jar:$(JUNIT_INTERMEDIATES)/classes.jar:$(VMTESTSTF_INTERMEDIATES)/android.core.vm-tests-tf.jar:$(DDMLIB_JAR):$(TF_JAR)
+
+$(CORE_VM_TEST_TF_DESC): PRIVATE_CLASSPATH:=$(GEN_CLASSPATH)
+# Please see big comment above on why this line depends on javalib.jar instead of classes.jar
+$(CORE_VM_TEST_TF_DESC): $(HOST_OUT_JAVA_LIBRARIES)/descGen.jar $(CORE_INTERMEDIATES)/javalib.jar $(JUNIT_INTERMEDIATES)/javalib.jar $(VMTESTSTF_INTERMEDIATES)/android.core.vm-tests-tf.jar $(DDMLIB_JAR) $(cts_dir)/all_cts_files_stamp | $(ACP)
+	$(call generate-core-test-description,$(CORE_VM_TEST_TF_DESC),\
+		cts/tests/vm-tests-tf/AndroidManifest.xml,\
+		$(VMTESTSTF_INTERMEDIATES)/android.core.vm-tests-tf.jar,"",\
+		libcore/expectations,\
+		cts/tools/vm-tests-tf/Android.mk)
+	$(ACP) -fv $(VMTESTSTF_INTERMEDIATES)/android.core.vm-tests-tf.jar $(PRIVATE_DIR)/repository/testcases/android.core.vm-tests-tf.jar
+
+
 # Move app security host-side tests to the repository
 APP_SECURITY_LIB := $(cts_dir)/$(cts_name)/repository/testcases/CtsAppSecurityTests.jar
 
@@ -155,7 +178,7 @@
 
 # Generate the default test plan for User.
 # Usage: buildCts.py <testRoot> <ctsOutputDir> <tempDir> <androidRootDir> <docletPath>
-$(DEFAULT_TEST_PLAN): $(cts_dir)/all_cts_files_stamp $(cts_dir)/all_cts_core_files_stamp $(cts_tools_src_dir)/utils/buildCts.py $(CORE_VM_TEST_DESC) $(APP_SECURITY_LIB) $(HOST_OUT_JAVA_LIBRARIES)/descGen.jar
+$(DEFAULT_TEST_PLAN): $(cts_dir)/all_cts_files_stamp $(cts_dir)/all_cts_core_files_stamp $(cts_tools_src_dir)/utils/buildCts.py $(CORE_VM_TEST_TF_DESC) $(CORE_VM_TEST_DESC) $(APP_SECURITY_LIB) $(HOST_OUT_JAVA_LIBRARIES)/descGen.jar
 	$(hide) $(cts_tools_src_dir)/utils/buildCts.py cts/tests/tests/ $(PRIVATE_DIR) $(TMP_DIR) \
 		$(TOP) $(HOST_OUT_JAVA_LIBRARIES)/descGen.jar
 
diff --git a/core/tasks/sdk-addon.mk b/core/tasks/sdk-addon.mk
index abbf999..797314a 100644
--- a/core/tasks/sdk-addon.mk
+++ b/core/tasks/sdk-addon.mk
@@ -58,7 +58,6 @@
         $(BUILT_SYSTEMIMAGE):images/$(TARGET_CPU_ABI)/system.img \
         $(BUILT_USERDATAIMAGE_TARGET):images/$(TARGET_CPU_ABI)/userdata.img \
         $(BUILT_RAMDISK_TARGET):images/$(TARGET_CPU_ABI)/ramdisk.img \
-        $(ANDROID_PRODUCT_OUT)/system/build.prop:images/$(TARGET_CPU_ABI)/build.prop \
         $(target_notice_file_txt):images/$(TARGET_CPU_ABI)/NOTICE.txt
 
 # Generate rules to copy the requested files
diff --git a/core/user_tags.mk b/core/user_tags.mk
index 090b7fa..6b77bec 100644
--- a/core/user_tags.mk
+++ b/core/user_tags.mk
@@ -49,7 +49,6 @@
 	apkcheck \
 	applypatch \
 	app_process \
-	apriori \
 	archquery \
 	asm-3.1 \
 	atree \
@@ -155,8 +154,6 @@
 	input \
 	ip \
 	iptables \
-	iself \
-	isprelinked \
 	jarjar \
 	javax.obex \
 	jcommon-1.0.12 \
@@ -221,7 +218,6 @@
 	libeffects \
 	libEGL \
 	libelf \
-	libelfcopy \
 	libESR_Portable \
 	libESR_Shared \
 	libETC1 \
@@ -480,8 +476,6 @@
 	signapk \
 	signature-tools \
 	simg2img \
-	simulator \
-	soslim \
 	spec-progress \
 	sqlite3 \
 	stack_dump \
diff --git a/core/version_defaults.mk b/core/version_defaults.mk
index 6216463..986dac9 100644
--- a/core/version_defaults.mk
+++ b/core/version_defaults.mk
@@ -41,7 +41,7 @@
   # which is the version that we reveal to the end user.
   # Update this value when the platform version changes (rather
   # than overriding it somewhere else).  Can be an arbitrary string.
-  PLATFORM_VERSION := 3.1.4.1.5.9.2.6.5
+  PLATFORM_VERSION := IceCreamSandwich
 endif
 
 ifeq "" "$(PLATFORM_SDK_VERSION)"
@@ -59,7 +59,7 @@
 ifeq "" "$(PLATFORM_VERSION_CODENAME)"
   # This is the current development code-name, if the build is not a final
   # release build.  If this is a final release build, it is simply "REL".
-  PLATFORM_VERSION_CODENAME := AOSP
+  PLATFORM_VERSION_CODENAME := IceCreamSandwich
 endif
 
 ifeq "" "$(DEFAULT_APP_TARGET_SDK)"
diff --git a/envsetup.sh b/envsetup.sh
index a65d39b..305866e 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -54,8 +54,9 @@
         return
     fi
     CALLED_FROM_SETUP=true BUILD_SYSTEM=build/core \
-        TARGET_PRODUCT=$1 TARGET_BUILD_VARIANT= \
-        TARGET_SIMULATOR= TARGET_BUILD_TYPE= \
+        TARGET_PRODUCT=$1 \
+        TARGET_BUILD_VARIANT= \
+        TARGET_BUILD_TYPE= \
         TARGET_BUILD_APPS= \
         get_build_var TARGET_DEVICE > /dev/null
     # hide successful answers, but allow the errors to show
@@ -104,6 +105,8 @@
     fi
     if [ -n "$ANDROID_PRE_BUILD_PATHS" ] ; then
         export PATH=${PATH/$ANDROID_PRE_BUILD_PATHS/}
+        # strip trailing ':', if any
+        export PATH=${PATH/%:/}
     fi
 
     # and in with the new
@@ -129,12 +132,11 @@
     export PATH=$PATH$ANDROID_BUILD_PATHS
 
     unset ANDROID_JAVA_TOOLCHAIN
+    unset ANDROID_PRE_BUILD_PATHS
     if [ -n "$JAVA_HOME" ]; then
         export ANDROID_JAVA_TOOLCHAIN=$JAVA_HOME/bin
-    fi
-    export ANDROID_PRE_BUILD_PATHS=$ANDROID_JAVA_TOOLCHAIN
-    if [ -n "$ANDROID_PRE_BUILD_PATHS" ]; then
-        export PATH=$ANDROID_PRE_BUILD_PATHS:$PATH
+        export ANDROID_PRE_BUILD_PATHS=$ANDROID_JAVA_TOOLCHAIN:
+        export PATH=$ANDROID_PRE_BUILD_PATHS$PATH
     fi
 
     unset ANDROID_PRODUCT_OUT
@@ -147,9 +149,6 @@
     # needed for building linux on MacOS
     # TODO: fix the path
     #export HOST_EXTRACFLAGS="-I "$T/system/kernel_headers/host_include
-
-    # needed for OProfile to post-process collected samples
-    export OPROFILE_EVENTS_DIR=$prebuiltdir/oprofile
 }
 
 function printconfig()
@@ -191,74 +190,6 @@
     fi
 }
 
-case `uname -s` in
-    Linux)
-        function choosesim()
-        {
-            echo "Build for the simulator or the device?"
-            echo "     1. Device"
-            echo "     2. Simulator"
-            echo
-
-            export TARGET_SIMULATOR=
-            local ANSWER
-            while [ -z $TARGET_SIMULATOR ]
-            do
-                echo -n "Which would you like? [1] "
-                if [ -z "$1" ] ; then
-                    read ANSWER
-                else
-                    echo $1
-                    ANSWER=$1
-                fi
-                case $ANSWER in
-                "")
-                    export TARGET_SIMULATOR=false
-                    ;;
-                1)
-                    export TARGET_SIMULATOR=false
-                    ;;
-                Device)
-                    export TARGET_SIMULATOR=false
-                    ;;
-                2)
-                    export TARGET_SIMULATOR=true
-                    ;;
-                Simulator)
-                    export TARGET_SIMULATOR=true
-                    ;;
-                *)
-                    echo
-                    echo "I didn't understand your response.  Please try again."
-                    echo
-                    ;;
-                esac
-                if [ -n "$1" ] ; then
-                    break
-                fi
-            done
-
-            set_stuff_for_environment
-        }
-        ;;
-    *)
-        function choosesim()
-        {
-            echo "Only device builds are supported for" `uname -s`
-            echo "     Forcing TARGET_SIMULATOR=false"
-            echo
-            if [ -z "$1" ]
-            then
-                echo -n "Press enter: "
-                read
-            fi
-
-            export TARGET_SIMULATOR=false
-            set_stuff_for_environment
-        }
-        ;;
-esac
-
 function choosetype()
 {
     echo "Build type choices are:"
@@ -267,13 +198,8 @@
     echo
 
     local DEFAULT_NUM DEFAULT_VALUE
-    if [ $TARGET_SIMULATOR = "false" ] ; then
-        DEFAULT_NUM=1
-        DEFAULT_VALUE=release
-    else
-        DEFAULT_NUM=2
-        DEFAULT_VALUE=debug
-    fi
+    DEFAULT_NUM=1
+    DEFAULT_VALUE=release
 
     export TARGET_BUILD_TYPE=
     local ANSWER
@@ -327,11 +253,7 @@
     if [ "x$TARGET_PRODUCT" != x ] ; then
         default_value=$TARGET_PRODUCT
     else
-        if [ "$TARGET_SIMULATOR" = true ] ; then
-            default_value=sim
-        else
-            default_value=full
-        fi
+        default_value=full
     fi
 
     export TARGET_PRODUCT=
@@ -413,19 +335,15 @@
 
 function choosecombo()
 {
-    choosesim $1
+    choosetype $1
 
     echo
     echo
-    choosetype $2
+    chooseproduct $2
 
     echo
     echo
-    chooseproduct $3
-
-    echo
-    echo
-    choosevariant $4
+    choosevariant $3
 
     echo
     set_stuff_for_environment
@@ -488,9 +406,6 @@
     if [ -z "$answer" ]
     then
         selection=full-eng
-    elif [ "$answer" = "simulator" ]
-    then
-        selection=simulator
     elif (echo -n $answer | grep -q -e "^[0-9][0-9]*$")
     then
         if [ $answer -le ${#LUNCH_MENU_CHOICES[@]} ]
@@ -511,45 +426,35 @@
 
     export TARGET_BUILD_APPS=
 
-    # special case the simulator
-    if [ "$selection" = "simulator" ]
+    local product=$(echo -n $selection | sed -e "s/-.*$//")
+    check_product $product
+    if [ $? -ne 0 ]
     then
-        export TARGET_PRODUCT=sim
-        export TARGET_BUILD_VARIANT=eng
-        export TARGET_SIMULATOR=true
-        export TARGET_BUILD_TYPE=debug
-    else
-        local product=$(echo -n $selection | sed -e "s/-.*$//")
-        check_product $product
-        if [ $? -ne 0 ]
-        then
-            echo
-            echo "** Don't have a product spec for: '$product'"
-            echo "** Do you have the right repo manifest?"
-            product=
-        fi
+        echo
+        echo "** Don't have a product spec for: '$product'"
+        echo "** Do you have the right repo manifest?"
+        product=
+    fi
 
-        local variant=$(echo -n $selection | sed -e "s/^[^\-]*-//")
-        check_variant $variant
-        if [ $? -ne 0 ]
-        then
-            echo
-            echo "** Invalid variant: '$variant'"
-            echo "** Must be one of ${VARIANT_CHOICES[@]}"
-            variant=
-        fi
+    local variant=$(echo -n $selection | sed -e "s/^[^\-]*-//")
+    check_variant $variant
+    if [ $? -ne 0 ]
+    then
+        echo
+        echo "** Invalid variant: '$variant'"
+        echo "** Must be one of ${VARIANT_CHOICES[@]}"
+        variant=
+    fi
 
-        if [ -z "$product" -o -z "$variant" ]
-        then
-            echo
-            return 1
-        fi
+    if [ -z "$product" -o -z "$variant" ]
+    then
+        echo
+        return 1
+    fi
 
-        export TARGET_PRODUCT=$product
-        export TARGET_BUILD_VARIANT=$variant
-        export TARGET_SIMULATOR=false
-        export TARGET_BUILD_TYPE=release
-    fi # !simulator
+    export TARGET_PRODUCT=$product
+    export TARGET_BUILD_VARIANT=$variant
+    export TARGET_BUILD_TYPE=release
 
     echo
 
@@ -590,7 +495,6 @@
 
     export TARGET_PRODUCT=full
     export TARGET_BUILD_VARIANT=$variant
-    export TARGET_SIMULATOR=false
     export TARGET_BUILD_TYPE=release
     export TARGET_BUILD_APPS=$apps
 
@@ -795,7 +699,11 @@
        local PID
        local PROG="$3"
        if [ "$PROG" ] ; then
-           PID=`pid $3`
+           if [[ "$PROG" =~ ^[0-9]+$ ]] ; then
+               PID="$3"
+           else
+               PID=`pid $3`
+           fi
            adb forward "tcp$PORT" "tcp$PORT"
            adb shell gdbserver $PORT --attach $PID &
            sleep 2
@@ -824,55 +732,55 @@
     Darwin)
         function sgrep()
         {
-            find -E . -type f -iregex '.*\.(c|h|cpp|S|java|xml|sh|mk)' -print0 | xargs -0 grep --color -n "$@"
+            find -E . -name .repo -prune -o -name .git -prune -o  -type f -iregex '.*\.(c|h|cpp|S|java|xml|sh|mk)' -print0 | xargs -0 grep --color -n "$@"
         }
 
         ;;
     *)
         function sgrep()
         {
-            find . -type f -iregex '.*\.\(c\|h\|cpp\|S\|java\|xml\|sh\|mk\)' -print0 | xargs -0 grep --color -n "$@"
+            find . -name .repo -prune -o -name .git -prune -o  -type f -iregex '.*\.\(c\|h\|cpp\|S\|java\|xml\|sh\|mk\)' -print0 | xargs -0 grep --color -n "$@"
         }
         ;;
 esac
 
 function jgrep()
 {
-    find . -type f -name "*\.java" -print0 | xargs -0 grep --color -n "$@"
+    find . -name .repo -prune -o -name .git -prune -o  -type f -name "*\.java" -print0 | xargs -0 grep --color -n "$@"
 }
 
 function cgrep()
 {
-    find . -type f \( -name '*.c' -o -name '*.cc' -o -name '*.cpp' -o -name '*.h' \) -print0 | xargs -0 grep --color -n "$@"
+    find . -name .repo -prune -o -name .git -prune -o -type f \( -name '*.c' -o -name '*.cc' -o -name '*.cpp' -o -name '*.h' \) -print0 | xargs -0 grep --color -n "$@"
 }
 
 function resgrep()
 {
-    for dir in `find . -name res -type d`; do find $dir -type f -name '*\.xml' -print0 | xargs -0 grep --color -n "$@"; done;
+    for dir in `find . -name .repo -prune -o -name .git -prune -o -name res -type d`; do find $dir -type f -name '*\.xml' -print0 | xargs -0 grep --color -n "$@"; done;
 }
 
 case `uname -s` in
     Darwin)
         function mgrep()
         {
-            find -E . -type f -iregex '.*/(Makefile|Makefile\..*|.*\.make|.*\.mak|.*\.mk)' -print0 | xargs -0 grep --color -n "$@"
+            find -E . -name .repo -prune -o -name .git -prune -o  -type f -iregex '.*/(Makefile|Makefile\..*|.*\.make|.*\.mak|.*\.mk)' -print0 | xargs -0 grep --color -n "$@"
         }
 
         function treegrep()
         {
-            find -E . -type f -iregex '.*\.(c|h|cpp|S|java|xml)' -print0 | xargs -0 grep --color -n -i "$@"
+            find -E . -name .repo -prune -o -name .git -prune -o -type f -iregex '.*\.(c|h|cpp|S|java|xml)' -print0 | xargs -0 grep --color -n -i "$@"
         }
 
         ;;
     *)
         function mgrep()
         {
-            find . -regextype posix-egrep -iregex '(.*\/Makefile|.*\/Makefile\..*|.*\.make|.*\.mak|.*\.mk)' -type f -print0 | xargs -0 grep --color -n "$@"
+            find . -name .repo -prune -o -name .git -prune -o -regextype posix-egrep -iregex '(.*\/Makefile|.*\/Makefile\..*|.*\.make|.*\.mak|.*\.mk)' -type f -print0 | xargs -0 grep --color -n "$@"
         }
 
         function treegrep()
         {
-            find . -regextype posix-egrep -iregex '.*\.(c|h|cpp|S|java|xml)' -type f -print0 | xargs -0 grep --color -n -i "$@"
+            find . -name .repo -prune -o -name .git -prune -o -regextype posix-egrep -iregex '.*\.(c|h|cpp|S|java|xml)' -type f -print0 | xargs -0 grep --color -n -i "$@"
         }
 
         ;;
@@ -1076,7 +984,7 @@
         echo ""
     fi
     local lines
-    lines=($(grep "$1" $T/filelist | sed -e 's/\/[^/]*$//' | sort | uniq)) 
+    lines=($(grep "$1" $T/filelist | sed -e 's/\/[^/]*$//' | sort | uniq))
     if [[ ${#lines[@]} = 0 ]]; then
         echo "Not found"
         return
@@ -1089,7 +997,7 @@
             local line
             for line in ${lines[@]}; do
                 printf "%6s %s\n" "[$index]" $line
-                index=$(($index + 1)) 
+                index=$(($index + 1))
             done
             echo
             echo -n "Select one: "
diff --git a/target/board/Android.mk b/target/board/Android.mk
index 54ee9e7..58164f6 100644
--- a/target/board/Android.mk
+++ b/target/board/Android.mk
@@ -27,10 +27,14 @@
 # with everything else.
 #
 # If the file "board-info.txt" appears in $(TARGET_DEVICE_DIR),
-# it will be appended to the output file.
+# it will be used; otherwise TARGET_BOARD_INFO_FILE is used, which
+# can be set in BoardConfig.mk.
 #
 INSTALLED_ANDROID_INFO_TXT_TARGET := $(PRODUCT_OUT)/android-info.txt
 board_info_txt := $(wildcard $(TARGET_DEVICE_DIR)/board-info.txt)
+ifndef board_info_txt
+board_info_txt := $(TARGET_BOARD_INFO_FILE)
+endif
 $(INSTALLED_ANDROID_INFO_TXT_TARGET): $(board_info_txt)
 	$(call pretty,"Generated: ($@)")
 ifdef board_info_txt
diff --git a/target/board/generic/BoardConfig.mk b/target/board/generic/BoardConfig.mk
index 3ba648d..d02205b 100644
--- a/target/board/generic/BoardConfig.mk
+++ b/target/board/generic/BoardConfig.mk
@@ -28,11 +28,5 @@
 # no hardware camera
 USE_CAMERA_STUB := true
 
-# Set /system/bin/sh to mksh, not ash, to test the transition.
-TARGET_SHELL := mksh
-
-# Enable dex-preoptimization to speed up the first boot sequence
-# of an SDK AVD. Note that this operation only works on Linux for now
-ifeq ($(HOST_OS),linux)
-WITH_DEXPREOPT := true
-endif
+# Set /system/bin/sh to ash, not mksh, to make sure we can switch back.
+TARGET_SHELL := ash
diff --git a/target/board/generic/device.mk b/target/board/generic/device.mk
index 0b4dc27..f57a0dc 100644
--- a/target/board/generic/device.mk
+++ b/target/board/generic/device.mk
@@ -24,3 +24,6 @@
 PRODUCT_COPY_FILES := \
     development/data/etc/apns-conf.xml:system/etc/apns-conf.xml \
     development/data/etc/vold.conf:system/etc/vold.conf
+
+PRODUCT_PACKAGES := \
+    audio.primary.goldfish
diff --git a/target/board/generic_x86/BoardConfig.mk b/target/board/generic_x86/BoardConfig.mk
index 0206434..7277908 100644
--- a/target/board/generic_x86/BoardConfig.mk
+++ b/target/board/generic_x86/BoardConfig.mk
@@ -18,11 +18,5 @@
 # no hardware camera
 USE_CAMERA_STUB := true
 
-# Set /system/bin/sh to mksh, not ash, to test the transition.
-TARGET_SHELL := mksh
-
-# Enable dex-preoptimization to speed up the first boot sequence
-# of an SDK AVD. Note that this operation only works on Linux for now
-ifeq ($(HOST_OS),linux)
-WITH_DEXPREOPT := true
-endif
+# Set /system/bin/sh to ash, not mksh, to make sure we can switch back.
+TARGET_SHELL := ash
diff --git a/target/board/sim/AndroidBoard.mk b/target/board/sim/AndroidBoard.mk
deleted file mode 100644
index e69de29..0000000
--- a/target/board/sim/AndroidBoard.mk
+++ /dev/null
diff --git a/target/board/sim/BoardConfig.mk b/target/board/sim/BoardConfig.mk
deleted file mode 100644
index ba25c18..0000000
--- a/target/board/sim/BoardConfig.mk
+++ /dev/null
@@ -1,31 +0,0 @@
-# config.mk
-# 
-# Product-specific compile-time definitions.
-#
-
-# Don't try prelinking or compressing the shared libraries
-# used by the simulator.  The host OS won't know what to do
-# with them, and they may not even be ELF files.
-#
-# These definitions override the defaults in config/config.make.
-TARGET_COMPRESS_MODULE_SYMBOLS := false
-TARGET_PRELINK_MODULE := false
-
-# Don't try to build a bootloader.
-TARGET_NO_BOOTLOADER := true
-
-# Don't bother with a kernel
-TARGET_NO_KERNEL := true
-
-# The simulator does not support native code at all
-TARGET_CPU_ABI := none
-
-# But it is very likely SMP.
-TARGET_CPU_SMP := true
-
-#the simulator partially emulates the original HTC /dev/eac audio interface
-HAVE_HTC_AUDIO_DRIVER := true
-BOARD_USES_GENERIC_AUDIO := true
-
-# no hardware camera
-USE_CAMERA_STUB := true
diff --git a/target/board/vbox_x86/AndroidBoard.mk b/target/board/vbox_x86/AndroidBoard.mk
index 2af7dcd..8b13789 100644
--- a/target/board/vbox_x86/AndroidBoard.mk
+++ b/target/board/vbox_x86/AndroidBoard.mk
@@ -1,7 +1 @@
-LOCAL_PATH := $(call my-dir)
 
-LOCAL_KERNEL := prebuilt/android-x86/kernel/kernel-vbox
-
-PRODUCT_COPY_FILES += \
-    $(LOCAL_KERNEL):kernel \
-    $(LOCAL_PATH)/init.rc:root/init.rc
diff --git a/target/board/vbox_x86/BoardConfig.mk b/target/board/vbox_x86/BoardConfig.mk
index 525074e..94df57c 100644
--- a/target/board/vbox_x86/BoardConfig.mk
+++ b/target/board/vbox_x86/BoardConfig.mk
@@ -5,7 +5,6 @@
 TARGET_ARCH=x86
 DISABLE_DEXPREOPT := true
 TARGET_COMPRESS_MODULE_SYMBOLS := false
-TARGET_PRELINK_MODULE := false
 TARGET_NO_RECOVERY := true
 TARGET_HARDWARE_3D := false
 BOARD_USES_GENERIC_AUDIO := true
@@ -18,16 +17,20 @@
 
 # For VirtualBox and likely other emulators
 BOARD_INSTALLER_CMDLINE := init=/init console=ttyS0 console=tty0 vga=788 verbose
-BOARD_KERNEL_CMDLINE :=    init=/init console=ttyS0 console=tty0 vga=788 verbose androidboot.hardware=generic_x86 androidboot.console=ttyS0
+BOARD_KERNEL_CMDLINE := init=/init qemu=1 console=ttyS0 console=tty0 vga=788 verbose androidboot.hardware=vbox_x86 androidboot.console=ttyS0 android.qemud=ttyS1
 TARGET_USE_DISKINSTALLER := true
 
 TARGET_DISK_LAYOUT_CONFIG := build/target/board/vbox_x86/disk_layout.conf
 BOARD_BOOTIMAGE_MAX_SIZE := 8388608
 BOARD_SYSLOADER_MAX_SIZE := 7340032
 BOARD_FLASH_BLOCK_SIZE := 512
-BOARD_USERDATAIMAGE_PARTITION_SIZE := 50M
-BOARD_INSTALLERIMAGE_PARTITION_SIZE := 500M
+# 50M
+BOARD_USERDATAIMAGE_PARTITION_SIZE := 52428800
+# 500M
+BOARD_INSTALLERIMAGE_PARTITION_SIZE := 524288000
 TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true
+# Reserve 265M  for the system partition
+BOARD_SYSTEMIMAGE_PARTITION_SIZE := 268435456
 
 
 # The eth0 device should be started with dhcp on boot.
diff --git a/target/board/vbox_x86/device.mk b/target/board/vbox_x86/device.mk
index 0b4dc27..a028b98 100644
--- a/target/board/vbox_x86/device.mk
+++ b/target/board/vbox_x86/device.mk
@@ -17,10 +17,17 @@
 # This is a build configuration for the product aspects that
 # are specific to the emulator.
 
+LOCAL_PATH := $(call my-dir)
+
 PRODUCT_PROPERTY_OVERRIDES := \
     ro.ril.hsxpa=1 \
     ro.ril.gprsclass=10
 
+LOCAL_KERNEL := prebuilt/android-x86/kernel/kernel-vbox
+
 PRODUCT_COPY_FILES := \
     development/data/etc/apns-conf.xml:system/etc/apns-conf.xml \
-    development/data/etc/vold.conf:system/etc/vold.conf
+    development/data/etc/vold.conf:system/etc/vold.conf \
+    build/target/board/vbox_x86/init.rc:root/init.rc \
+    build/target/board/vbox_x86/init.vbox_x86.rc:root/init.vbox_x86.rc \
+    $(LOCAL_KERNEL):kernel
diff --git a/target/board/vbox_x86/init.vbox_x86.rc b/target/board/vbox_x86/init.vbox_x86.rc
new file mode 100644
index 0000000..4c5d55c
--- /dev/null
+++ b/target/board/vbox_x86/init.vbox_x86.rc
@@ -0,0 +1,52 @@
+on boot
+    setprop ARGH ARGH
+    setprop net.eth0.dns1 10.0.2.3
+    setprop net.gprs.local-ip 10.0.2.15
+    setprop ro.radio.use-ppp no
+    setprop ro.build.product generic
+    setprop ro.product.device generic
+
+# fake some battery state
+    setprop status.battery.state Slow
+    setprop status.battery.level 5
+    setprop status.battery.level_raw  50
+    setprop status.battery.level_scale 9
+
+# disable some daemons the emulator doesn't want
+    stop dund
+    stop akmd
+
+    setprop ro.setupwizard.mode EMULATOR
+
+# enable Google-specific location features,
+# like NetworkLocationProvider and LocationCollector
+    setprop ro.com.google.locationfeatures 1
+
+# For the emulator, which bypasses Setup Wizard, you can specify
+# account info for the device via these two properties.  Google
+# Login Service will insert these accounts into the database when
+# it is created (ie, after a data wipe).
+#
+#   setprop ro.config.hosted_account username@hosteddomain.org:password
+#   setprop ro.config.google_account username@gmail.com:password
+#
+# You MUST have a Google account on the device, and you MAY
+# additionally have a hosted account.  No other configuration is
+# supported, and arbitrary breakage may result if you specify
+# something else.
+
+service goldfish-setup /system/etc/init.goldfish.sh
+   oneshot
+
+service qemud /system/bin/qemud
+    socket qemud    stream 666
+    oneshot
+
+# -Q is a special logcat option that forces the
+# program to check wether it runs on the emulator
+# if it does, it redirects its output to the device
+# named by the androidboot.console kernel option
+# if not, is simply exit immediately
+
+service goldfish-logcat /system/bin/logcat -Q
+    oneshot
diff --git a/target/product/AndroidProducts.mk b/target/product/AndroidProducts.mk
index fafd222..44b9000 100644
--- a/target/product/AndroidProducts.mk
+++ b/target/product/AndroidProducts.mk
@@ -41,6 +41,5 @@
     $(LOCAL_DIR)/vbox_x86.mk \
     $(LOCAL_DIR)/sdk.mk \
     $(LOCAL_DIR)/sdk_x86.mk \
-    $(LOCAL_DIR)/sim.mk \
     $(LOCAL_DIR)/large_emu_hw.mk
 endif
diff --git a/target/product/core.mk b/target/product/core.mk
index 3eb72d3..5ffb9f6 100644
--- a/target/product/core.mk
+++ b/target/product/core.mk
@@ -25,6 +25,9 @@
 PRODUCT_PACKAGES := \
     apache-xml \
     bouncycastle \
+    bu \
+    bluetooth-health \
+    cacerts \
     com.android.location.provider \
     com.android.location.provider.xml \
     core \
@@ -37,6 +40,7 @@
     dmtracedump \
     dx \
     ext \
+    filterfw \
     framework-res \
     hprof-conv \
     icu.dat \
@@ -46,6 +50,7 @@
     libdex \
     libdvm \
     libexpat \
+    libgabi++ \
     libicui18n \
     libicuuc \
     libjavacore \
@@ -55,16 +60,28 @@
     libOpenSLES \
     libsqlite_jni \
     libssl \
+    libstagefright_soft_aacdec \
+    libstagefright_soft_amrdec \
+    libstagefright_soft_avcdec \
+    libstagefright_soft_g711dec \
+    libstagefright_soft_mp3dec \
+    libstagefright_soft_mpeg4dec \
+    libstagefright_soft_vorbisdec \
+    libstagefright_soft_vpxdec \
     libwilhelm \
+    libfilterfw \
+    libfilterpack_imageproc \
     libz \
-    sqlite-jdbc \
     wpa_supplicant.conf \
+    KeyChain \
     Browser \
     Contacts \
     Home \
     HTMLViewer \
     ApplicationsProvider \
+    BackupRestoreConfirmation \
     ContactsProvider \
+    VoicemailProvider \
     DownloadProvider \
     DownloadProviderUi \
     MediaProvider \
@@ -78,12 +95,17 @@
     DefaultContainerService \
     Bugreport \
     ip \
-    screencap
+    screencap \
+    sensorservice \
+    libspeexresampler \
+    libwebrtc_audio_preprocessing
 
 # host-only dependencies
 ifeq ($(WITH_HOST_DALVIK),true)
     PRODUCT_PACKAGES += \
+        apache-xml-hostdex \
         bouncycastle-hostdex \
         core-hostdex \
-        libjavacore-host
+        libjavacore-host \
+        dalvik
 endif
diff --git a/target/product/full_base.mk b/target/product/full_base.mk
index 19f94ee..a8a32fe 100644
--- a/target/product/full_base.mk
+++ b/target/product/full_base.mk
@@ -20,12 +20,17 @@
 # in inherited configurations.
 
 PRODUCT_PACKAGES := \
+    drmserver \
+    libdrmframework \
+    libdrmframework_jni \
+    libfwdlockengine \
     OpenWnn \
+    PhotoEditor \
     PinyinIME \
-    VoiceDialer \
     libWnnEngDic \
     libWnnJpnDic \
     libwnndict \
+    VideoEditor \
     WAPPushManager
 
 # Additional settings used in all AOSP builds
diff --git a/target/product/full_base_telephony.mk b/target/product/full_base_telephony.mk
index 932ba95..c376314 100644
--- a/target/product/full_base_telephony.mk
+++ b/target/product/full_base_telephony.mk
@@ -19,6 +19,9 @@
 # build quite specifically for the emulator, and might not be
 # entirely appropriate to inherit from for on-device configurations.
 
+PRODUCT_PACKAGES := \
+    VoiceDialer
+
 PRODUCT_PROPERTY_OVERRIDES := \
     keyguard.no_require_sim=true \
     ro.com.android.dataroaming=true
diff --git a/target/product/generic_no_telephony.mk b/target/product/generic_no_telephony.mk
index 2a3aae7..020b0dd 100644
--- a/target/product/generic_no_telephony.mk
+++ b/target/product/generic_no_telephony.mk
@@ -31,7 +31,7 @@
     DrmProvider \
     Email \
     Exchange \
-    Gallery3D \
+    GalleryNew3D \
     LatinIME \
     Launcher2 \
     Music \
@@ -44,7 +44,7 @@
     Updater \
     CalendarProvider \
     SyncProvider \
-    CryptKeeper
+    VpnDialogs
 
 PRODUCT_PACKAGES += \
     icu.dat
@@ -55,14 +55,17 @@
     libvideoeditorplayer \
     libvideoeditor_core
 
+PRODUCT_PACKAGES += \
+    audio.primary.default \
+    audio_policy.default
 
 PRODUCT_COPY_FILES := \
         system/bluetooth/data/audio.conf:system/etc/bluetooth/audio.conf \
         system/bluetooth/data/auto_pairing.conf:system/etc/bluetooth/auto_pairing.conf \
         system/bluetooth/data/blacklist.conf:system/etc/bluetooth/blacklist.conf \
         system/bluetooth/data/input.conf:system/etc/bluetooth/input.conf \
-        system/bluetooth/data/main.nonsmartphone.conf:system/etc/bluetooth/main.conf \
-        system/bluetooth/data/network.conf:system/etc/bluetooth/network.conf
+        system/bluetooth/data/network.conf:system/etc/bluetooth/network.conf \
+        frameworks/base/media/libeffects/data/audio_effects.conf:system/etc/audio_effects.conf
 
 $(call inherit-product-if-exists, frameworks/base/data/fonts/fonts.mk)
 $(call inherit-product-if-exists, frameworks/base/data/keyboards/keyboards.mk)
diff --git a/target/product/languages_full.mk b/target/product/languages_full.mk
index 236dfa2..b18f78f 100644
--- a/target/product/languages_full.mk
+++ b/target/product/languages_full.mk
@@ -21,7 +21,5 @@
 
 # Those are all the locales that have translations and are displayable
 # by TextView in this branch.
-PRODUCT_LOCALES := en_US fr_FR it_IT es_ES de_DE nl_NL cs_CZ pl_PL ja_JP zh_TW zh_CN ru_RU ko_KR nb_NO es_US da_DK el_GR tr_TR pt_PT pt_BR rm_CH sv_SE bg_BG ca_ES en_GB fi_FI hr_HR hu_HU in_ID iw_IL lt_LT lv_LV ro_RO sk_SK sl_SI sr_RS uk_UA vi_VN tl_PH
-
-# Not currently usable:
-# ar, fa, th
+PRODUCT_LOCALES := en_US fr_FR it_IT es_ES de_DE nl_NL cs_CZ pl_PL ja_JP zh_TW zh_CN ru_RU ko_KR nb_NO es_US da_DK el_GR tr_TR pt_PT pt_BR rm_CH sv_SE bg_BG ca_ES en_GB fi_FI hr_HR hu_HU in_ID iw_IL lt_LT lv_LV ro_RO sk_SK sl_SI sr_RS uk_UA vi_VN tl_PH ar_EG fa_IR th_TH sw_TZ ms_MY af_ZA zu_ZA
+# We don't have the fonts to display am_ET yet
diff --git a/target/product/large_emu_hw.mk b/target/product/large_emu_hw.mk
index 139a9da..f38ef61 100644
--- a/target/product/large_emu_hw.mk
+++ b/target/product/large_emu_hw.mk
@@ -32,7 +32,7 @@
     DrmProvider \
     Email \
     Exchange \
-    Gallery3D \
+    GalleryNew3D \
     LatinIME \
     Launcher2 \
     Music \
diff --git a/target/product/locales_full.mk b/target/product/locales_full.mk
index cf10392..cab2b91 100644
--- a/target/product/locales_full.mk
+++ b/target/product/locales_full.mk
@@ -1,5 +1,3 @@
-# The locales from the ICU "-large.dat" data set.
-# See external/icu4c/stubdata.
-# This is distinct from "languages_full.mk", which contains those locales for
-# which we have translations. If you like, this file is i18n rather than l18n.
 PRODUCT_LOCALES := cs_CZ da_DK de_AT de_CH de_DE de_LI el_GR en_AU en_CA en_GB en_NZ en_SG en_US es_ES fr_CA fr_CH fr_BE fr_FR it_CH it_IT ja_JP ko_KR nb_NO nl_BE nl_NL pl_PL pt_PT ru_RU sv_SE tr_TR zh_CN zh_HK zh_TW
+
+$(call inherit-product, build/target/product/languages_full.mk)
diff --git a/target/product/sdk.mk b/target/product/sdk.mk
index 92de1b2..7e470b9 100644
--- a/target/product/sdk.mk
+++ b/target/product/sdk.mk
@@ -121,7 +121,8 @@
 	ninepatch-tests \
 	common-tests \
 	sdklib-tests \
-	sdkuilib-tests
+	sdkuilib-tests \
+	layoutlib-tests
 
 PRODUCT_PACKAGE_OVERLAYS := development/sdk_overlay
 
diff --git a/target/product/sim.mk b/target/product/sim.mk
deleted file mode 100644
index 09722d6..0000000
--- a/target/product/sim.mk
+++ /dev/null
@@ -1,6 +0,0 @@
-$(call inherit-product, $(SRC_TARGET_DIR)/product/generic.mk)
-$(call inherit-product, $(SRC_TARGET_DIR)/product/locales_full.mk)
-
-# Overrides
-PRODUCT_NAME := sim
-PRODUCT_DEVICE := sim
diff --git a/target/product/telephony.mk b/target/product/telephony.mk
index d557887..a0220de 100644
--- a/target/product/telephony.mk
+++ b/target/product/telephony.mk
@@ -21,4 +21,3 @@
     Mms
 
 PRODUCT_COPY_FILES := \
-	system/bluetooth/data/main.conf:system/etc/bluetooth/main.conf
diff --git a/target/product/vbox_x86.mk b/target/product/vbox_x86.mk
index c32b1eb..f0d4232 100644
--- a/target/product/vbox_x86.mk
+++ b/target/product/vbox_x86.mk
@@ -18,8 +18,12 @@
 # Open-Source part of the tree. It's geared toward a US-centric
 # build quite specifically for the emulator, and might not be
 # entirely appropriate to inherit from for on-device configurations.
+ifdef NET_ETH0_STARTONBOOT
+  PRODUCT_PROPERTY_OVERRIDES += net.eth0.startonboot=1
+endif
 
-$(call inherit-product, $(SRC_TARGET_DIR)/product/full_x86.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/board/vbox_x86/device.mk)
 
 PRODUCT_NAME := vbox_x86
 PRODUCT_DEVICE := vbox_x86
diff --git a/tools/apriori/Android.mk b/tools/apriori/Android.mk
deleted file mode 100644
index 79ecf7f..0000000
--- a/tools/apriori/Android.mk
+++ /dev/null
@@ -1,61 +0,0 @@
-# Copyright 2005 The Android Open Source Project
-#
-# Android.mk for apriori
-#
-
-LOCAL_PATH:= $(call my-dir)
-
-ifneq ($(TARGET_SIMULATOR),true)
-include $(CLEAR_VARS)
-
-LOCAL_LDLIBS += -ldl
-LOCAL_CFLAGS += -O2 -g
-LOCAL_CFLAGS += -fno-function-sections -fno-data-sections -fno-inline
-LOCAL_CFLAGS += -Wall -Wno-unused-function #-Werror
-LOCAL_CFLAGS += -DSUPPORT_ANDROID_PRELINK_TAGS
-LOCAL_CFLAGS += -DDEBUG
-LOCAL_CFLAGS += -DADJUST_ELF=1
-
-ifeq ($(TARGET_ARCH),arm)
-LOCAL_CFLAGS += -DARM_SPECIFIC_HACKS
-LOCAL_CFLAGS += -DBIG_ENDIAN=1
-endif
-
-ifeq ($(HOST_OS),darwin)
-LOCAL_CFLAGS += -DFSCANF_IS_BROKEN
-endif
-ifeq ($(HOST_OS),windows)
-LOCAL_CFLAGS += -DFSCANF_IS_BROKEN
-LOCAL_LDLIBS += -lintl
-endif
-
-
-
-LOCAL_SRC_FILES := \
-	apriori.c \
-	cmdline.c \
-	debug.c \
-	hash.c \
-	main.c \
-	prelink_info.c \
-	rangesort.c \
-	source.c \
-	prelinkmap.c
-
-LOCAL_C_INCLUDES:= \
-	$(LOCAL_PATH)/ \
-	external/elfutils/lib/ \
-	external/elfutils/libelf/ \
-	external/elfutils/libebl/ \
-	external/elfcopy/
-
-LOCAL_STATIC_LIBRARIES := libelfcopy libelf libebl #dl
-
-ifeq ($(TARGET_ARCH),arm)
-LOCAL_STATIC_LIBRARIES += libebl_arm
-endif
-
-LOCAL_MODULE := apriori
-
-include $(BUILD_HOST_EXECUTABLE)
-endif # TARGET_SIMULATOR != true
diff --git a/tools/apriori/apriori.c b/tools/apriori/apriori.c
deleted file mode 100644
index b827375..0000000
--- a/tools/apriori/apriori.c
+++ /dev/null
@@ -1,2775 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <common.h>
-#include <debug.h>
-#include <libelf.h>
-#include <libebl.h>
-#ifdef ARM_SPECIFIC_HACKS
-    #include <libebl_arm.h>
-#endif/*ARM_SPECIFIC_HACKS*/
-#include <elf.h>
-#include <gelf.h>
-#include <string.h>
-#include <errno.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <hash.h>
-#include <apriori.h>
-#include <source.h>
-#include <tweak.h>
-#include <rangesort.h>
-#include <prelink_info.h>
-#include <prelinkmap.h>
-#include <libgen.h>
-
-#ifndef ADJUST_ELF
-#error "ADJUST_ELF must be defined!"
-#endif
-
-/* When this macro is defined, apriori sets to ZERO those relocation values for
-   which it canot find the appropriate referent.
-*/
-#define PERMISSIVE
-#define COPY_SECTION_DATA_BUFFER (0)
-/* When this macro is set to a nonzero value, we replace calls to elf_strptr()
-   on the target ELF handle with code that extracts the strings directly from
-   the data buffers of that ELF handle.  In this case, elf_strptr() does not
-   work as expected, as it tries to read the data buffer of the associated
-   string section directly from the file, and that buffer does not exist yet
-   in the file, since we haven't committed our changes yet.
-*/
-#define ELF_STRPTR_IS_BROKEN     (1)
-
-/* When the macro below is defined, apriori does not mark for removal those
-   relocation sections that it fully handles.  Instead, apriori just sets their
-   sizes to zero.  This is more for debugging than of any actual use.
-
-   This macro is meaningful only when ADJUST_ELF!=0
-*/
-#define REMOVE_HANDLED_SECTIONS
-
-extern int verbose_flag;
-
-static source_t *sources = NULL;
-
-/* Retouch data is a very concise representation of the resolved relocations.
-   This data is used to randomize the location of prelinked libraries at
-   update time, on the device.
- */
-
-// We will store retouch entries into this buffer, then dump them at the
-// end of the .so file before setup_prelink_info().
-#define RETOUCH_MAX_SIZE 600000
-static char *retouch_buf;
-static unsigned int retouch_byte_cnt;
-// Compression state.
-static int32_t offs_prev;
-static uint32_t cont_prev;
-
-#define false 0
-#define true 1
-
-void retouch_init(void) {
-    offs_prev = 0;
-    cont_prev = 0;
-    retouch_byte_cnt = 0;
-    retouch_buf = malloc(RETOUCH_MAX_SIZE+12);
-    FAILIF(retouch_buf == NULL,
-           "Could not allocate %d bytes.\n", RETOUCH_MAX_SIZE+12);
-}
-
-//
-// We use three encoding schemes; this takes care of much of the redundancy
-// inherent in lists of relocations:
-//
-//   * two bytes, leading 1, 2b for d_offset ("s"), 13b for d_contents ("c")
-//
-//     76543210 76543210
-//     1ssccccc cccccccc
-//
-//   * three bytes, leading 01, 2b for delta offset, 20b for delta contents
-//
-//     76543210 76543210 76543210
-//     01sscccc cccccccc cccccccc
-//
-//   * eigth bytes, leading 00, 30b for offset, 32b for contents
-//
-//     76543210 76543210 76543210 76543210
-//     00ssssss ssssssss ssssssss ssssssss + 4 bytes contents
-//
-// NOTE 1: All deltas are w.r.t. the previous line in the list.
-// NOTE 2: Two-bit ("ss") offsets mean: "00"=4, "01"=8, "10"=12, and "11"=16.
-// NOTE 3: Delta contents are signed. To map back to a int32 we refill with 1s.
-// NOTE 4: Special encoding for -1 offset. Extended back to 32b when decoded.
-//
-
-void retouch_encode(int32_t offset, uint32_t contents) {
-    int64_t d_offs = offset-offs_prev;
-    int64_t d_cont = (int64_t)contents-(int64_t)cont_prev;
-
-    uint8_t output[8];
-    uint32_t output_size;
-
-    if ((d_offs > 3) &&
-        (d_offs % 4) == 0 &&
-        (d_offs / 4) < 5 &&
-        (d_cont < 4000) &&
-        (d_cont > -4000)) {
-        // we can fit in 2 bytes
-        output[0] =
-          0x80 |
-          (((d_offs/4)-1) << 5) |
-          (((uint64_t)d_cont & 0x1f00) >> 8);
-        output[1] =
-          ((uint64_t)d_cont & 0xff);
-        output_size = 2;
-    } else if ((d_offs > 3) &&
-               (d_offs % 4) == 0 &&
-               (d_offs / 4) < 5 &&
-               (d_cont < 510000) &&
-               (d_cont > -510000)) {
-        // fit in 3 bytes
-        output[0] =
-          0x40 |
-          (((d_offs/4)-1) << 4) |
-          (((uint64_t)d_cont & 0xf0000) >> 16);
-        output[1] =
-          ((uint64_t)d_cont & 0xff00) >> 8;
-        output[2] =
-          ((uint64_t)d_cont & 0xff);
-        output_size = 3;
-    } else {
-        // fit in 8 bytes; we can't support files bigger than (1GB-1)
-        // with this encoding: no library is that big anyway..
-        FAILIF(offset < -1 || offset > 0x3ffffffe, "Offset out of range.\n");
-        output[0] = (offset & 0x3f000000) >> 24;
-        output[1] = (offset & 0xff0000) >> 16;
-        output[2] = (offset & 0xff00) >> 8;
-        output[3] = (offset & 0xff);
-        output[4] = (contents & 0xff000000) >> 24;
-        output[5] = (contents & 0xff0000) >> 16;
-        output[6] = (contents & 0xff00) >> 8;
-        output[7] = (contents & 0xff);
-        output_size = 8;
-    }
-
-    // If this happens, the retouch buffer size can be bumped up.
-    // Currently, the largest case is libwebcore, at about 250K.
-    FAILIF((retouch_byte_cnt+output_size) > RETOUCH_MAX_SIZE,
-           "About to overflow retouch buffer.\n");
-
-    memcpy(retouch_buf+retouch_byte_cnt, output, output_size);
-    retouch_byte_cnt += output_size;
-
-    offs_prev = offset;
-    cont_prev = contents;
-}
-
-void retouch_dump(const char *fname, int elf_little,
-                  unsigned int retouch_byte_cnt, char *retouch_buf) {
-    int fd = open(fname, O_WRONLY);
-    FAILIF(fd < 0,
-           "open(%s, O_WRONLY): %s (%d)\n" ,
-           fname, strerror(errno), errno);
-    off_t sz = lseek(fd, 0, SEEK_END);
-    FAILIF(sz == (off_t)-1,
-           "lseek(%d, 0, SEEK_END): %s (%d)!\n",
-           fd, strerror(errno), errno);
-
-    // The retouch blob ends with "RETOUCH XXXX", where XXXX is the 4-byte
-    // size of the retouch blob, in target endianness.
-    strncpy(retouch_buf+retouch_byte_cnt, "RETOUCH ", 8);
-    if (elf_little ^ is_host_little()) {
-        *(unsigned int *)(retouch_buf+retouch_byte_cnt+8) =
-          switch_endianness(retouch_byte_cnt);
-    } else {
-        *(unsigned int *)(retouch_buf+retouch_byte_cnt+8) =
-          retouch_byte_cnt;
-    }
-
-    int num_written = write(fd, retouch_buf, retouch_byte_cnt+12);
-    FAILIF(num_written < 0,
-           "write(%d, &info, sizeof(info)): %s (%d)\n",
-           fd, strerror(errno), errno);
-    FAILIF((retouch_byte_cnt+12) != num_written,
-           "Could not write %d bytes as expected (wrote %d bytes instead)!\n",
-           retouch_byte_cnt, num_written);
-    FAILIF(close(fd) < 0, "close(%d): %s (%d)!\n", fd, strerror(errno), errno);
-}
-
-/* End of retouch code.
- */
-
-#if defined(DEBUG) && 0
-
-static void print_shdr(source_t *source, Elf_Scn *scn)
-{
-    GElf_Shdr shdr_mem, *shdr;
-    shdr = gelf_getshdr(scn, &shdr_mem);
-    Elf_Data *data = elf_getdata(scn, NULL);
-    INFO("\t%02d: data = %p, hdr = { offset = %8lld, size = %lld }, "
-         "data->d_buf = %p data->d_off = %lld, data->d_size = %d\n",
-         elf_ndxscn(scn),
-         data,
-         shdr->sh_offset, shdr->sh_size,
-         data->d_buf, data->d_off, data->d_size);
-}
-
-static void print_shdr_idx(source_t *source, Elf *elf, int idx)
-{
-    print_shdr(source, elf_getscn(elf, idx));
-}
-
-static void print_shdrs(source_t *source) {
-  Elf_Scn *scn = NULL;
-  INFO("section offset dump for new ELF\n");
-  while ((scn = elf_nextscn (source->elf, scn)) != NULL)
-    print_shdr(source, scn);
-
-  INFO("\nsection offset dump for original ELF\n");
-  while ((scn = elf_nextscn (source->oldelf, scn)) != NULL)
-    print_shdr(source, scn);
-
-#if 0
-  {
-    INFO("section offset dump for new ELF\n");
-    int i = 0;
-    for (i = 0; i < source->shnum; i++) {
-      scn = elf_getscn(source->elf, i);
-      print_shdr(source, scn);
-    }
-  }
-#endif
-}
-
-#endif /* DEBUG */
-
-static char * find_file(const char *libname,
-                        char **lib_lookup_dirs,
-                        int num_lib_lookup_dirs);
-
-static inline source_t* find_source(const char *name,
-                                    char **lib_lookup_dirs,
-                                    int num_lib_lookup_dirs) {
-    char *full = find_file(name, lib_lookup_dirs, num_lib_lookup_dirs);
-    if (full) {
-        source_t *trav = sources;
-        while (trav) {
-            if (!strcmp(trav->name, full))
-                break;
-            trav = trav->next;
-        }
-        free(full);
-        return trav;
-    }
-    return NULL;
-}
-
-static inline void add_to_sources(source_t *src) {
-    src->next = sources;
-    sources = src;
-}
-
-static void handle_range_error(range_error_t err,
-                               range_t *left, range_t *right) {
-    switch (err) {
-    case ERROR_CONTAINS:
-        ERROR("ERROR: section (%lld, %lld bytes) contains "
-              "section (%lld, %lld bytes)\n",
-              left->start, left->length,
-              right->start, right->length);
-        break;
-    case ERROR_OVERLAPS:
-        ERROR("ERROR: Section (%lld, %lld bytes) intersects "
-              "section (%lld, %lld bytes)\n",
-              left->start, left->length,
-              right->start, right->length);
-        break;
-    default:
-        ASSERT(!"Unknown range error code!");
-    }
-
-    FAILIF(1, "Range error.\n");
-}
-
-static void create_elf_sections(source_t *source, Elf *elf)
-{
-    INFO("Creating new ELF sections.\n");
-    ASSERT(elf == NULL || source->elf == NULL || source->elf == elf);
-    if (elf == NULL) {
-        ASSERT(source->elf != NULL);
-        elf = source->elf;
-    }
-
-    int cnt = 1;
-    Elf_Scn *oldscn = NULL, *scn;
-    while ((oldscn = elf_nextscn (source->oldelf, oldscn)) != NULL) {
-        GElf_Shdr *oldshdr, oldshdr_mem;
-
-        scn = elf_newscn(elf);
-        FAILIF_LIBELF(NULL == scn, elf_newscn);
-
-        oldshdr = gelf_getshdr(oldscn, &oldshdr_mem);
-        FAILIF_LIBELF(NULL == oldshdr, gelf_getshdr);
-        /* Set the section header of the new section to be the same as the
-           headset of the old section by default. */
-        gelf_update_shdr(scn, oldshdr);
-
-        /* Copy the section data */
-        Elf_Data *olddata = elf_getdata(oldscn, NULL);
-        FAILIF_LIBELF(NULL == olddata, elf_getdata);
-
-        Elf_Data *data = elf_newdata(scn);
-        FAILIF_LIBELF(NULL == data, elf_newdata);
-        *data = *olddata;
-#if COPY_SECTION_DATA_BUFFER
-        if (olddata->d_buf != NULL) {
-            data->d_buf = MALLOC(data->d_size);
-            memcpy(data->d_buf, olddata->d_buf, olddata->d_size);
-        }
-#endif
-
-        INFO("\tsection %02d: [%-30s] created\n",
-             cnt,
-             elf_strptr(source->oldelf,
-                        source->shstrndx,
-                        oldshdr->sh_name));
-
-        if (ADJUST_ELF) {
-            ASSERT(source->shdr_info != NULL);
-            /* Create a new section. */
-            source->shdr_info[cnt].idx = cnt;
-            source->shdr_info[cnt].newscn = scn;
-            source->shdr_info[cnt].data = data;
-            source->shdr_info[cnt].
-                use_old_shdr_for_relocation_calculations = 1;
-            INFO("\tsection [%s]  (old offset %lld, old size %lld) "
-                 "will have index %d (was %d).\n",
-                 source->shdr_info[cnt].name,
-                 source->shdr_info[cnt].old_shdr.sh_offset,
-                 source->shdr_info[cnt].old_shdr.sh_size,
-                 source->shdr_info[cnt].idx,
-                 elf_ndxscn(source->shdr_info[cnt].scn));
-            /* Same as the next assert */
-            ASSERT(elf_ndxscn (source->shdr_info[cnt].newscn) ==
-                   source->shdr_info[cnt].idx);
-        }
-
-        ASSERT(elf_ndxscn(scn) == (size_t)cnt);
-        cnt++;
-    }
-}
-
-/* This function sets up the shdr_info[] array of a source_t.  We call it only
-   when ADJUST_ELF is non-zero (i.e., support for adjusting an ELF file for
-   changes in sizes and numbers of relocation sections is compiled in.  Note
-   that setup_shdr_info() depends only on the information in source->oldelf,
-   not on source->elf.
-*/
-
-static void setup_shdr_info(source_t *source)
-{
-    if (ADJUST_ELF)
-    {
-        /* Allocate the section-header-info buffer. */
-        INFO("Allocating section-header info structure (%d) bytes...\n",
-             source->shnum * sizeof (shdr_info_t));
-
-        source->shdr_info = (shdr_info_t *)CALLOC(source->shnum,
-                                                  sizeof (shdr_info_t));
-
-        /* Mark the SHT_NULL section as handled. */
-        source->shdr_info[0].idx = 2;
-
-        int cnt = 1;
-        Elf_Scn *oldscn = NULL;
-        while ((oldscn = elf_nextscn (source->oldelf, oldscn)) != NULL) {
-            /* Copy the section header */
-            ASSERT(elf_ndxscn(oldscn) == (size_t)cnt);
-
-            /* Initialized the corresponding shdr_info entry */
-            {
-                /* Mark the section with a non-zero index.  Later, when we
-                   decide to drop a section, we will set its idx to zero, and
-                   assign section numbers to the remaining sections.
-                */
-                source->shdr_info[cnt].idx = 1;
-
-                source->shdr_info[cnt].scn = oldscn;
-
-                /* NOTE: Here we pupulate the section-headset struct with the
-                         same values as the original section's.  After the
-                         first run of prelink(), we will update the sh_size
-                         fields of those sections that need resizing.
-                */
-                FAILIF_LIBELF(NULL == 
-                              gelf_getshdr(oldscn,
-                                           &source->shdr_info[cnt].shdr),
-                              gelf_getshdr);
-                
-                /* Get the name of the section. */
-                source->shdr_info[cnt].name =
-                    elf_strptr (source->oldelf, source->shstrndx,
-                                source->shdr_info[cnt].shdr.sh_name);
-
-                INFO("\tname: %s\n", source->shdr_info[cnt].name);
-                FAILIF(source->shdr_info[cnt].name == NULL,
-                       "Malformed file: section %d name is null\n",
-                       cnt);
-
-                /* Remember the shdr.sh_link value.  We need to remember this
-                   value for those sections that refer to other sections.  For
-                   example, we need to remember it for relocation-entry
-                   sections, because if we modify the symbol table that a
-                   relocation-entry section is relative to, then we need to
-                   patch the relocation section.  By the time we get to
-                   deciding whether we need to patch the relocation section, we
-                   will have overwritten its header's sh_link field with a new
-                   value.
-                */
-                source->shdr_info[cnt].old_shdr = source->shdr_info[cnt].shdr;
-                INFO("\t\toriginal sh_link: %08d\n",
-                     source->shdr_info[cnt].old_shdr.sh_link);
-                INFO("\t\toriginal sh_addr: %lld\n",
-                     source->shdr_info[cnt].old_shdr.sh_addr);
-                INFO("\t\toriginal sh_offset: %lld\n",
-                     source->shdr_info[cnt].old_shdr.sh_offset);
-                INFO("\t\toriginal sh_size: %lld\n",
-                     source->shdr_info[cnt].old_shdr.sh_size);
-
-                FAILIF(source->shdr_info[cnt].shdr.sh_type == SHT_SYMTAB_SHNDX,
-                       "Cannot handle sh_type SHT_SYMTAB_SHNDX!\n");
-                FAILIF(source->shdr_info[cnt].shdr.sh_type == SHT_GROUP,
-                       "Cannot handle sh_type SHT_GROUP!\n");
-                FAILIF(source->shdr_info[cnt].shdr.sh_type == SHT_GNU_versym,
-                       "Cannot handle sh_type SHT_GNU_versym!\n");
-            }
-
-            cnt++;
-        } /* for each section */
-    } /* if (ADJUST_ELF) */
-}
-
-static Elf * init_elf(source_t *source, bool create_new_sections)
-{
-    Elf *elf;
-    if (source->output != NULL) {
-        if (source->output_is_dir) {
-            source->output_is_dir++;
-            char *dir = source->output;
-            int dirlen = strlen(dir);
-            /* The main() function maintains a pointer to source->output; it
-               frees the buffer after apriori() returns.
-            */
-            source->output = MALLOC(dirlen +
-                                    1 + /* slash */
-                                    strlen(source->name) +
-                                    1); /* null terminator */
-            strcpy(source->output, dir);
-            source->output[dirlen] = '/';
-            strcpy(source->output + dirlen + 1,
-                   basename(source->name));
-        }
-
-        /* Save some of the info; needed for retouching (ASLR). */
-        retouch_init();
-
-        source->newelf_fd = open(source->output,
-                                 O_RDWR | O_CREAT,
-                                 0666);
-        FAILIF(source->newelf_fd < 0, "open(%s): %s (%d)\n",
-               source->output,
-               strerror(errno),
-               errno);
-        elf = elf_begin(source->newelf_fd, ELF_C_WRITE, NULL);
-        FAILIF_LIBELF(elf == NULL, elf_begin);
-    } else {
-        elf = elf_clone(source->oldelf, ELF_C_EMPTY);
-        FAILIF_LIBELF(elf == NULL, elf_clone);
-    }
-
-    GElf_Ehdr *oldehdr = gelf_getehdr(source->oldelf, &source->old_ehdr_mem);
-    FAILIF_LIBELF(NULL == oldehdr, gelf_getehdr);
-
-    /* Create new ELF and program headers for the elf file */
-    INFO("Creating empty ELF and program headers...\n");
-    FAILIF_LIBELF(gelf_newehdr (elf, gelf_getclass (source->oldelf)) == 0,
-                  gelf_newehdr);
-    FAILIF_LIBELF(oldehdr->e_type != ET_REL
-                  && gelf_newphdr (elf,
-                                   oldehdr->e_phnum) == 0,
-                  gelf_newphdr);
-
-    /* Copy the elf header */
-    INFO("Copying ELF header...\n");
-    GElf_Ehdr *ehdr = gelf_getehdr(elf, &source->ehdr_mem);
-    FAILIF_LIBELF(NULL == ehdr, gelf_getehdr);
-    memcpy(ehdr, oldehdr, sizeof(GElf_Ehdr));
-    FAILIF_LIBELF(!gelf_update_ehdr(elf, ehdr), gelf_update_ehdr);
-
-    /* Copy out the old program header: notice that if the ELF file does not
-       have a program header, this loop won't execute.
-    */
-    INFO("Copying ELF program header...\n");
-    {
-        int cnt;
-        source->phdr_info = (GElf_Phdr *)CALLOC(ehdr->e_phnum,
-                                                sizeof(GElf_Phdr));
-        for (cnt = 0; cnt < ehdr->e_phnum; ++cnt) {
-            INFO("\tRetrieving entry %d\n", cnt);
-            FAILIF_LIBELF(NULL ==
-                          gelf_getphdr(source->oldelf, cnt,
-                                       source->phdr_info + cnt),
-                          gelf_getphdr);
-            FAILIF_LIBELF(gelf_update_phdr (elf, cnt, 
-                                            source->phdr_info + cnt) == 0,
-                          gelf_update_phdr);
-        }
-    }
-
-    /* Copy the sections and the section headers. */
-    if (create_new_sections)
-    {
-        create_elf_sections(source, elf);
-    }
-
-    /* The ELF library better follows our layout when this is not a
-       relocatable object file. */
-    elf_flagelf (elf, ELF_C_SET, (ehdr->e_type != ET_REL ? ELF_F_LAYOUT : 0));
-
-    return elf;
-}
-
-static shdr_info_t *lookup_shdr_info_by_new_section(
-    source_t *source,
-    const char *sname,
-    Elf_Scn *newscn)
-{
-    if (source->shdr_info == NULL) return NULL;
-    int cnt;
-    for (cnt = 0; cnt < source->shnum; cnt++) {
-        if (source->shdr_info[cnt].newscn == newscn) {
-            INFO("\t\tnew section at %p matches shdr_info[%d], "
-                 "section [%s]!\n",
-                 newscn,
-                 cnt,
-                 source->shdr_info[cnt].name);
-            FAILIF(strcmp(sname, source->shdr_info[cnt].name),
-                   "Matched section's name [%s] does not match "
-                   "looked-up section's name [%s]!\n",
-                   source->shdr_info[cnt].name,
-                   sname);
-            return source->shdr_info + cnt;
-        }
-    }
-    return NULL;
-}
-
-static bool do_init_source(source_t *source, unsigned base)
-{
-    /* Find various sections. */
-    size_t scnidx;
-    Elf_Scn *scn;
-    GElf_Shdr *shdr, shdr_mem;
-    source->sorted_sections = init_range_list();
-    INFO("Processing [%s]'s sections...\n", source->name);
-    for (scnidx = 1; scnidx < (size_t)source->shnum; scnidx++) {
-        INFO("\tGetting section index %d...\n", scnidx);
-        scn = elf_getscn(source->elf, scnidx);
-        if (NULL == scn) {
-            /* If we get an error from elf_getscn(), it means that a section
-               at the requested index does not exist.  This may happen when
-               we remove sections.  Since we do not update source->shnum
-               (we can't, since we need to know the original number of sections
-               to know source->shdr_info[]'s length), we will attempt to
-               retrieve a section for an index that no longer exists in the
-               new ELF file. */
-            INFO("\tThere is no section at index %d anymore, continuing.\n",
-                 scnidx);
-            continue;
-        }
-        shdr = gelf_getshdr(scn, &shdr_mem);
-        FAILIF_LIBELF(NULL == shdr, gelf_getshdr);
-
-        /* We haven't modified the shstrtab section, and so shdr->sh_name
-           has the same value as before.  Thus we look up the name based
-           on the old ELF handle.  We cannot use shstrndx on the new ELF
-           handle because the index of the shstrtab section may have
-           changed (and calling elf_getshstrndx() returns the same section
-           index, so libelf can't handle thise ither).
-        */
-        const char *sname =
-          elf_strptr(source->oldelf, source->shstrndx, shdr->sh_name);
-        ASSERT(sname);
-
-        INFO("\tAdding [%s] (%lld, %lld)...\n",
-             sname,
-             shdr->sh_addr,
-             shdr->sh_addr + shdr->sh_size);
-        if ((shdr->sh_flags & SHF_ALLOC) == SHF_ALLOC) {
-            add_unique_range_nosort(source->sorted_sections,
-                                    shdr->sh_addr,
-                                    shdr->sh_size,
-                                    scn,
-                                    handle_range_error,
-                                    NULL); /* no user-data destructor */
-        }
-
-        if (shdr->sh_type == SHT_DYNSYM) {
-            source->symtab.scn = scn;
-            source->symtab.data = elf_getdata(scn, NULL);
-            FAILIF_LIBELF(NULL == source->symtab.data, elf_getdata);
-            memcpy(&source->symtab.shdr, shdr, sizeof(GElf_Shdr));
-            source->symtab.info = lookup_shdr_info_by_new_section(
-                source, sname, scn);
-            ASSERT(source->shdr_info == NULL || source->symtab.info != NULL);
-
-            /* The sh_link field of the section header of the symbol table
-               contains the index of the associated strings table. */
-            source->strtab.scn = elf_getscn(source->elf,
-                                            source->symtab.shdr.sh_link);
-            FAILIF_LIBELF(NULL == source->strtab.scn, elf_getscn);
-            FAILIF_LIBELF(NULL == gelf_getshdr(source->strtab.scn,
-                                               &source->strtab.shdr),
-                          gelf_getshdr);
-            source->strtab.data = elf_getdata(source->strtab.scn, NULL);
-            FAILIF_LIBELF(NULL == source->strtab.data, elf_getdata);
-            source->strtab.info = lookup_shdr_info_by_new_section(
-                source,
-                elf_strptr(source->oldelf, source->shstrndx,
-                           source->strtab.shdr.sh_name),
-                source->strtab.scn);
-            ASSERT(source->shdr_info == NULL || source->strtab.info != NULL);
-        } else if (shdr->sh_type == SHT_DYNAMIC) {
-            source->dynamic.scn = scn;
-            source->dynamic.data = elf_getdata(scn, NULL);
-            FAILIF_LIBELF(NULL == source->dynamic.data, elf_getdata);
-            memcpy(&source->dynamic.shdr, shdr, sizeof(GElf_Shdr));
-            source->dynamic.info = lookup_shdr_info_by_new_section(
-                source, sname, scn);
-            ASSERT(source->shdr_info == NULL || source->dynamic.info != NULL);
-        } else if (shdr->sh_type == SHT_HASH) {
-            source->hash.scn = scn;
-            source->hash.data = elf_getdata(scn, NULL);
-            FAILIF_LIBELF(NULL == source->hash.data, elf_getdata);
-            memcpy(&source->hash.shdr, shdr, sizeof(GElf_Shdr));
-            source->hash.info = lookup_shdr_info_by_new_section(
-                source, sname, scn);
-            ASSERT(source->shdr_info == NULL || source->hash.info != NULL);
-        } else if (shdr->sh_type == SHT_REL || shdr->sh_type == SHT_RELA) {
-            if (source->num_relocation_sections ==
-                    source->relocation_sections_size) {
-                source->relocation_sections_size += 5;
-                source->relocation_sections =
-                (section_info_t *)REALLOC(source->relocation_sections,
-                                          source->relocation_sections_size *
-                                          sizeof(section_info_t));
-            }
-            section_info_t *reloc =
-            source->relocation_sections + source->num_relocation_sections;
-            reloc->scn = scn;
-            reloc->info = lookup_shdr_info_by_new_section(source, sname, scn);
-            ASSERT(source->shdr_info == NULL || reloc->info != NULL);
-            reloc->data = elf_getdata(scn, NULL);
-            FAILIF_LIBELF(NULL == reloc->data, elf_getdata);
-            memcpy(&reloc->shdr, shdr, sizeof(GElf_Shdr));
-            source->num_relocation_sections++;
-        } else if (!strcmp(sname, ".bss")) {
-            source->bss.scn = scn;
-            source->bss.data = elf_getdata(scn, NULL);
-            source->bss.info = lookup_shdr_info_by_new_section(
-                source, sname, scn);
-            ASSERT(source->shdr_info == NULL || source->bss.info != NULL);
-            /* The BSS section occupies no space in the ELF file. */
-            FAILIF_LIBELF(NULL == source->bss.data, elf_getdata)
-            FAILIF(NULL != source->bss.data->d_buf,
-                   "Enexpected: section [%s] has data!",
-                   sname);
-            memcpy(&source->bss.shdr, shdr, sizeof(GElf_Shdr));
-        }
-    }
-    sort_ranges(source->sorted_sections);
-
-    source->unfinished =
-        (unfinished_relocation_t *)CALLOC(source->num_relocation_sections,
-                                          sizeof(unfinished_relocation_t));
-
-    if (source->dynamic.scn == NULL) {
-        INFO("File [%s] does not have a dynamic section!\n", source->name);
-        /* If this is a static executable, we won't update anything. */
-        source->dry_run = 1;
-        return false;
-    }
-
-    FAILIF(source->symtab.scn == NULL,
-           "File [%s] does not have a dynamic symbol table!\n",
-           source->name);
-    FAILIF(source->hash.scn == NULL,
-           "File [%s] does not have a hash table!\n",
-           source->name);
-    FAILIF(source->hash.shdr.sh_link != elf_ndxscn(source->symtab.scn),
-           "Hash points to section %d, not to %d as expected!\n",
-           source->hash.shdr.sh_link,
-           elf_ndxscn(source->symtab.scn));
-
-    /* Now, find out how many symbols we have and allocate the array of
-       satisfied symbols.
-
-       NOTE: We don't count the number of undefined symbols here; we will
-       iterate over the symbol table later, and count them then, when it is
-       more convenient.
-    */
-    size_t symsize = gelf_fsize (source->elf,
-                                 ELF_T_SYM,
-                                 1, source->elf_hdr.e_version);
-    ASSERT(symsize);
-
-    source->num_syms = source->symtab.data->d_size / symsize;
-    source->base = (source->oldelf_hdr.e_type == ET_DYN) ? base : 0;
-    INFO("Relink base for [%s]: 0x%lx\n", source->name, source->base);
-    FAILIF(source->base == -1,
-           "Can't prelink [%s]: it's a shared library and you did not "
-           "provide a prelink address!\n",
-           source->name);
-#ifdef SUPPORT_ANDROID_PRELINK_TAGS
-    FAILIF(source->prelinked && source->base != source->prelink_base,
-           "ERROR: file [%s] has already been prelinked for 0x%08lx.  "
-           "Cannot change to 0x%08lx!\n",
-           source->name,
-           source->prelink_base,
-           source->base);
-#endif/*SUPPORT_ANDROID_PRELINK_TAGS*/
-
-    return true;
-}
-
-static source_t* init_source(const char *full_path,
-                             const char *output, int is_file,
-                             int base, int dry_run)
-{
-    source_t *source = (source_t *)CALLOC(1, sizeof(source_t));
-
-    ASSERT(full_path);
-    source->name = full_path;
-    source->output = output;
-    source->output_is_dir = !is_file;
-
-    source->newelf_fd = -1;
-    source->elf_fd = -1;
-    INFO("Opening %s...\n", full_path);
-    source->elf_fd =
-        open(full_path, ((dry_run || output != NULL) ? O_RDONLY : O_RDWR));
-    FAILIF(source->elf_fd < 0, "open(%s): %s (%d)\n",
-           full_path,
-           strerror(errno),
-           errno);
-
-    FAILIF(fstat(source->elf_fd, &source->elf_file_info) < 0,
-           "fstat(%s(fd %d)): %s (%d)\n",
-           source->name,
-           source->elf_fd,
-           strerror(errno),
-           errno);
-    INFO("File [%s]'s size is %lld bytes!\n",
-         source->name,
-         source->elf_file_info.st_size);
-
-    INFO("Calling elf_begin(%s)...\n", full_path);
-
-    source->oldelf =
-        elf_begin(source->elf_fd,
-                  (dry_run || output != NULL) ? ELF_C_READ : ELF_C_RDWR,
-                  NULL);
-    FAILIF_LIBELF(source->oldelf == NULL, elf_begin);
-
-    /* libelf can recognize COFF and A.OUT formats, but we handle only ELF. */
-    if(elf_kind(source->oldelf) != ELF_K_ELF) {
-        ERROR("Input file %s is not in ELF format!\n", full_path);
-        return NULL;
-    }
-
-    /* Make sure this is a shared library or an executable. */
-    {
-        INFO("Making sure %s is a shared library or an executable...\n",
-             full_path);
-        FAILIF_LIBELF(0 == gelf_getehdr(source->oldelf, &source->oldelf_hdr),
-                      gelf_getehdr);
-        FAILIF(source->oldelf_hdr.e_type != ET_DYN &&
-               source->oldelf_hdr.e_type != ET_EXEC,
-               "%s must be a shared library (elf type is %d, expecting %d).\n",
-               full_path,
-               source->oldelf_hdr.e_type,
-               ET_DYN);
-    }
-
-#ifdef SUPPORT_ANDROID_PRELINK_TAGS
-    /* First, check to see if the file has been prelinked. */
-    source->prelinked =
-        check_prelinked(source->name,
-                        source->oldelf_hdr.e_ident[EI_DATA] == ELFDATA2LSB,
-                        &source->prelink_base);
-    /* Note that in the INFO() below we need to use oldelf_hdr because we
-       haven't cloned the ELF file yet, and source->elf_hdr is not defined. */
-    if (source->prelinked) {
-        PRINT("%s [%s] is already prelinked at 0x%08lx!\n",
-              (source->oldelf_hdr.e_type == ET_EXEC ?
-               "Executable" : "Shared library"),
-              source->name,
-              source->prelink_base);
-        /* Force a dry run when the file has already been prelinked */
-        source->dry_run = dry_run = 1;
-    }
-    else {
-        INFO("%s [%s] is not prelinked!\n",
-             (source->oldelf_hdr.e_type == ET_EXEC ?
-              "Executable" : "Shared library"),
-             source->name);
-        source->dry_run = dry_run;
-    }
-#endif/*SUPPORT_ANDROID_PRELINK_TAGS*/
-
-    /* Get the index of the section-header-strings-table section. */
-    FAILIF_LIBELF(elf_getshstrndx (source->oldelf, &source->shstrndx) < 0,
-                  elf_getshstrndx);
-
-    FAILIF_LIBELF(elf_getshnum (source->oldelf, (size_t *)&source->shnum) < 0,
-                  elf_getshnum);
-
-    /* When we have a dry run, or when ADJUST_ELF is enabled, we use
-       source->oldelf for source->elf, because the former is mmapped privately,
-       so changes to it have no effect.  With ADJUST_ELF, the first run of
-       prelink() is a dry run.  We will reopen the elf file for write access
-       after that dry run, before we call adjust_elf. */
-
-    source->elf = (ADJUST_ELF || source->dry_run) ?
-        source->oldelf : init_elf(source, ADJUST_ELF == 0);
-
-    FAILIF_LIBELF(0 == gelf_getehdr(source->elf, &source->elf_hdr),
-                  gelf_getehdr);
-#ifdef DEBUG
-    ASSERT(!memcmp(&source->oldelf_hdr,
-                   &source->elf_hdr,
-                   sizeof(source->elf_hdr)));
-#endif
-
-    /* Get the EBL handling.  The -g option is currently the only reason
-       we need EBL so dont open the backend unless necessary.  */
-    source->ebl = ebl_openbackend (source->elf);
-    FAILIF_LIBELF(NULL == source->ebl, ebl_openbackend);
-#ifdef ARM_SPECIFIC_HACKS
-    FAILIF_LIBELF(0 != arm_init(source->elf, source->elf_hdr.e_machine,
-                                source->ebl, sizeof(Ebl)),
-                  arm_init);
-#endif/*ARM_SPECIFIC_HACKS*/
-
-    add_to_sources(source);
-    if (do_init_source(source, base) == false) return NULL;
-    return source;
-}
-
-/* complements do_init_source() */
-static void do_destroy_source(source_t *source)
-{
-    int cnt;
-    destroy_range_list(source->sorted_sections);
-    source->sorted_sections = NULL;
-    for (cnt = 0; cnt < source->num_relocation_sections; cnt++) {
-        FREEIF(source->unfinished[cnt].rels);
-        source->unfinished[cnt].rels = NULL;
-        source->unfinished[cnt].num_rels = 0;
-        source->unfinished[cnt].rels_size = 0;
-    }
-    if (source->jmprel.sections != NULL) {
-        destroy_range_list(source->jmprel.sections);
-        source->jmprel.sections = NULL;
-    }
-    if (source->rel.sections != NULL) {
-        destroy_range_list(source->rel.sections);
-        source->rel.sections = NULL;
-    }
-    FREE(source->unfinished); /* do_init_source() */
-    source->unfinished = NULL;
-    FREE(source->relocation_sections); /* do_init_source() */
-    source->relocation_sections = NULL;
-    source->num_relocation_sections = source->relocation_sections_size = 0;
-}
-
-static void destroy_source(source_t *source)
-{
-    /* Is this a little-endian ELF file? */
-    if (source->oldelf != source->elf) {
-        /* If it's a dynamic executable, this must not be a dry run. */
-        if (!source->dry_run && source->dynamic.scn != NULL)
-        {
-            FAILIF_LIBELF(elf_update(source->elf, ELF_C_WRITE) == -1,
-                          elf_update);
-        }
-        FAILIF_LIBELF(elf_end(source->oldelf), elf_end);
-    }
-    ebl_closebackend(source->ebl);
-    FAILIF_LIBELF(elf_end(source->elf), elf_end);
-    FAILIF(close(source->elf_fd) < 0, "Could not close file %s: %s (%d)!\n",
-           source->name, strerror(errno), errno);
-    FAILIF((source->newelf_fd >= 0) && (close(source->newelf_fd) < 0),
-           "Could not close output file: %s (%d)!\n", strerror(errno), errno);
-
-#ifdef SUPPORT_ANDROID_PRELINK_TAGS
-    if (!source->dry_run) {
-        if (source->dynamic.scn != NULL &&
-            source->elf_hdr.e_type != ET_EXEC)
-        {
-            /* For some reason, trying to write directly to source->elf_fd
-               causes a "bad file descriptor" error because of something libelf
-               does.  We just close the file descriptor and open a new one in
-               function setup_prelink_info() below. */
-            INFO("%s: setting up prelink tag at end of file.\n",
-                 source->output ? source->output : source->name);
-            retouch_encode(-1, source->base);
-            retouch_dump(source->output ? source->output : source->name,
-                         source->elf_hdr.e_ident[EI_DATA] == ELFDATA2LSB,
-                         retouch_byte_cnt,
-                         retouch_buf);
-            setup_prelink_info(source->output ? source->output : source->name,
-                               source->elf_hdr.e_ident[EI_DATA] == ELFDATA2LSB,
-                               source->base);
-        }
-        else INFO("%s: executable, NOT setting up prelink tag.\n",
-                  source->name);
-    }
-#endif/*SUPPORT_ANDROID_PRELINK_TAGS*/
-
-    do_destroy_source(source);
-    if (retouch_buf != NULL) { free(retouch_buf); retouch_buf = NULL; }
-
-    if (source->shstrtab_data != NULL)
-        FREEIF(source->shstrtab_data->d_buf); /* adjust_elf */
-
-    FREE(source->lib_deps); /* list of library dependencies (process_file()) */
-    FREEIF(source->shdr_info); /* setup_shdr_info() */
-    FREEIF(source->phdr_info); /* init_elf() */
-    FREE(source->name); /* assigned to by init_source() */
-    /* If the output is a directory, in init_elf() we allocate a buffer where
-       we copy the directory, a slash, and the file name.  Here we free that
-       buffer.
-    */
-    if (source->output_is_dir > 1) {
-        FREE(source->output);
-    }
-    FREE(source); /* init_source() */
-}
-
-static void reinit_source(source_t *source)
-{
-    do_destroy_source(source);
-    do_init_source(source, source->base);
-
-    {
-        /* We've gathered all the DT_DYNAMIC entries; now we need to figure
-           out which relocation sections fit in which range as described by
-           the entries.  Before we do so, however, we will populate the
-           jmprel and rel members of source, as well as their sizes.
-        */
-
-        size_t dynidx, numdyn;
-        GElf_Dyn *dyn, dyn_mem;
-
-        numdyn = source->dynamic.shdr.sh_size /
-            source->dynamic.shdr.sh_entsize;
-
-        source->rel.idx = source->rel.sz_idx = -1;
-        source->jmprel.idx = source->jmprel.sz_idx = -1;
-        for (dynidx = 0; dynidx < numdyn; dynidx++) {
-            dyn = gelf_getdyn (source->dynamic.data,
-                               dynidx,
-                               &dyn_mem);
-            FAILIF_LIBELF(NULL == dyn, gelf_getdyn);
-            switch (dyn->d_tag)
-            {
-            case DT_NEEDED:
-                break;
-            case DT_JMPREL:
-                INFO("reinit_source: DT_JMPREL is at index %d, 0x%08llx.\n",
-                     dynidx, dyn->d_un.d_ptr);
-                source->jmprel.idx = dynidx;
-                source->jmprel.addr = dyn->d_un.d_ptr;
-                break;
-            case DT_PLTRELSZ:
-                INFO("reinit_source: DT_PLTRELSZ is at index %d, 0x%08llx.\n",
-                     dynidx, dyn->d_un.d_val);
-                source->jmprel.sz_idx = dynidx;
-                source->jmprel.size = dyn->d_un.d_val;
-                break;
-            case DT_REL:
-                INFO("reinit_source: DT_REL is at index %d, 0x%08llx.\n",
-                     dynidx, dyn->d_un.d_ptr);
-                source->rel.idx = dynidx;
-                source->rel.addr = dyn->d_un.d_ptr;
-                break;
-            case DT_RELSZ:
-                INFO("reinit_source: DT_RELSZ is at index %d, 0x%08llx.\n",
-                     dynidx, dyn->d_un.d_val);
-                source->rel.sz_idx = dynidx;
-                source->rel.size = dyn->d_un.d_val;
-                break;
-            case DT_RELA:
-            case DT_RELASZ:
-                FAILIF(1, "Can't handle DT_RELA and DT_RELASZ entries!\n");
-                break;
-            } /* switch */
-        } /* for each dynamic entry... */
-    }
-}
-
-static GElf_Sym *hash_lookup_global_or_weak_symbol(source_t *lib,
-                                                   const char *symname,
-                                                   GElf_Sym *lib_sym_mem)
-{
-    int lib_symidx = hash_lookup(lib->elf,
-                                 lib->hash.data,
-                                 lib->symtab.data,
-                                 lib->strtab.data,
-                                 symname);
-
-    GElf_Sym sym_mem;
-    if (SHN_UNDEF != lib_symidx) {
-        /* We found the symbol--now check to see if it is global
-           or weak.  If this is the case, then the symbol satisfies
-           the dependency. */
-        GElf_Sym *lib_sym = gelf_getsymshndx(lib->symtab.data,
-                                             NULL,
-                                             lib_symidx,
-                                             &sym_mem,
-                                             NULL);
-        FAILIF_LIBELF(NULL == lib_sym, gelf_getsymshndx);
-#if ELF_STRPTR_IS_BROKEN
-        ASSERT(!strcmp(
-                   symname,
-                   ((char *)elf_getdata(elf_getscn(lib->elf,
-                                                   lib->symtab.shdr.sh_link),
-                                        NULL)->d_buf) +
-                   lib_sym->st_name));
-#else
-        ASSERT(!strcmp(
-                   symname,
-                   elf_strptr(lib->elf, lib->symtab.shdr.sh_link,
-                              lib_sym->st_name)));
-#endif
-        if (lib_sym->st_shndx != SHN_UNDEF &&
-            (GELF_ST_BIND(lib_sym->st_info) == STB_GLOBAL ||
-             GELF_ST_BIND(lib_sym->st_info) == STB_WEAK)) {
-            memcpy(lib_sym_mem, &sym_mem, sizeof(GElf_Sym));
-            return lib_sym;
-        }
-    }
-
-    return NULL;
-}
-
-static source_t *lookup_symbol_in_dependencies(source_t *source,
-                                               const char *symname,
-                                               GElf_Sym *found_sym)
-{
-    source_t *sym_source = NULL; /* return value */
-
-    /* This is an undefined symbol.  Go over the list of libraries
-       and look it up. */
-    size_t libidx;
-    int found = 0;
-    source_t *last_found = NULL;
-    for (libidx = 0; libidx < (size_t)source->num_lib_deps; libidx++) {
-        source_t *lib = source->lib_deps[libidx];
-        if (hash_lookup_global_or_weak_symbol(lib, symname, found_sym) != NULL)
-        {
-            sym_source = lib;
-            if (found) {
-                if (found == 1) {
-                    found++;
-                    ERROR("ERROR: multiple definitions found for [%s:%s]!\n",
-                          source->name, symname);
-                    ERROR("\tthis definition     [%s]\n", lib->name);
-                }
-                ERROR("\tprevious definition [%s]\n", last_found->name);
-            }
-            last_found = lib;
-            if (!found) found = 1;
-        }
-    }
-
-#if ELF_STRPTR_IS_BROKEN
-    ASSERT(!sym_source ||
-           !strcmp(symname,
-                   (char *)(elf_getdata(elf_getscn(
-                                            sym_source->elf,
-                                            sym_source->symtab.shdr.sh_link),
-                                        NULL)->d_buf) +
-                   found_sym->st_name));
-#else
-    ASSERT(!sym_source ||
-           !strcmp(symname,
-                   elf_strptr(sym_source->elf,
-                              sym_source->symtab.shdr.sh_link,
-                              found_sym->st_name)));
-#endif
-
-    return sym_source;
-}
-
-static int do_prelink(source_t *source,
-                      Elf_Data *reloc_scn_data,
-                      int reloc_scn_entry_size,
-                      unfinished_relocation_t *unfinished,
-                      int locals_only,
-                      bool dry_run,
-                      char **lib_lookup_dirs, int num_lib_lookup_dirs,
-                      char **default_libs, int num_default_libs,
-                      int *num_unfinished_relocs)
-{
-    int num_relocations = 0;
-
-    size_t num_rels;
-    num_rels = reloc_scn_data->d_size / reloc_scn_entry_size;
-
-    INFO("\tThere are %d relocations.\n", num_rels);
-
-    int rel_idx;
-    for (rel_idx = 0; rel_idx < (size_t)num_rels; rel_idx++) {
-        GElf_Rel *rel, rel_mem;
-
-        //INFO("\tHandling relocation %d/%d\n", rel_idx, num_rels);
-
-        rel = gelf_getrel(reloc_scn_data, rel_idx, &rel_mem);
-        FAILIF_LIBELF(rel == NULL, gelf_getrel);
-        GElf_Sym *sym = NULL, sym_mem;
-        unsigned sym_idx = GELF_R_SYM(rel->r_info);
-        source_t *sym_source = NULL;
-        /* found_sym points to found_sym_mem, when sym_source != NULL, and
-           to sym, when the sybmol is locally defined.  If the symbol is
-           not locally defined and sym_source == NULL, then sym is not
-           defined either. */
-        GElf_Sym *found_sym = NULL, found_sym_mem;
-        const char *symname = NULL;
-        int sym_is_local = 1;
-        if (sym_idx) {
-          sym = gelf_getsymshndx(source->symtab.data,
-                                 NULL,
-                                 sym_idx,
-                                 &sym_mem,
-                                 NULL);
-          FAILIF_LIBELF(NULL == sym, gelf_getsymshndx);
-#if ELF_STRPTR_IS_BROKEN
-          symname =
-              ((char *)source->strtab.data->d_buf) +
-              sym->st_name;
-#else
-          symname = elf_strptr(source->elf,
-                               elf_ndxscn(source->strtab.scn),
-                               sym->st_name);
-#endif
-
-          /* If the symbol is defined and is either not in the BSS
-             section, or if it is in the BSS then the relocation is
-             not a copy relocation, then the symbol's source is this
-             library (i.e., it is locally-defined).  Otherwise, the
-             symbol is imported.
-          */
-
-          sym_is_local = 0;
-          if (sym->st_shndx != SHN_UNDEF &&
-              (source->bss.scn == NULL ||
-               sym->st_shndx != elf_ndxscn(source->bss.scn) ||
-#ifdef ARM_SPECIFIC_HACKS
-               GELF_R_TYPE(rel->r_info) != R_ARM_COPY
-#else
-               1
-#endif
-               ))
-            {
-              sym_is_local = 1;
-            }
-
-          if (sym_is_local) {
-            INFO("\t\tSymbol [%s:%s] is defined locally.\n",
-                 source->name,
-                 symname);
-            sym_source = source;
-            found_sym = sym;
-          }
-          else if (!locals_only) {
-            sym_source = lookup_symbol_in_dependencies(source,
-                                                       symname,
-                                                       &found_sym_mem);
-
-            /* The symbol was not in the list of dependencies, which by
-               itself is an error:  it means either that the symbol does
-               not exist anywhere, or that the library which has the symbol
-               has not been listed as a dependency in this library or
-               executable. It could also mean (for a library) that the
-               symbol is defined in the executable that links agsinst it,
-               which is obviously not a good thing.  These are bad things,
-               but they do happen, which is why we have the ability to
-               provide a list of default dependencies, including
-               executables. Here we check to see if the symbol has been
-               defined in any of them.
-            */
-            if (NULL == sym_source) {
-              INFO("\t\tChecking default dependencies...\n");
-              int i;
-              source_t *lib, *old_sym_source = NULL;
-              int printed_initial_error = 0;
-              for (i = 0; i < num_default_libs; i++) {
-                INFO("\tChecking in [%s].\n", default_libs[i]);
-                lib = find_source(default_libs[i],
-                                  lib_lookup_dirs,
-                                  num_lib_lookup_dirs);
-                FAILIF(NULL == lib,
-                       "Can't find default library [%s]!\n",
-                       default_libs[i]);
-                if (hash_lookup_global_or_weak_symbol(lib,
-                                                      symname,
-                                                      &found_sym_mem)) {
-                  found_sym = &found_sym_mem;
-                  sym_source = lib;
-#if ELF_STRPTR_IS_BROKEN
-                  ASSERT(!strcmp(symname,
-                                 (char *)(elf_getdata(
-                                              elf_getscn(
-                                                  sym_source->elf,
-                                                  sym_source->symtab.
-                                                      shdr.sh_link),
-                                              NULL)->d_buf) +
-                                 found_sym->st_name));
-#else
-                  ASSERT(!strcmp(symname,
-                                 elf_strptr(sym_source->elf,
-                                            sym_source->symtab.shdr.sh_link,
-                                            found_sym->st_name)));
-
-#endif
-                  INFO("\tFound symbol [%s] in [%s]!\n",
-                       symname, lib->name);
-                  if (old_sym_source) {
-                    if (printed_initial_error == 0) {
-                      printed_initial_error = 1;
-                      ERROR("Multiple definition of [%s]:\n"
-                            "\t[%s]\n",
-                            symname,
-                            old_sym_source->name);
-                    }
-                    ERROR("\t[%s]\n", sym_source->name);
-                  }
-                  old_sym_source = sym_source;
-                } else {
-                  INFO("\tCould not find symbol [%s] in default "
-                       "lib [%s]!\n", symname, lib->name);
-                }
-              }
-              if (sym_source) {
-                ERROR("ERROR: Could not find [%s:%s] in dependent "
-                      "libraries (but found in default [%s])!\n",
-                      source->name,
-                      symname,
-                      sym_source->name);
-              }
-            } else {
-              found_sym = &found_sym_mem;
-              /* We found the symbol in a dependency library. */
-              INFO("\t\tSymbol [%s:%s, value %lld] is imported from [%s]\n",
-                   source->name,
-                   symname,
-                   found_sym->st_value,
-                   sym_source->name);
-            }
-          } /* if symbol is defined in this library... */
-
-          if (!locals_only) {
-            /* If a symbol is weak and we haven't found it, then report
-               an error.  We really need to find a way to set its value
-               to zero.  The problem is that it needs to refer to some
-               section. */
-
-            FAILIF(NULL == sym_source &&
-                   GELF_ST_BIND(sym->st_info) == STB_WEAK,
-                   "Cannot handle weak symbols yet (%s:%s <- %s).\n",
-                   source->name,
-                   symname,
-                   sym_source->name);
-#ifdef PERMISSIVE
-            if (GELF_ST_BIND(sym->st_info) != STB_WEAK &&
-                NULL == sym_source) {
-              ERROR("ERROR: Can't find symbol [%s:%s] in dependent or "
-                    "default libraries!\n", source->name, symname);
-            }
-#else
-            FAILIF(GELF_ST_BIND(sym->st_info) != STB_WEAK &&
-                   NULL == sym_source,
-                   "Can't find symbol [%s:%s] in dependent or default "
-                   "libraries!\n",
-                   source->name,
-                   symname);
-#endif
-          } /* if (!locals_only) */
-        }
-#if 0 // too chatty
-        else
-          INFO("\t\tno symbol is associated with this relocation\n");
-#endif
-
-
-        // We prelink only local symbols when locals_only == 1.
-
-        bool can_relocate = true;
-        if (!sym_is_local &&
-            (symname[0] == 'd' && symname[1] == 'l' && symname[2] != '\0' &&
-             (!strcmp(symname + 2, "open") ||
-              !strcmp(symname + 2, "close") ||
-              !strcmp(symname + 2, "sym") ||
-              !strcmp(symname + 2, "error")))) {
-            INFO("********* NOT RELOCATING LIBDL SYMBOL [%s]\n", symname);
-            can_relocate = false;
-        }
-
-        if (can_relocate && (sym_is_local || !locals_only))
-        {
-            GElf_Shdr shdr_mem; Elf_Scn *scn; Elf_Data *data;
-            find_section(source, rel->r_offset, &scn, &shdr_mem, &data);
-            unsigned *dest =
-              (unsigned*)(((char *)data->d_buf) +
-                          (rel->r_offset - shdr_mem.sh_addr));
-            unsigned rel_type = GELF_R_TYPE(rel->r_info);
-            char buf[64];
-            INFO("\t\t%-15s ",
-                 ebl_reloc_type_name(source->ebl,
-                                     GELF_R_TYPE(rel->r_info),
-                                     buf,
-                                     sizeof(buf)));
-
-            /* Section-name offsets do not change, so we use oldelf to get the
-               strings.  This makes a difference in the second pass of the
-               perlinker, after the call to adjust_elf, because
-               source->shstrndx no longer contains the index of the
-               section-header-strings table.
-            */
-            const char *sname = elf_strptr(
-                source->oldelf, source->shstrndx, shdr_mem.sh_name);
-
-            switch (rel_type) {
-            case R_ARM_JUMP_SLOT:
-            case R_ARM_GLOB_DAT:
-            case R_ARM_ABS32:
-              ASSERT(data->d_buf != NULL);
-              ASSERT(data->d_size >= rel->r_offset - shdr_mem.sh_addr);
-#ifdef PERMISSIVE
-              if (sym_source == NULL) {
-                ERROR("ERROR: Permissive relocation "
-                      "[%-15s] [%s:%s]: [0x%llx] = ZERO\n",
-                      ebl_reloc_type_name(source->ebl,
-                                          GELF_R_TYPE(rel->r_info),
-                                          buf,
-                                          sizeof(buf)),
-                      sname,
-                      symname,
-                      rel->r_offset);
-                if (!dry_run)
-                  *dest = 0;
-              } else
-#endif
-                {
-                  ASSERT(sym_source);
-                  INFO("[%s:%s]: [0x%llx] = 0x%llx + 0x%lx\n",
-                       sname,
-                       symname,
-                       rel->r_offset,
-                       found_sym->st_value,
-                       sym_source->base);
-                  if (!dry_run) {
-                    PRINT("WARNING: Relocation type not supported "
-                          "for retouching!");
-                    *dest = found_sym->st_value + sym_source->base;
-                  }
-                }
-              num_relocations++;
-              break;
-            case R_ARM_RELATIVE:
-              ASSERT(data->d_buf != NULL);
-              ASSERT(data->d_size >= rel->r_offset - shdr_mem.sh_addr);
-              FAILIF(sym != NULL,
-                     "Unsupported RELATIVE form (symbol != 0)...\n");
-              INFO("[%s:%s]: [0x%llx] = 0x%x + 0x%lx\n",
-                   sname,
-                   symname ?: "(symbol has no name)",
-                   rel->r_offset, *dest, source->base);
-              if (!dry_run) {
-                *dest += source->base;
-
-                /* Output an entry for the ASLR touch-up process. */
-                retouch_encode(rel->r_offset
-                               -shdr_mem.sh_addr
-                               +shdr_mem.sh_offset,
-                               *dest);
-              }
-              num_relocations++;
-              break;
-            case R_ARM_COPY:
-#ifdef PERMISSIVE
-              if (sym_source == NULL) {
-                ERROR("ERROR: Permissive relocation "
-                      "[%-15s] [%s:%s]: NOT PERFORMING\n",
-                      ebl_reloc_type_name(source->ebl,
-                                          GELF_R_TYPE(rel->r_info),
-                                          buf,
-                                          sizeof(buf)),
-                      sname,
-                      symname);
-              } else
-#endif
-                {
-                  ASSERT(sym);
-                  ASSERT(sym_source);
-                  GElf_Shdr src_shdr_mem;
-                  Elf_Scn *src_scn;
-                  Elf_Data *src_data;
-                  find_section(sym_source, found_sym->st_value,
-                               &src_scn,
-                               &src_shdr_mem,
-                               &src_data);
-                  INFO("Found [%s:%s (%lld)] in section [%s] .\n",
-                       sym_source->name,
-                       symname,
-                       found_sym->st_value,
-#if ELF_STRPTR_IS_BROKEN
-                       (((char *)elf_getdata(
-                             elf_getscn(sym_source->elf,
-                                        sym_source->shstrndx),
-                             NULL)->d_buf) + src_shdr_mem.sh_name)
-#else
-                       elf_strptr(sym_source->elf,
-                                  sym_source->shstrndx,
-                                  src_shdr_mem.sh_name)
-#endif
-                      );
-
-                  unsigned *src = NULL;
-                  if (src_data->d_buf == NULL)
-                    {
-#ifdef PERMISSIVE
-                      if (sym_source->bss.scn == NULL ||
-                          elf_ndxscn(src_scn) !=
-                          elf_ndxscn(sym_source->bss.scn)) {
-                        ERROR("ERROR: Permissive relocation (NULL source "
-                              "not from .bss) [%-15s] [%s:%s]: "
-                              "NOT PERFORMING\n",
-                              ebl_reloc_type_name(source->ebl,
-                                                  GELF_R_TYPE(rel->r_info),
-                                                  buf,
-                                                  sizeof(buf)),
-                              sname,
-                              symname);
-                      }
-#endif
-                    }
-                  else {
-                    ASSERT(src_data->d_size >=
-                           found_sym->st_value - src_shdr_mem.sh_addr);
-                    src = (unsigned*)(((char *)src_data->d_buf) +
-                                      (found_sym->st_value -
-                                       src_shdr_mem.sh_addr));
-                  }
-                  ASSERT(symname);
-                  INFO("[%s:%s]: [0x%llx] <- [0x%llx] size %lld\n",
-                       sname,
-                       symname, rel->r_offset,
-                       found_sym->st_value,
-                       found_sym->st_size);
-
-#ifdef PERMISSIVE
-                  if (src_data->d_buf != NULL ||
-                      (sym_source->bss.scn != NULL &&
-                       elf_ndxscn(src_scn) ==
-                       elf_ndxscn(sym_source->bss.scn)))
-#endif/*PERMISSIVE*/
-                    {
-                      if (data->d_buf == NULL) {
-                        INFO("Incomplete relocation [%-15s] of [%s:%s].\n",
-                             ebl_reloc_type_name(source->ebl,
-                                                 GELF_R_TYPE(rel->r_info),
-                                                 buf,
-                                                 sizeof(buf)),
-                             sname,
-                             symname);
-                        FAILIF(unfinished == NULL,
-                               "You passed unfinished as NULL expecting "
-                               "to handle all relocations, "
-                               "but at least one cannot be handled!\n");
-                        if (unfinished->num_rels == unfinished->rels_size) {
-                          unfinished->rels_size += 10;
-                          unfinished->rels = (GElf_Rel *)REALLOC(
-                              unfinished->rels,
-                              unfinished->rels_size *
-                              sizeof(GElf_Rel));
-                        }
-                        unfinished->rels[unfinished->num_rels++] = *rel;
-                        num_relocations--;
-                        (*num_unfinished_relocs)++;
-                      }
-                      else {
-                        if (src_data->d_buf != NULL)
-                          {
-                            ASSERT(data->d_buf != NULL);
-                            ASSERT(data->d_size >= rel->r_offset -
-                                   shdr_mem.sh_addr);
-                            if (!dry_run) {
-                                PRINT("WARNING: Relocation type not supported "
-                                      "for retouching!");
-                                memcpy(dest, src, found_sym->st_size);
-                            }
-                          }
-                        else {
-                          ASSERT(src == NULL);
-                          ASSERT(elf_ndxscn(src_scn) ==
-                                 elf_ndxscn(sym_source->bss.scn));
-                          if (!dry_run) {
-                              PRINT("WARNING: Relocation type not supported "
-                                    "for retouching!");
-                              memset(dest, 0, found_sym->st_size);
-                          }
-                        }
-                      }
-                    }
-                  num_relocations++;
-                }
-              break;
-            default:
-              FAILIF(1, "Unknown relocation type %d!\n", rel_type);
-            } // switch
-        } // relocate
-        else {
-          INFO("\t\tNot relocating symbol [%s]%s\n",
-               symname,
-               (can_relocate ? ", relocating only locals" : 
-                ", which is a libdl symbol"));
-          FAILIF(unfinished == NULL,
-                 "You passed unfinished as NULL expecting to handle all "
-                 "relocations, but at least one cannot be handled!\n");
-          if (unfinished->num_rels == unfinished->rels_size) {
-              unfinished->rels_size += 10;
-              unfinished->rels = (GElf_Rel *)REALLOC(
-                  unfinished->rels,
-                  unfinished->rels_size *
-                  sizeof(GElf_Rel));
-          }
-          unfinished->rels[unfinished->num_rels++] = *rel;
-          (*num_unfinished_relocs)++;
-        }
-    } // for each relocation entry
-
-    return num_relocations;
-}
-
-static int prelink(source_t *source,
-                   int locals_only,
-                   bool dry_run,
-                   char **lib_lookup_dirs, int num_lib_lookup_dirs,
-                   char **default_libs, int num_default_libs,
-                   int *num_unfinished_relocs)
-{
-    INFO("Prelinking [%s] (number of relocation sections: %d)%s...\n",
-         source->name, source->num_relocation_sections,
-         (dry_run ? " (dry run)" : ""));
-    int num_relocations = 0;
-    int rel_scn_idx;
-    for (rel_scn_idx = 0; rel_scn_idx < source->num_relocation_sections;
-         rel_scn_idx++)
-    {
-        section_info_t *reloc_scn = source->relocation_sections + rel_scn_idx;
-        unfinished_relocation_t *unfinished = source->unfinished + rel_scn_idx;
-
-        /* We haven't modified the shstrtab section, and so shdr->sh_name has
-           the same value as before.  Thus we look up the name based on the old
-           ELF handle.  We cannot use shstrndx on the new ELF handle because
-           the index of the shstrtab section may have changed (and calling
-           elf_getshstrndx() returns the same section index, so libelf can't
-           handle thise ither).
-
-           If reloc_scn->info is available, we can assert that the
-           section-name has not changed.  If this assertion fails,
-           then we cannot use the elf_strptr() trick below to get
-           the section name.  One solution would be to save it in
-           the section_info_t structure.
-        */
-        ASSERT(reloc_scn->info == NULL ||
-               reloc_scn->shdr.sh_name == reloc_scn->info->old_shdr.sh_name);
-        const char *sname =
-          elf_strptr(source->oldelf,
-                     source->shstrndx,
-                     reloc_scn->shdr.sh_name);
-        ASSERT(sname != NULL);
-
-        INFO("\n\tIterating relocation section [%s]...\n", sname);
-
-        /* In general, the new size of the section differs from the original
-           size of the section, because we can handle some of the relocations.
-           This was communicated to adjust_elf, which modified the ELF file
-           according to the new section sizes.  Now, when prelink() does the
-           actual work of prelinking, it needs to know the original size of the
-           relocation section so that it can see all of the original relocation
-           entries!
-        */
-        size_t d_size = reloc_scn->data->d_size;
-        if (reloc_scn->info != NULL &&
-            reloc_scn->data->d_size != reloc_scn->info->old_shdr.sh_size)
-        {
-            INFO("Setting size of section [%s] to from new size %d to old "
-                 "size %lld temporarily (so prelinker can see all "
-                 "relocations).\n",
-                 reloc_scn->info->name,
-                 d_size,
-                 reloc_scn->info->old_shdr.sh_size);
-            reloc_scn->data->d_size = reloc_scn->info->old_shdr.sh_size;
-        }
-
-        num_relocations +=
-          do_prelink(source,
-                     reloc_scn->data, reloc_scn->shdr.sh_entsize,
-                     unfinished,
-                     locals_only, dry_run,
-                     lib_lookup_dirs, num_lib_lookup_dirs,
-                     default_libs, num_default_libs,
-                     num_unfinished_relocs);
-
-        if (reloc_scn->data->d_size != d_size)
-        {
-            ASSERT(reloc_scn->info != NULL);
-            INFO("Resetting size of section [%s] to %d\n",
-                 reloc_scn->info->name,
-                 d_size);
-            reloc_scn->data->d_size = d_size;
-        }
-    }
-
-    /* Now prelink those relocation sections which were fully handled, and
-       therefore removed.  They are not a part of the
-       source->relocation_sections[] array anymore, but we can find them by
-       scanning source->shdr_info[] and looking for sections with idx == 0.
-    */
-
-    if (ADJUST_ELF && source->shdr_info != NULL) {
-        /* Walk over the shdr_info[] array to see if we've removed any
-           relocation sections.  prelink() those sections as well.
-        */
-        int i;
-        for (i = 0; i < source->shnum; i++) {
-            shdr_info_t *info = source->shdr_info + i;
-            if (info->idx == 0 &&
-                (info->shdr.sh_type == SHT_REL ||
-                 info->shdr.sh_type == SHT_RELA)) {
-
-              Elf_Data *data = elf_getdata(info->scn, NULL);
-              ASSERT(data->d_size == 0);
-              data->d_size = info->old_shdr.sh_size;
-
-              INFO("\n\tIterating relocation section [%s], which was "
-                   "discarded (size %d, entry size %lld).\n",
-                   info->name,
-                   data->d_size,
-                   info->old_shdr.sh_entsize);
-
-              num_relocations +=
-                do_prelink(source,
-                           data, info->old_shdr.sh_entsize,
-                           NULL, /* the section was fully handled */
-                           locals_only, dry_run,
-                           lib_lookup_dirs, num_lib_lookup_dirs,
-                           default_libs, num_default_libs,
-                           num_unfinished_relocs);
-
-              data->d_size = 0;
-            }
-        }
-    }
-    return num_relocations;
-}
-
-static char * find_file(const char *libname,
-                        char **lib_lookup_dirs,
-                        int num_lib_lookup_dirs) {
-    if (libname[0] == '/') {
-        /* This is an absolute path name--just return it. */
-        /* INFO("ABSOLUTE PATH: [%s].\n", libname); */
-        return strdup(libname);
-    } else {
-        /* First try the working directory. */
-        int fd;
-        if ((fd = open(libname, O_RDONLY)) > 0) {
-            close(fd);
-            /* INFO("FOUND IN CURRENT DIR: [%s].\n", libname); */
-            return strdup(libname);
-        } else {
-            /* Iterate over all library paths.  For each path, append the file
-               name and see if there is a file at that place. If that fails,
-               bail out. */
-
-            char *name;
-            while (num_lib_lookup_dirs--) {
-                size_t lib_len = strlen(*lib_lookup_dirs);
-                /* one extra character for the slash, and another for the
-                   terminating NULL. */
-                name = (char *)MALLOC(lib_len + strlen(libname) + 2);
-                strcpy(name, *lib_lookup_dirs);
-                name[lib_len] = '/';
-                strcpy(name + lib_len + 1, libname);
-                if ((fd = open(name, O_RDONLY)) > 0) {
-                    close(fd);
-                    /* INFO("FOUND: [%s] in [%s].\n", libname, name); */
-                    return name;
-                }
-                INFO("NOT FOUND: [%s] in [%s].\n", libname, name);
-                free(name);
-            }
-        }
-    }
-    return NULL;
-}
-
-static void adjust_dynamic_segment_entry_size(source_t *source,
-                                              dt_rel_info_t *dyn)
-{
-    /* Update the size entry in the DT_DYNAMIC segment. */
-    GElf_Dyn *dyn_entry, dyn_entry_mem;
-    dyn_entry = gelf_getdyn(source->dynamic.data,
-                            dyn->sz_idx,
-                            &dyn_entry_mem);
-    FAILIF_LIBELF(NULL == dyn_entry, gelf_getdyn);
-    /* If we are calling this function to adjust the size of the dynamic entry,
-       then there should be some unfinished relocations remaining.  If there
-       are none, then we should remove the entry from the dynamic section
-       altogether.
-    */
-    ASSERT(dyn->num_unfinished_relocs);
-
-    size_t relsize = gelf_fsize(source->elf,
-                                ELF_T_REL,
-                                1,
-                                source->elf_hdr.e_version);
-
-    if (unlikely(verbose_flag)) {
-        char buf[64];
-        INFO("Updating entry %d: [%-10s], %08llx --> %08x\n",
-             dyn->sz_idx,
-             ebl_dynamic_tag_name (source->ebl, dyn_entry->d_tag,
-                                   buf, sizeof (buf)),
-             dyn_entry->d_un.d_val,
-             dyn->num_unfinished_relocs * relsize);
-    }
-
-    dyn_entry->d_un.d_val = dyn->num_unfinished_relocs * relsize;
-
-    FAILIF_LIBELF(!gelf_update_dyn(source->dynamic.data,
-                                   dyn->sz_idx,
-                                   dyn_entry),
-                  gelf_update_dyn);
-}
-
-static void adjust_dynamic_segment_entries(source_t *source)
-{
-    /* This function many remove entries from the dynamic segment, but it won't
-       resize the relevant section.  It'll just fill the remainted with empty
-       DT entries.
-
-       FIXME: This is not guaranteed right now.  If a dynamic segment does not
-       end with null DT entries, I think this will break.
-    */
-    FAILIF(source->rel.processed,
-           "More than one section matches DT_REL entry in dynamic segment!\n");
-    FAILIF(source->jmprel.processed,
-           "More than one section matches DT_JMPREL entry in "
-           "dynamic segment!\n");
-    source->rel.processed =
-      source->jmprel.processed = 1;
-
-    if (source->rel.num_unfinished_relocs > 0)
-        adjust_dynamic_segment_entry_size(source, &source->rel);
-
-    if (source->jmprel.num_unfinished_relocs > 0)
-        adjust_dynamic_segment_entry_size(source, &source->jmprel);
-
-    /* If at least one of the entries is empty, then we need to remove it.  We
-       have already adjusted the size of the other.
-    */
-    if (source->rel.num_unfinished_relocs == 0 ||
-        source->jmprel.num_unfinished_relocs == 0)
-    {
-        /* We need to delete the DT_REL/DT_RELSZ and DT_PLTREL/DT_PLTRELSZ
-           entries from the dynamic segment. */
-
-        GElf_Dyn *dyn_entry, dyn_entry_mem;
-        size_t dynidx, updateidx;
-
-        size_t numdyn =
-            source->dynamic.shdr.sh_size /
-            source->dynamic.shdr.sh_entsize;
-
-        for (updateidx = dynidx = 0; dynidx < numdyn; dynidx++)
-        {
-            dyn_entry = gelf_getdyn(source->dynamic.data,
-                                    dynidx,
-                                    &dyn_entry_mem);
-            FAILIF_LIBELF(NULL == dyn_entry, gelf_getdyn);
-            if ((source->rel.num_unfinished_relocs == 0 &&
-                 (dynidx == source->rel.idx ||
-                  dynidx == source->rel.sz_idx)) ||
-                (source->jmprel.num_unfinished_relocs == 0 &&
-                 (dynidx == source->jmprel.idx ||
-                  dynidx == source->jmprel.sz_idx)))
-            {
-                if (unlikely(verbose_flag)) {
-                    char buf[64];
-                    INFO("\t(!)\tRemoving entry %02d: [%-10s], %08llx\n",
-                         dynidx,
-                         ebl_dynamic_tag_name (source->ebl, dyn_entry->d_tag,
-                                               buf, sizeof (buf)),
-                         dyn_entry->d_un.d_val);
-                }
-                continue;
-            }
-
-            if (unlikely(verbose_flag)) {
-                char buf[64];
-                INFO("\t\tKeeping  entry %02d: [%-10s], %08llx\n",
-                     dynidx,
-                     ebl_dynamic_tag_name (source->ebl, dyn_entry->d_tag,
-                                           buf, sizeof (buf)),
-                     dyn_entry->d_un.d_val);
-            }
-
-            gelf_update_dyn(source->dynamic.data,
-                            updateidx,
-                            &dyn_entry_mem);
-            updateidx++;
-        }
-    }
-} /* adjust_dynamic_segment_entries */
-
-static bool adjust_dynamic_segment_for(source_t *source,
-                                       dt_rel_info_t *dyn,
-                                       bool adjust_section_size_only)
-{
-    bool dropped_sections = false;
-
-    /* Go over the sections that belong to this dynamic range. */
-    dyn->num_unfinished_relocs = 0;
-    if (dyn->sections) {
-        int num_scns, idx;
-        range_t *scns = get_sorted_ranges(dyn->sections, &num_scns);
-
-        INFO("\tdynamic range %s:[%lld, %lld) contains %d sections.\n",
-             source->name,
-             dyn->addr,
-             dyn->addr + dyn->size,
-             num_scns);
-
-        ASSERT(scns);
-        int next_idx = 0, next_rel_off = 0;
-        /* The total number of unfinished relocations for this dynamic
-         * entry. */
-        section_info_t *next = (section_info_t *)scns[next_idx].user;
-        section_info_t *first = next;
-        ASSERT(first);
-        for (idx = 0; idx < num_scns; idx++) {
-            section_info_t *reloc_scn = (section_info_t *)scns[idx].user;
-            size_t rel_scn_idx = reloc_scn - source->relocation_sections;
-            ASSERT(rel_scn_idx < (size_t)source->num_relocation_sections);
-            unfinished_relocation_t *unfinished =
-                &source->unfinished[rel_scn_idx];
-            int unf_idx;
-
-            ASSERT(reloc_scn->info == NULL ||
-                   reloc_scn->shdr.sh_name ==
-                   reloc_scn->info->old_shdr.sh_name);
-            const char *sname =
-              elf_strptr(source->oldelf,
-                         source->shstrndx,
-                         reloc_scn->shdr.sh_name);
-
-            INFO("\tsection [%s] contains %d unfinished relocs.\n",
-                 sname,
-                 unfinished->num_rels);
-
-            for (unf_idx = 0; unf_idx < unfinished->num_rels; unf_idx++)
-            {
-                /* There are unfinished relocations.  Copy them forward to the
-                   lowest section we can. */
-
-                while (next_rel_off == 
-                       (int)(next->shdr.sh_size/next->shdr.sh_entsize))
-                {
-                    INFO("\tsection [%s] has filled up with %d unfinished "
-                         "relocs.\n",
-                         sname,
-                         next_rel_off);
-
-                    next_idx++;
-                    ASSERT(next_idx <= idx);
-                    next = (section_info_t *)scns[next_idx].user;
-                    next_rel_off = 0;
-                }
-
-                if (!adjust_section_size_only) {
-                    INFO("\t\tmoving unfinished relocation %2d to [%s:%d]\n",
-                         unf_idx,
-                         sname,
-                         next_rel_off);
-                    FAILIF_LIBELF(0 ==
-                                  gelf_update_rel(next->data,
-                                                  next_rel_off,
-                                                  &unfinished->rels[unf_idx]),
-                                  gelf_update_rel);
-                }
-
-                next_rel_off++;
-                dyn->num_unfinished_relocs++;
-            }
-        } /* for */
-
-        /* Set the size of the last section, and mark all subsequent
-           sections for removal.  At this point, next is the section
-           to which we last wrote data, next_rel_off is the offset before
-           which we wrote the last relocation, and so next_rel_off *
-           relsize is the new size of the section.
-        */
-
-        bool adjust_file = ADJUST_ELF && source->elf_hdr.e_type != ET_EXEC;
-        if (adjust_file && !source->dry_run)
-        {
-            size_t relsize = gelf_fsize(source->elf,
-                                        ELF_T_REL,
-                                        1,
-                                        source->elf_hdr.e_version);
-
-            ASSERT(next->info == NULL ||
-                   next->shdr.sh_name == next->info->old_shdr.sh_name);
-            const char *sname =
-              elf_strptr(source->oldelf,
-                         source->shstrndx,
-                         next->shdr.sh_name);
-
-            INFO("\tsection [%s] (index %d) has %d unfinished relocs, "
-                 "changing its size to %ld bytes (from %ld bytes).\n",
-                 sname,
-                 elf_ndxscn(next->scn),
-                 next_rel_off,
-                 (long)(next_rel_off * relsize),
-                 (long)(next->shdr.sh_size));
-
-            /* source->shdr_info[] must be allocated prior to calling this
-               function.  This is in fact done in process_file(), by calling
-               setup_shdr_info() just before we call adjust_dynamic_segment().
-            */
-            ASSERT(source->shdr_info != NULL);
-
-            /* We do not update the data field of shdr_info[], because it does
-               not exist yet (with ADJUST_ELF != 0).  We create the new section
-               and section data after the first call to prelink().  For now, we
-               save the results of our analysis by modifying the sh_size field
-               of the section header.  When we create the new sections' data,
-               we set the size of the data from the sh_size fields of the
-               section headers.
-
-               NOTE: The assertion applies only to the first call of
-                     adjust_dynamic_segment (which calls this function).  By
-                     the second call, we've already created the data for the
-                     new sections.  The only sections for which we haven't
-                     created data are the relocation sections we are removing.
-            */
-#ifdef DEBUG
-            ASSERT((!adjust_section_size_only &&
-                    (source->shdr_info[elf_ndxscn(next->scn)].idx > 0)) ||
-                   source->shdr_info[elf_ndxscn(next->scn)].data == NULL);
-#endif
-
-            //FIXME: what else do we need to do here?  Do we need to update
-            //       another copy of the shdr so that it's picked up when we
-            //       commit the file?
-            next->shdr.sh_size = next_rel_off * relsize;
-            source->shdr_info[elf_ndxscn(next->scn)].shdr.sh_size =
-                next->shdr.sh_size;
-            if (next_rel_off * relsize == 0) {
-#ifdef REMOVE_HANDLED_SECTIONS
-                INFO("\tsection [%s] (index %d) is now empty, marking for "
-                     "removal.\n",
-                     sname,
-                     elf_ndxscn(next->scn));
-                source->shdr_info[elf_ndxscn(next->scn)].idx = 0;
-                dropped_sections = true;
-#endif
-            }
-
-            while (++next_idx < num_scns) {
-                next = (section_info_t *)scns[next_idx].user;
-#ifdef REMOVE_HANDLED_SECTIONS
-                ASSERT(next->info == NULL ||
-                       next->shdr.sh_name == next->info->old_shdr.sh_name);
-                const char *sname =
-                  elf_strptr(source->oldelf,
-                             source->shstrndx,
-                             next->shdr.sh_name);
-                INFO("\tsection [%s] (index %d) is now empty, marking for "
-                     "removal.\n",
-                     sname,
-                     elf_ndxscn(next->scn));
-                /* mark for removal */
-                source->shdr_info[elf_ndxscn(next->scn)].idx = 0;
-                dropped_sections = true;
-#endif
-            }
-        }
-
-    } /* if (dyn->sections) */
-    else {
-        /* The dynamic entry won't have any sections when it itself doesn't
-           exist.  This could happen when we remove all relocation sections
-           from a dynamic entry because we have managed to handle all
-           relocations in them.
-        */
-        INFO("\tNo section for dynamic entry!\n");
-    }
-
-    return dropped_sections;
-}
-
-static bool adjust_dynamic_segment(source_t *source,
-                                   bool adjust_section_size_only)
-{
-    bool dropped_section;
-    INFO("Adjusting dynamic segment%s.\n",
-         (adjust_section_size_only ? " (section sizes only)" : ""));
-    INFO("\tadjusting dynamic segment REL.\n");
-    dropped_section =
-        adjust_dynamic_segment_for(source, &source->rel,
-                                   adjust_section_size_only);
-    INFO("\tadjusting dynamic segment JMPREL.\n");
-    dropped_section =
-        adjust_dynamic_segment_for(source, &source->jmprel,
-                                   adjust_section_size_only) ||
-        dropped_section;
-    if (!adjust_section_size_only)
-        adjust_dynamic_segment_entries(source);
-    return dropped_section;
-}
-
-static void match_relocation_sections_to_dynamic_ranges(source_t *source)
-{
-    /* We've gathered all the DT_DYNAMIC entries; now we need to figure out
-       which relocation sections fit in which range as described by the
-       entries.
-    */
-
-    int relidx;
-    for (relidx = 0; relidx < source->num_relocation_sections; relidx++) {
-        section_info_t *reloc_scn = &source->relocation_sections[relidx];
-
-        int index = elf_ndxscn(reloc_scn->scn);
-
-        ASSERT(reloc_scn->info == NULL ||
-               reloc_scn->shdr.sh_name == reloc_scn->info->old_shdr.sh_name);
-        const char *sname =
-          elf_strptr(source->oldelf,
-                     source->shstrndx,
-                     reloc_scn->shdr.sh_name);
-
-        INFO("Checking section [%s], index %d, for match to dynamic ranges\n",
-             sname, index);
-        if (source->shdr_info == NULL || reloc_scn->info->idx > 0) {
-            if (source->rel.addr &&
-                source->rel.addr <= reloc_scn->shdr.sh_addr &&
-                reloc_scn->shdr.sh_addr < source->rel.addr + source->rel.size)
-                {
-                    /* The entire section must fit in the dynamic range. */
-                    if((reloc_scn->shdr.sh_addr + reloc_scn->shdr.sh_size) >
-                       (source->rel.addr + source->rel.size))
-                        {
-                            PRINT("WARNING: In [%s], section %s:[%lld,%lld) "
-                                  "is not fully contained in dynamic range "
-                                  "[%lld,%lld)!\n",
-                                  source->name,
-                                  sname,
-                                  reloc_scn->shdr.sh_addr,
-                                  reloc_scn->shdr.sh_addr +
-                                      reloc_scn->shdr.sh_size,
-                                  source->rel.addr,
-                                  source->rel.addr + source->rel.size);
-                        }
-
-                    if (NULL == source->rel.sections) {
-                        source->rel.sections = init_range_list();
-                        ASSERT(source->rel.sections);
-                    }
-                    add_unique_range_nosort(source->rel.sections,
-                                            reloc_scn->shdr.sh_addr,
-                                            reloc_scn->shdr.sh_size,
-                                            reloc_scn,
-                                            NULL,
-                                            NULL);
-                    INFO("\tSection [%s] matches dynamic range REL.\n",
-                         sname);
-                }
-            else if (source->jmprel.addr &&
-                     source->jmprel.addr <= reloc_scn->shdr.sh_addr &&
-                     reloc_scn->shdr.sh_addr <= source->jmprel.addr +
-                     source->jmprel.size)
-                {
-                    if((reloc_scn->shdr.sh_addr + reloc_scn->shdr.sh_size) >
-                       (source->jmprel.addr + source->jmprel.size))
-                        {
-                            PRINT("WARNING: In [%s], section %s:[%lld,%lld) "
-                                  "is not fully "
-                                  "contained in dynamic range [%lld,%lld)!\n",
-                                  source->name,
-                                  sname,
-                                  reloc_scn->shdr.sh_addr,
-                                  reloc_scn->shdr.sh_addr +
-                                      reloc_scn->shdr.sh_size,
-                                  source->jmprel.addr,
-                                  source->jmprel.addr + source->jmprel.size);
-                        }
-
-                    if (NULL == source->jmprel.sections) {
-                        source->jmprel.sections = init_range_list();
-                        ASSERT(source->jmprel.sections);
-                    }
-                    add_unique_range_nosort(source->jmprel.sections,
-                                            reloc_scn->shdr.sh_addr,
-                                            reloc_scn->shdr.sh_size,
-                                            reloc_scn,
-                                            NULL,
-                                            NULL);
-                    INFO("\tSection [%s] matches dynamic range JMPREL.\n",
-                         sname);
-                }
-            else
-                PRINT("WARNING: Relocation section [%s:%s] does not match "
-                      "any DT_ entry.\n",
-                      source->name,
-                      sname);
-        }
-        else {
-            INFO("Section [%s] was removed, not matching it to dynamic "
-                 "ranges.\n",
-                 sname);
-        }
-    } /* for ... */
-
-    if (source->rel.sections) sort_ranges(source->rel.sections);
-    if (source->jmprel.sections) sort_ranges(source->jmprel.sections);
-}
-
-static void drop_sections(source_t *source)
-{
-    INFO("We are dropping some sections from [%s]--creating section entries "
-         "only for remaining sections.\n",
-         source->name);
-    /* Renumber the sections.  The numbers for the sections after those we are
-       dropping will be shifted back by the number of dropped sections. */
-    int cnt, idx;
-    for (cnt = idx = 1; cnt < source->shnum; ++cnt) {
-        if (source->shdr_info[cnt].idx > 0) {
-            source->shdr_info[cnt].idx = idx++;
-            
-            /* Create a new section. */
-            FAILIF_LIBELF((source->shdr_info[cnt].newscn =
-                           elf_newscn(source->elf)) == NULL, elf_newscn);
-            ASSERT(elf_ndxscn (source->shdr_info[cnt].newscn) ==
-                   source->shdr_info[cnt].idx);
-            
-            /* Copy the section data */
-            Elf_Data *olddata =
-                elf_getdata(source->shdr_info[cnt].scn, // old section
-                            NULL);
-            FAILIF_LIBELF(NULL == olddata, elf_getdata);
-            Elf_Data *data = 
-                elf_newdata(source->shdr_info[cnt].newscn);
-            FAILIF_LIBELF(NULL == data, elf_newdata);
-            *data = *olddata;
-#if COPY_SECTION_DATA_BUFFER
-            if (olddata->d_buf != NULL) {
-                data->d_buf = MALLOC(data->d_size);
-                memcpy(data->d_buf, olddata->d_buf, olddata->d_size);
-            }
-#endif
-            source->shdr_info[cnt].data = data;
-            
-            if (data->d_size !=
-                source->shdr_info[cnt].shdr.sh_size) {
-                INFO("Trimming new-section data from %d to %lld bytes "
-                     "(as calculated by adjust_dynamic_segment()).\n",
-                     data->d_size,
-                     source->shdr_info[cnt].shdr.sh_size);
-                data->d_size =
-                    source->shdr_info[cnt].shdr.sh_size;
-            }
-            
-            INFO("\tsection [%s] (old offset %lld, old size %lld) "
-                 "will have index %d (was %d), new size %d\n",
-                 source->shdr_info[cnt].name,
-                 source->shdr_info[cnt].old_shdr.sh_offset,
-                 source->shdr_info[cnt].old_shdr.sh_size,
-                 source->shdr_info[cnt].idx,
-                 elf_ndxscn(source->shdr_info[cnt].scn),
-                 data->d_size);
-        } else {
-            INFO("\tIgnoring section [%s] (offset %lld, size %lld, index %d), "
-                 "it will be discarded.\n",
-                 source->shdr_info[cnt].name,
-                 source->shdr_info[cnt].shdr.sh_offset,
-                 source->shdr_info[cnt].shdr.sh_size,
-                 elf_ndxscn(source->shdr_info[cnt].scn));
-        }
-
-        /* NOTE: We mark use_old_shdr_for_relocation_calculations even for the
-           sections we are removing.  adjust_elf has an assertion that makes
-           sure that if the values for the size of a section according to its
-           header and its data structure differ, then we are using explicitly
-           the old section header for calculations, and that the section in
-           question is a relocation section.
-        */
-        source->shdr_info[cnt].use_old_shdr_for_relocation_calculations = true;
-    } /* for */
-}
-
-static source_t* process_file(const char *filename,
-                              const char *output, int is_file,
-                              void (*report_library_size_in_memory)(
-                                  const char *name, off_t fsize),
-                              unsigned (*get_next_link_address)(
-                                  const char *name),
-                              int locals_only,
-                              char **lib_lookup_dirs,
-                              int num_lib_lookup_dirs,
-                              char **default_libs,
-                              int num_default_libs,
-                              int dry_run,
-                              int *total_num_handled_relocs,
-                              int *total_num_unhandled_relocs)
-{
-    /* Look up the file in the list of already-handles files, which are
-       represented by source_t structs.  If we do not find the file, then we
-       haven't prelinked it yet.  If we find it, then we have, so we do
-       nothing.  Keep in mind that apriori operates on an entire collection
-       of files, and if application A used library L, and so does application
-       B, if we process A first, then by the time we get to B we will have
-       prelinked L already; that's why we check first to see if a library has
-       been prelinked.
-    */
-    source_t *source =
-        find_source(filename, lib_lookup_dirs, num_lib_lookup_dirs);
-    if (NULL == source) {
-        /* If we could not find the source, then it hasn't been processed yet,
-           so we go ahead and process it! */
-        INFO("Processing [%s].\n", filename);
-        char *full = find_file(filename, lib_lookup_dirs, num_lib_lookup_dirs);
-        FAILIF(NULL == full,
-               "Could not find [%s] in the current directory or in any of "
-               "the search paths!\n", filename);
-
-        unsigned base = get_next_link_address(full);
-
-        source = init_source(full, output, is_file, base, dry_run);
-
-        if (source == NULL) {
-            INFO("File [%s] is a static executable.\n", filename);
-            return NULL;
-        }
-		ASSERT(source->dynamic.scn != NULL);
-
-        /* We need to increment the next prelink address only when the file we
-           are currently handing is a shared library.  Executables do not need
-           to be prelinked at a different address, they are always at address
-           zero.
-
-           Also, if we are prelinking locals only, then we are handling a
-           single file per invokation of apriori, so there is no need to
-           increment the prelink address unless there is a global prelink map,
-           in which case we do need to check to see if the library isn't
-           running into its neighbouts in the prelink map.
-        */
-        if (source->oldelf_hdr.e_type != ET_EXEC && 
-            (!locals_only ||
-             report_library_size_in_memory == 
-             pm_report_library_size_in_memory)) {
-            /* This sets the next link address only if an increment was not
-               specified by the user.  If an address increment was specified,
-               then we just check to make sure that the file size is less than
-               the increment.
-
-               NOTE: The file size is the absolute highest number of bytes that
-               the file may occupy in memory, if the entire file is loaded, but
-               this is almost next the case.  A file will often have sections
-               which are not loaded, which could add a lot of size.  That's why
-               we start off with the file size and then subtract the size of
-               the biggest sections that will not get loaded, which are the
-               varios DWARF sections, all of which of which are named starting
-               with ".debug_".
-
-               We could do better than this (by caculating exactly how many
-               bytes from that file will be loaded), but that's an overkill.
-               Unless the prelink-address increment becomes too small, the file
-               size after subtracting the sizes of the DWARF section will be a
-               good-enough upper bound.
-            */
-
-            unsigned long fsize = source->elf_file_info.st_size;
-            INFO("Calculating loadable file size for next link address.  "
-                 "Starting with %ld.\n", fsize);
-            if (true) {
-                Elf_Scn *scn = NULL;
-                GElf_Shdr shdr_mem, *shdr;
-                const char *scn_name;
-                while ((scn = elf_nextscn (source->oldelf, scn)) != NULL) {
-                    shdr = gelf_getshdr(scn, &shdr_mem);
-                    FAILIF_LIBELF(NULL == shdr, gelf_getshdr);
-                    scn_name = elf_strptr (source->oldelf,
-                                           source->shstrndx, shdr->sh_name);
-                    ASSERT(scn_name != NULL);
-
-                    if (!(shdr->sh_flags & SHF_ALLOC)) {
-                        INFO("\tDecrementing by %lld on account of section "
-                             "[%s].\n",
-                             shdr->sh_size,
-                             scn_name);
-                        fsize -= shdr->sh_size;
-                    }                    
-                }
-            }
-            INFO("Done calculating loadable file size for next link address: "
-                 "Final value is %ld.\n", fsize);
-            report_library_size_in_memory(source->name, fsize);
-        }
-
-        /* Identify the dynamic segment and process it.  Specifically, we find
-           out what dependencies, if any, this file has.  Whenever we encounter
-           such a dependency, we process it recursively; we find out where the
-           various relocation information sections are stored. */
-
-        size_t dynidx;
-        GElf_Dyn *dyn, dyn_mem;
-        size_t numdyn =
-            source->dynamic.shdr.sh_size /
-            source->dynamic.shdr.sh_entsize;
-        ASSERT(source->dynamic.shdr.sh_size == source->dynamic.data->d_size);
-
-        source->rel.idx = source->rel.sz_idx = -1;
-        source->jmprel.idx = source->jmprel.sz_idx = -1;
-
-        for (dynidx = 0; dynidx < numdyn; dynidx++) {
-            dyn = gelf_getdyn (source->dynamic.data,
-                               dynidx,
-                               &dyn_mem);
-            FAILIF_LIBELF(NULL == dyn, gelf_getdyn);
-            /* When we are processing only the local relocations in a file,
-               we don't need to handle any of the dependencies.  It won't
-               hurt if we do, but we will be doing unnecessary work.
-            */
-            switch (dyn->d_tag)
-            {
-            case DT_NEEDED:
-                if (!locals_only) {
-                    /* Process the needed library recursively.
-                     */
-                    const char *dep_lib =
-#if ELF_STRPTR_IS_BROKEN
-                        (((char *)elf_getdata(
-                            elf_getscn(source->elf,
-                                       source->dynamic.shdr.sh_link),
-                            NULL)->d_buf) + dyn->d_un.d_val);
-#else
-                    elf_strptr (source->elf,
-                                source->dynamic.shdr.sh_link,
-                                dyn->d_un.d_val);
-#endif
-                    ASSERT(dep_lib != NULL);
-                    INFO("[%s] depends on [%s].\n", filename, dep_lib);
-                    ASSERT(output == NULL || is_file == 0);
-                    source_t *dep = process_file(dep_lib,
-                                                 output, is_file,
-                                                 report_library_size_in_memory,
-                                                 get_next_link_address,
-                                                 locals_only,
-                                                 lib_lookup_dirs,
-                                                 num_lib_lookup_dirs,
-                                                 default_libs,
-                                                 num_default_libs,
-                                                 dry_run,
-                                                 total_num_handled_relocs,
-                                                 total_num_unhandled_relocs);
-
-                    /* Add the library to the dependency list. */
-                    if (source->num_lib_deps == source->lib_deps_size) {
-                        source->lib_deps_size += 10;
-                        source->lib_deps = REALLOC(source->lib_deps,
-                                                   source->lib_deps_size *
-                                                   sizeof(source_t *));
-                    }
-                    source->lib_deps[source->num_lib_deps++] = dep;
-                }
-                break;
-            case DT_JMPREL:
-                source->jmprel.idx = dynidx;
-                source->jmprel.addr = dyn->d_un.d_ptr;
-                break;
-            case DT_PLTRELSZ:
-                source->jmprel.sz_idx = dynidx;
-                source->jmprel.size = dyn->d_un.d_val;
-                break;
-            case DT_REL:
-                source->rel.idx = dynidx;
-                source->rel.addr = dyn->d_un.d_ptr;
-                break;
-            case DT_RELSZ:
-                source->rel.sz_idx = dynidx;
-                source->rel.size = dyn->d_un.d_val;
-                break;
-            case DT_RELA:
-            case DT_RELASZ:
-                FAILIF(1, "Can't handle DT_RELA and DT_RELASZ entries!\n");
-                break;
-            } /* switch */
-        } /* for each dynamic entry... */
-
-        INFO("Handling [%s].\n", filename);
-
-#ifdef SUPPORT_ANDROID_PRELINK_TAGS
-        if (!source->prelinked)
-#endif
-		{
-            /* When ADJUST_ELF is defined, this call to prelink is a dry run
-               intended to calculate the number of relocations that could not
-               be handled.  This, in turn, allows us to calculate the amount by
-               which we can shrink the various relocation sections before we
-               call adjust_elf.  After we've adjusted the sections, we will
-               call prelink() one more time to do the actual work.
-
-               NOTE: Even when ADJUST_ELF != 0, we cannot adjust an ELF file
-               that is an executabe, because an executable is not PIC.
-            */
-
-            int num_unfinished_relocs = 0;
-            bool adjust_file = ADJUST_ELF && source->elf_hdr.e_type != ET_EXEC;
-            INFO("\n\n\tPRELINKING %s\n\n",
-                 adjust_file ?
-                 "(CALCULATE NUMBER OF HANDLED RELOCATIONS)" :
-                 "(ACTUAL)");
-            int num_relocs = prelink(source, locals_only,
-                                     adjust_file || dry_run,
-                                     lib_lookup_dirs, num_lib_lookup_dirs,
-                                     default_libs, num_default_libs,
-                                     &num_unfinished_relocs);
-            INFO("[%s]: (calculate changes) handled %d, could not handle %d "
-                 "relocations.\n",
-                 source->name,
-                 num_relocs,
-                 num_unfinished_relocs);
-
-            if (adjust_file && !dry_run)
-            {
-                /* Find out the new section sizes of the relocation sections,
-                   but do not move any relocations around, because adjust_elf
-                   needs to know about all relocations in order to adjust the
-                   file correctly.
-                */
-                match_relocation_sections_to_dynamic_ranges(source);
-
-                /* We haven't set up source->shdr_info[] yet, so we do it now.
-
-                   NOTE: setup_shdr_info() depends only on source->oldelf, not
-                   on source->elf!  source->elf is not even defined yet.  We
-                   initialize source->shdr_info[] based on the section
-                   information of the unmodified ELF file, and then make our
-                   modifications in the call to adjust_dynamic_segment() based
-                   on this information.  adjust_dynamic_segment() will
-                   rearrange the unhandled relocations in the beginning of
-                   their relocation sections, and adjust the size of those
-                   relocation sections.  In the case when a relocation section
-                   is completely handled, adjust_dynamic_segment() will mark it
-                   for removal by function adjust_elf.
-                 */
-
-                ASSERT(source->elf == source->oldelf);
-                ASSERT(source->shdr_info == NULL);
-                setup_shdr_info(source);
-                ASSERT(source->shdr_info != NULL);
-
-                INFO("\n\n\tADJUSTING DYNAMIC SEGMENT "
-                     "(CALCULATE CHANGES)\n\n");
-                bool drop_some_sections = adjust_dynamic_segment(source, true);
-
-                /* Reopen the elf file!  Note that we are not doing a dry run
-                   (the if statement above makes sure of that.)
-
-                   NOTE: We call init_elf() after we called
-                         adjust_dynamic_segment() in order to have
-                         adjust_dynamic_segment() refer to source->oldelf when
-                         it refers to source->elf.  Since
-                         adjust_dynamic_segment doesn't actually write to the
-                         ELF file, this is OK.  adjust_dynamic_segment()
-                         updates the sh_size fields of saved section headers
-                         and optionally marks sections for removal.
-
-                         Having adjust_dynamic_segment() refer to
-                         source->oldelf means that we'll have access to
-                         section-name strings so we can print them out in our
-                         logging and debug output.
-                */
-                source->elf = init_elf(source, false);
-
-                /* This is the same code as in init_source() after the call to
-                 * init_elf(). */
-                ASSERT(source->elf != source->oldelf);
-                ebl_closebackend(source->ebl);
-                source->ebl = ebl_openbackend (source->elf);
-                FAILIF_LIBELF(NULL == source->ebl, ebl_openbackend);
-#ifdef ARM_SPECIFIC_HACKS
-                FAILIF_LIBELF(0 != arm_init(source->elf,
-                                            source->elf_hdr.e_machine,
-                                            source->ebl, sizeof(Ebl)),
-                              arm_init);
-#endif/*ARM_SPECIFIC_HACKS*/
-
-                if (drop_some_sections)
-                    drop_sections(source);
-                else {
-                  INFO("All sections remain in [%s]--we are changing at "
-                       "most section sizes.\n", source->name);
-                    create_elf_sections(source, NULL);
-                    int cnt, idx;
-                    for (cnt = idx = 1; cnt < source->shnum; ++cnt) {
-                        Elf_Data *data = elf_getdata(
-                            source->shdr_info[cnt].newscn, // new section
-                            NULL);
-                        if (data->d_size !=
-                            source->shdr_info[cnt].shdr.sh_size) {
-                            INFO("Trimming new-section data from %d to %lld "
-                                 "bytes (as calculated by "
-                                 "adjust_dynamic_segment()).\n",
-                                 data->d_size,
-                                 source->shdr_info[cnt].shdr.sh_size);
-                            data->d_size = source->shdr_info[cnt].shdr.sh_size;
-                        }
-                    }
-                }
-
-                /* Shrink it! */
-                INFO("\n\n\tADJUSTING ELF\n\n");
-                adjust_elf(
-                    source->oldelf, source->name,
-                    source->elf, source->name,
-                    source->ebl,
-                    &source->old_ehdr_mem,
-                    NULL, 0, // no symbol filter
-                    source->shdr_info, // information on how to adjust the ELF
-                    source->shnum, // length of source->shdr_info[]
-                    source->phdr_info, // program-header info
-                    source->shnum, // irrelevant--we're not rebuilding shstrtab
-                    source->shnum, // number of sections in file
-                    source->shstrndx, // index of shstrtab (both in 
-                                      // shdr_info[] and as a section index)
-                    NULL, // irrelevant, since we are not rebuilding shstrtab
-                    drop_some_sections, // some sections are being dropped
-                    elf_ndxscn(source->dynamic.scn), // index of .dynamic
-                    elf_ndxscn(source->symtab.scn), // index of .dynsym
-                    1, // allow shady business
-                    &source->shstrtab_data,
-                    true,
-                    false); // do not rebuild shstrtab
-
-                INFO("\n\n\tREINITIALIZING STRUCTURES "
-                     "(TO CONTAIN ADJUSTMENTS)\n\n");
-                reinit_source(source);
-
-                INFO("\n\n\tPRELINKING (ACTUAL)\n\n");
-#ifdef DEBUG
-                int old_num_unfinished_relocs = num_unfinished_relocs;
-#endif
-                num_unfinished_relocs = 0;
-#ifdef DEBUG
-                int num_relocs_take_two =
-#endif
-                prelink(source, locals_only,
-                        false, /* not a dry run */
-                        lib_lookup_dirs, num_lib_lookup_dirs,
-                        default_libs, num_default_libs,
-                        &num_unfinished_relocs);
-
-                /* The numbers for the total number of relocations and the
-                   number of unhandled relocations between the first and second
-                   invokationof prelink() must be the same!  The first time we
-                   ran prelink() just to calculate the numbers so that we could
-                   calculate the adjustments to pass to adjust_elf, and the
-                   second time we actually carry out the prelinking; the
-                   numbers must stay the same!
-                */
-                ASSERT(num_relocs == num_relocs_take_two);
-                ASSERT(old_num_unfinished_relocs == num_unfinished_relocs);
-
-                INFO("[%s]: (actual prelink) handled %d, could not "
-                     "handle %d relocations.\n",
-                     source->name,
-                     num_relocs,
-                     num_unfinished_relocs);
-            } /* if (adjust_elf && !dry_run) */
-
-            *total_num_handled_relocs += num_relocs;
-            *total_num_unhandled_relocs += num_unfinished_relocs;
-
-            if(num_unfinished_relocs != 0 &&
-               source->elf_hdr.e_type != ET_EXEC &&
-               !locals_only)
-            {
-                /* One reason you could have unfinished relocations in an
-                   executable file is if this file used dlopen() and friends.
-                   We do not adjust relocation entries to those symbols,
-                   because libdl is a dummy only--the real functions are
-                   provided for by the dynamic linker itsef.
-
-                   NOTE FIXME HACK:  This is specific to the Android dynamic
-                   linker, and may not be true in other cases.
-                */
-                PRINT("WARNING: Expecting to have unhandled relocations only "
-                      "for executables (%s is not an executable)!\n",
-                      source->name);
-            }
-
-            match_relocation_sections_to_dynamic_ranges(source);
-
-            /* Now, for each relocation section, check to see if its address
-               matches one of the DT_DYNAMIC relocation pointers.  If so, then
-               if the section has no unhandled relocations, simply set the
-               associated DT_DYNAMIC entry's size to zero.  If the section does
-               have unhandled entries, then lump them all together at the front
-               of the respective section and update the size of the respective
-               DT_DYNAMIC entry to the new size of the section.  A better
-               approach would be do delete a relocation section if it has been
-               fully relocated and to remove its entry from the DT_DYNAMIC
-               array, and for relocation entries that still have some
-               relocations in them, we should shrink the section if that won't
-               violate relative offsets.  This is more work, however, and for
-               the speed improvement we expect from a prelinker, just patching
-               up DT_DYNAMIC will suffice.
-
-               Note: adjust_dynamic_segment() will modify source->shdr_info[]
-                     to denote any change in a relocation section's size.  This
-                     will be picked up by adjust_elf, which will rearrange the
-                     file to eliminate the gap created by the decrease in size
-                     of the relocation section.  We do not need to do this, but
-                     the relocation section could be large, and reduced
-                     drastically by the prelinking process, so it pays to
-                     adjust the file.
-            */
-
-            INFO("\n\n\tADJUSTING DYNAMIC SEGMENT (ACTUAL)\n\n");
-            adjust_dynamic_segment(source, false);
-        }
-#ifdef SUPPORT_ANDROID_PRELINK_TAGS
-        else INFO("[%s] is already prelinked at 0x%08lx.\n",
-                  filename,
-                  source->prelink_base);
-#endif
-    } else INFO("[%s] has been processed already.\n", filename);
-
-    return source;
-}
-
-void apriori(char **execs, int num_execs,
-             char *output,
-             void (*report_library_size_in_memory)(
-                 const char *name, off_t fsize),
-             int (*get_next_link_address)(const char *name),
-             int locals_only,
-             int dry_run,
-             char **lib_lookup_dirs, int num_lib_lookup_dirs,
-             char **default_libs, int num_default_libs,
-			 char *mapfile)
-{
-    source_t *source; /* for general usage */
-    int input_idx;
-
-    ASSERT(report_library_size_in_memory != NULL);
-    ASSERT(get_next_link_address != NULL);
-
-    /* Process and prelink each executable and object file.  Function
-       process_file() is called for each executable in the loop below.
-       It calls itself recursively for each library.   We prelink each library
-       after prelinking its dependencies. */
-    int total_num_handled_relocs = 0, total_num_unhandled_relocs = 0;
-    for (input_idx = 0; input_idx < num_execs; input_idx++) {
-        INFO("executable: [%s]\n", execs[input_idx]);
-        /* Here process_file() is actually processing the top-level
-           executable files. */
-        process_file(execs[input_idx], output, num_execs == 1,
-                     report_library_size_in_memory,
-                     get_next_link_address, /* executables get a link address
-                                               of zero, regardless of this 
-                                               value */
-                     locals_only,
-                     lib_lookup_dirs, num_lib_lookup_dirs,
-                     default_libs, num_default_libs,
-                     dry_run,
-                     &total_num_handled_relocs,
-                     &total_num_unhandled_relocs);
-        /* if source is NULL, then the respective executable is static */
-        /* Mark the source as an executable */
-    } /* for each input executable... */
-
-    PRINT("Handled %d relocations.\n", total_num_handled_relocs);
-    PRINT("Could not handle %d relocations.\n", total_num_unhandled_relocs);
-
-    /* We are done!  Since the end result of our calculations is a set of
-       symbols for each library that other libraries or executables link
-       against, we iterate over the set of libraries one last time, and for
-       each symbol that is marked as satisfying some dependence, we emit
-       a line with the symbol's name to a text file derived from the library's
-       name by appending the suffix .syms to it. */
-
-    if (mapfile != NULL) {
-        const char *mapfile_name = mapfile;
-		FILE *fp;
-        if (*mapfile == '+') {
-            mapfile_name = mapfile + 1;
-            INFO("Opening map file %s for append/write.\n",
-                 mapfile_name);
-            fp = fopen(mapfile_name, "a");
-        }
-        else fp = fopen(mapfile_name, "w");
-
-		FAILIF(fp == NULL, "Cannot open file [%s]: %s (%d)!\n",
-			   mapfile_name,
-			   strerror(errno),
-			   errno);
-        source = sources;
-        while (source) {
-            /* If it's a library, print the results. */
-            if (source->elf_hdr.e_type == ET_DYN) {
-                /* Add to the memory map file. */
-				fprintf(fp, "%s 0x%08lx %lld\n",
-						basename(source->name),
-						source->base,
-						source->elf_file_info.st_size);
-            }
-            source = source->next;
-        }
-		fclose(fp);
-    }
-
-    /* Free the resources--you can't do it in the loop above because function
-       print_symbol_references() accesses nodes other than the one being
-       iterated over.
-     */
-    source = sources;
-    while (source) {
-        source_t *old = source;
-        source = source->next;
-        /* Destroy the evidence. */
-        destroy_source(old);
-    }
-}
diff --git a/tools/apriori/apriori.h b/tools/apriori/apriori.h
deleted file mode 100644
index 5e396fd..0000000
--- a/tools/apriori/apriori.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#ifndef LSD_H
-#define LSD_H
-
-void apriori(char **execs, int num_execs,
-             char *output,
-             void (*set_next_link_address)(const char *name, off_t fsize),
-             int (*get_next_link_address)(const char *name),
-             int locals_only,
-             int dry_run,
-             char **lib_lookup_dirs, int num_lib_lookup_dirs,
-             char **default_libs, int num_default_libs,
-			 char *mapfile);
-
-#endif
diff --git a/tools/apriori/cmdline.c b/tools/apriori/cmdline.c
deleted file mode 100644
index 95f112a..0000000
--- a/tools/apriori/cmdline.c
+++ /dev/null
@@ -1,186 +0,0 @@
-#include <debug.h>
-#include <cmdline.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <getopt.h>
-#include <string.h>
-#include <ctype.h>
-
-extern char *optarg;
-extern int optind, opterr, optopt;
-
-static struct option long_options[] = {
-    {"start-address", required_argument, 0, 's'},
-    {"inc-address",   required_argument, 0, 'i'},
-    {"locals-only",   no_argument,       0, 'l'},
-    {"quiet",         no_argument,       0, 'Q'},
-    {"noupdate",      no_argument,       0, 'n'},
-    {"lookup",        required_argument, 0, 'L'},
-    {"default",       required_argument, 0, 'D'},
-    {"verbose",       no_argument,       0, 'V'},
-    {"help",          no_argument,       0, 'h'},
-	{"mapfile",       required_argument, 0, 'M'},
-	{"output",        required_argument, 0, 'o'},
-    {"prelinkmap",    required_argument, 0, 'p'},
-    {0, 0, 0, 0},
-};
-
-/* This array must parallel long_options[] */
-static const char *descriptions[] = {
-    "start address to prelink libraries to",
-    "address increment for each library",
-    "prelink local relocations only",
-    "suppress informational and non-fatal error messages",
-    "do a dry run--calculate the prelink info but do not update any files",
-    "provide a directory for library lookup",
-    "provide a default library or executable for symbol lookup",
-    "print verbose output",
-    "print help screen",
-	"print a list of prelink addresses to file (prefix filename with + to append instead of overwrite)",
-    "specify an output directory (if multiple inputs) or file (is single input)",
-    "specify a file with prelink addresses instead of a --start-address/--inc-address combination",
-};
-
-void print_help(const char *name) {
-    fprintf(stdout,
-            "invokation:\n"
-            "\t%s file1 [file2 file3 ...] -Ldir1 [-Ldir2 ...] -saddr -iinc [-Vqn] [-M<logfile>]\n"
-            "\t%s -l file [-Vqn] [-M<logfile>]\n"
-            "\t%s -h\n\n", name, name, name);
-    fprintf(stdout, "options:\n");
-    struct option *opt = long_options;
-    const char **desc = descriptions;
-    while (opt->name) {
-        fprintf(stdout, "\t-%c/--%s%s: %s\n",
-                opt->val,
-                opt->name,
-                (opt->has_arg ? " (argument)" : ""),
-                *desc);
-        opt++;
-        desc++;
-    }
-}
-
-int get_options(int argc, char **argv,
-                int *start_addr,
-                int *inc_addr,
-                int *locals_only,
-                int *quiet,
-                int *dry_run,
-                char ***dirs,
-                int *num_dirs,
-                char ***defaults,
-                int *num_defaults,
-                int *verbose,
-				char **mapfile,
-                char **output,
-                char **prelinkmap) {
-    int c;
-
-    ASSERT(dry_run); *dry_run = 0;
-    ASSERT(quiet); *quiet = 0;
-    ASSERT(verbose); *verbose = 0;
-    ASSERT(dirs); *dirs = NULL;
-    ASSERT(num_dirs); *num_dirs = 0;
-    ASSERT(defaults); *defaults = NULL;
-    ASSERT(num_defaults); *num_defaults = 0;
-    ASSERT(start_addr); *start_addr = -1;
-    ASSERT(inc_addr); *inc_addr =   -1;
-    ASSERT(locals_only); *locals_only = 0;
-	ASSERT(mapfile); *mapfile = NULL;
-	ASSERT(output); *output = NULL;
-    ASSERT(prelinkmap); *prelinkmap = NULL;
-    int dirs_size = 0;
-    int defaults_size = 0;
-
-    while (1) {
-        /* getopt_long stores the option index here. */
-        int option_index = 0;
-
-        c = getopt_long (argc, argv,
-                         "VhnQlL:D:s:i:M:o:p:",
-                         long_options,
-                         &option_index);
-        /* Detect the end of the options. */
-        if (c == -1) break;
-
-        if (isgraph(c)) {
-            INFO ("option -%c with value `%s'\n", c, (optarg ?: "(null)"));
-        }
-
-#define SET_STRING_OPTION(name) do {                                   \
-    ASSERT(optarg);                                                    \
-    (*name) = strdup(optarg);                                          \
-} while(0)
-
-#define SET_REPEATED_STRING_OPTION(arr, num, size) do {                \
-	if (*num == size) {                                                \
-		size += 10;                                                    \
-		*arr = (char **)REALLOC(*arr, size * sizeof(char *));          \
-	}                                                                  \
-	SET_STRING_OPTION(((*arr) + *num));                                \
-	(*num)++;                                                          \
-} while(0)
-
-#define SET_INT_OPTION(val) do {                                       \
-    ASSERT(optarg);                                                    \
-	if (strlen(optarg) >= 2 && optarg[0] == '0' && optarg[1] == 'x') { \
-			FAILIF(1 != sscanf(optarg+2, "%x", val),                   \
-				   "Expecting a hexadecimal argument!\n");             \
-	} else {                                                           \
-		FAILIF(1 != sscanf(optarg, "%d", val),                         \
-			   "Expecting a decimal argument!\n");                     \
-	}                                                                  \
-} while(0)
-
-        switch (c) {
-        case 0:
-            /* If this option set a flag, do nothing else now. */
-            if (long_options[option_index].flag != 0)
-                break;
-            INFO ("option %s", long_options[option_index].name);
-            if (optarg)
-                INFO (" with arg %s", optarg);
-            INFO ("\n");
-            break;
-        case 'Q': *quiet = 1; break;
-		case 'n': *dry_run = 1; break;
-		case 'M':
-			SET_STRING_OPTION(mapfile);
-			break;
-		case 'o':
-			SET_STRING_OPTION(output);
-			break;
-        case 'p':
-            SET_STRING_OPTION(prelinkmap);
-            break;
-        case 's':
-            SET_INT_OPTION(start_addr);
-            break;
-        case 'i':
-            SET_INT_OPTION(inc_addr);
-            break;
-        case 'L':
-            SET_REPEATED_STRING_OPTION(dirs, num_dirs, dirs_size);
-            break;
-        case 'D':
-            SET_REPEATED_STRING_OPTION(defaults, num_defaults, defaults_size);
-            break;
-        case 'l': *locals_only = 1; break;
-        case 'h': print_help(argv[0]); exit(1); break;
-        case 'V': *verbose = 1; break;
-        case '?':
-            /* getopt_long already printed an error message. */
-            break;
-
-#undef SET_STRING_OPTION
-#undef SET_REPEATED_STRING_OPTION
-#undef SET_INT_OPTION
-
-        default:
-            FAILIF(1, "Unknown option");
-        }
-    }
-
-    return optind;
-}
diff --git a/tools/apriori/cmdline.h b/tools/apriori/cmdline.h
deleted file mode 100644
index 8f7f394..0000000
--- a/tools/apriori/cmdline.h
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef CMDLINE_H
-#define CMDLINE_H
-
-void print_help(const char *executable_name);
-
-int get_options(int argc, char **argv,
-                int *start_addr,
-                int *addr_increment,
-                int *locals_only,
-                int *quiet,
-                int *dry_run,
-                char ***dirs,
-                int *num_dirs,
-                char ***defaults,
-                int *num_defaults,
-                int *verbose,
-				char **mapfile,
-                char **output,
-                char **prelinkmap);
-
-#endif/*CMDLINE_H*/
diff --git a/tools/apriori/common.h b/tools/apriori/common.h
deleted file mode 100644
index f5d9d2e..0000000
--- a/tools/apriori/common.h
+++ /dev/null
@@ -1,28 +0,0 @@
-#ifndef COMMON_H
-#define COMMON_H
-
-#include <libelf.h>
-#include <elf.h>
-
-#define unlikely(expr) __builtin_expect (expr, 0)
-#define likely(expr)   __builtin_expect (expr, 1)
-
-#define MIN(a,b) ((a)<(b)?(a):(b)) /* no side effects in arguments allowed! */
-
-static inline int is_host_little(void)
-{
-    short val = 0x10;
-    return ((char *)&val)[0] != 0;
-}
-
-static inline long switch_endianness(long val)
-{
-	long newval;
-	((char *)&newval)[3] = ((char *)&val)[0];
-	((char *)&newval)[2] = ((char *)&val)[1];
-	((char *)&newval)[1] = ((char *)&val)[2];
-	((char *)&newval)[0] = ((char *)&val)[3];
-	return newval;
-}
-
-#endif/*COMMON_H*/
diff --git a/tools/apriori/debug.c b/tools/apriori/debug.c
deleted file mode 100644
index 263e09f..0000000
--- a/tools/apriori/debug.c
+++ /dev/null
@@ -1,38 +0,0 @@
-#include <debug.h>
-#include <stdio.h>
-#include <ctype.h>
-
-#define NUM_COLS  (32)
-
-int dump_hex_buffer(FILE *s, void *b, size_t len, size_t elsize) {
-    int num_nonprintable = 0;
-    int i, last;
-    char *pchr = (char *)b;
-    fputc('\n', s);
-    fprintf(s, "%p: ", b);
-    for (i = last = 0; i < len; i++) {
-        if (!elsize) {
-            if (i && !(i % 4)) fprintf(s, " ");
-            if (i && !(i % 8)) fprintf(s, " ");
-        } else {
-            if (i && !(i % elsize)) fprintf(s, " ");
-        }
-
-        if (i && !(i % NUM_COLS)) {
-            while (last < i) {
-                if (isprint(pchr[last]))
-                    fputc(pchr[last], s);
-                else {
-                    fputc('.', s); 
-                    num_nonprintable++;
-                }
-                last++;
-            }
-            fprintf(s, " (%d)\n%p: ", i, b);
-        }
-        fprintf(s, "%02x", (unsigned char)pchr[i]);
-    }
-    if (i && (i % NUM_COLS)) fputs("\n", s);
-    return num_nonprintable;
-}
-
diff --git a/tools/apriori/debug.h b/tools/apriori/debug.h
deleted file mode 100644
index 3996898..0000000
--- a/tools/apriori/debug.h
+++ /dev/null
@@ -1,88 +0,0 @@
-#ifndef DEBUG_H
-#define DEBUG_H
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <common.h>
-
-#ifdef DEBUG
-
-    #define FAILIF(cond, msg...) do {                        \
-	if (unlikely(cond)) {                                \
-        fprintf(stderr, "%s(%d): ", __FILE__, __LINE__); \
-		fprintf(stderr, ##msg);                          \
-		exit(1);                                         \
-	}                                                    \
-} while(0)
-
-/* Debug enabled */
-    #define ASSERT(x) do {                                \
-	if (unlikely(!(x))) {                             \
-		fprintf(stderr,                               \
-				"ASSERTION FAILURE %s:%d: [%s]\n",    \
-				__FILE__, __LINE__, #x);              \
-		exit(1);                                      \
-	}                                                 \
-} while(0)
-
-#else
-
-    #define FAILIF(cond, msg...) do { \
-	if (unlikely(cond)) {         \
-		fprintf(stderr, ##msg);   \
-		exit(1);                  \
-	}                             \
-} while(0)
-
-/* No debug */
-    #define ASSERT(x)   do { } while(0)
-
-#endif/* DEBUG */
-
-#define FAILIF_LIBELF(cond, function) \
-    FAILIF(cond, "%s(): %s\n", #function, elf_errmsg(elf_errno()));
-
-static inline void *MALLOC(unsigned int size) {
-    void *m = malloc(size);
-    FAILIF(NULL == m, "malloc(%d) failed!\n", size);
-    return m;
-}
-
-static inline void *CALLOC(unsigned int num_entries, unsigned int entry_size) {
-    void *m = calloc(num_entries, entry_size);
-    FAILIF(NULL == m, "calloc(%d, %d) failed!\n", num_entries, entry_size);
-    return m;
-}
-
-static inline void *REALLOC(void *ptr, unsigned int size) {
-    void *m = realloc(ptr, size);
-    FAILIF(NULL == m, "realloc(%p, %d) failed!\n", ptr, size);
-    return m;
-}
-
-static inline void FREE(void *ptr) {
-    free(ptr);
-}
-
-static inline void FREEIF(void *ptr) {
-    if (ptr) FREE(ptr);
-}
-
-#define PRINT(x...)  do {                             \
-    extern int quiet_flag;                            \
-    if(likely(!quiet_flag))                           \
-        fprintf(stdout, ##x);                         \
-} while(0)
-
-#define ERROR PRINT
-
-#define INFO(x...)  do {                              \
-    extern int verbose_flag;                          \
-    if(unlikely(verbose_flag))                        \
-        fprintf(stdout, ##x);                         \
-} while(0)
-
-/* Prints a hex and ASCII dump of the selected buffer to the selected stream. */
-int dump_hex_buffer(FILE *s, void *b, size_t l, size_t elsize);
-
-#endif/*DEBUG_H*/
diff --git a/tools/apriori/hash.c b/tools/apriori/hash.c
deleted file mode 100644
index 9f1a614..0000000
--- a/tools/apriori/hash.c
+++ /dev/null
@@ -1,27 +0,0 @@
-#include <common.h>
-#include <debug.h>
-#include <libelf.h>
-#include <hash.h>
-#include <string.h>
-
-int hash_lookup(Elf *elf, 
-                Elf_Data *hash,
-                Elf_Data *symtab,
-                Elf_Data *symstr,
-                const char *symname) {
-    Elf32_Word *hash_data = (Elf32_Word *)hash->d_buf;
-    Elf32_Word index;
-    Elf32_Word nbuckets = *hash_data++;
-    Elf32_Word *buckets = ++hash_data;
-    Elf32_Word *chains  = hash_data + nbuckets;
-
-    index = buckets[elf_hash(symname) % nbuckets];
-    while (index != STN_UNDEF &&
-           strcmp((char *)symstr->d_buf + 
-                  ((Elf32_Sym *)symtab->d_buf)[index].st_name,
-                  symname)) {
-        index = chains[index];
-    }
-
-    return index;
-}
diff --git a/tools/apriori/hash.h b/tools/apriori/hash.h
deleted file mode 100644
index af29b9e..0000000
--- a/tools/apriori/hash.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#ifndef HASH_H
-#define HASH_H
-
-#include <common.h>
-#include <libelf.h>
-#include <gelf.h>
-
-int hash_lookup(Elf *elf, 
-                Elf_Data *hash,
-                Elf_Data *symtab,
-                Elf_Data *symstr,
-                const char *symname);
-
-#endif/*HASH_H*/
diff --git a/tools/apriori/main.c b/tools/apriori/main.c
deleted file mode 100644
index 552392a..0000000
--- a/tools/apriori/main.c
+++ /dev/null
@@ -1,229 +0,0 @@
-/* TODO:
-   1. check the ARM EABI version--this works for versions 1 and 2.
-   2. use a more-intelligent approach to finding the symbol table,
-      symbol-string table, and the .dynamic section.
-   3. fix the determination of the host and ELF-file endianness
-   4. write the help screen
-*/
-
-#include <stdio.h>
-#include <common.h>
-#include <debug.h>
-#include <libelf.h>
-#include <elf.h>
-#include <gelf.h>
-#include <cmdline.h>
-#include <string.h>
-#include <errno.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <apriori.h>
-#include <prelinkmap.h>
-
-/* Flag set by --verbose.  This variable is global as it is accessed by the
-   macro INFO() in multiple compilation unites. */
-int verbose_flag = 0;
-/* Flag set by --quiet.  This variable is global as it is accessed by the
-   macro PRINT() in multiple compilation unites. */
-int quiet_flag = 0;
-static void print_dynamic_symbols(Elf *elf, const char *symtab_name);
-
-static unsigned s_next_link_addr;
-static off_t s_addr_increment;
-
-static void report_library_size_in_memory(const char *name, off_t fsize)
-{
-    ASSERT(s_next_link_addr != -1UL);
-	INFO("Setting next link address (current is at 0x%08x):\n",
-         s_next_link_addr);
-	if (s_addr_increment) {
-		FAILIF(s_addr_increment < fsize,
-			   "Command-line-specified address increment of 0x%08llx (%lld) "
-               "less than file [%s]'s size of %lld bytes!\n",
-			   s_addr_increment, s_addr_increment, name, fsize);
-		FAILIF(s_next_link_addr % 4096,
-			   "User-provided address increment 0x%08lx "
-               "is not page-aligned!\n",
-			   s_addr_increment);
-		INFO("\tignoring file size, adjusting by address increment.\n");
-		s_next_link_addr += s_addr_increment;
-	}
-	else {
-		INFO("\tuser address increment is zero, adjusting by file size.\n");
-		s_next_link_addr += fsize;
-		s_next_link_addr &= ~(4096 - 1);
-	}
-	INFO("\t[%s] file size 0x%08lx\n",
-		 name,
-		 fsize);
-	INFO("\tnext prelink address: 0x%08x\n", s_next_link_addr);
-	ASSERT(!(s_next_link_addr % 4096)); /* New address must be page-aligned */
-}
-
-static unsigned get_next_link_address(const char *name) {
-    return s_next_link_addr;
-}
-
-int main(int argc, char **argv) {
-    /* Do not issue INFO() statements before you call get_options() to set
-       the verbose flag as necessary.
-    */
-
-    char **lookup_dirs, **default_libs;
-	char *mapfile, *output, *prelinkmap;
-    int start_addr, inc_addr, locals_only, num_lookup_dirs, 
-        num_default_libs, dry_run;
-    int first = get_options(argc, argv,
-                            &start_addr, &inc_addr, &locals_only,
-                            &quiet_flag,
-                            &dry_run,
-                            &lookup_dirs, &num_lookup_dirs,
-                            &default_libs, &num_default_libs,
-                            &verbose_flag,
-							&mapfile,
-                            &output,
-                            &prelinkmap);
-
-    /* Perform some command-line-parameter checks. */
-    int cmdline_err = 0;
-    if (first == argc) {
-        ERROR("You must specify at least one input ELF file!\n");
-        cmdline_err++;
-    }
-    /* We complain when the user does not specify a start address for
-       prelinking when the user does not pass the locals_only switch.  The
-       reason is that we will have a collection of executables, which we always
-       prelink to zero, and shared libraries, which we prelink at the specified
-       prelink address.  When the user passes the locals_only switch, we do not
-       fail if the user does not specify start_addr, because the file to
-       prelink may be an executable, and not a shared library.  At this moment,
-       we do not know what the case is.  We find that out when we call function
-       init_source().
-    */
-    if (!locals_only && start_addr == -1) {
-        ERROR("You must specify --start-addr!\n");
-        cmdline_err++;
-    }
-    if (start_addr == -1 && inc_addr != -1) {
-        ERROR("You must provide a start address if you provide an "
-              "address increment!\n");
-        cmdline_err++;
-    }
-    if (prelinkmap != NULL && start_addr != -1) {
-        ERROR("You may not provide a prelink-map file (-p) and use -s/-i "
-              "at the same time!\n");
-        cmdline_err++;
-    }
-    if (inc_addr == 0) {
-        ERROR("You may not specify a link-address increment of zero!\n");
-        cmdline_err++;
-    }
-    if (locals_only) {
-        if (argc - first == 1) {
-            if (inc_addr != -1) {
-                ERROR("You are prelinking a single file; there is no point in "
-                      "specifying a prelink-address increment!\n");
-                /* This is nonfatal error, but paranoia is healthy. */
-                cmdline_err++;
-            }
-        }
-        if (lookup_dirs != NULL || default_libs != NULL) {
-            ERROR("You are prelinking local relocations only; there is "
-                  "no point in specifying lookup directories!\n");
-            /* This is nonfatal error, but paranoia is healthy. */
-            cmdline_err++;
-        }
-    }
-
-    /* If there is an output option, then that must specify a file, if there is
-       a single input file, or a directory, if there are multiple input
-       files. */
-    if (output != NULL) {
-        struct stat output_st;
-        FAILIF(stat(output, &output_st) < 0 && errno != ENOENT,
-               "stat(%s): %s (%d)\n",
-               output,
-               strerror(errno),
-               errno);
-
-        if (argc - first == 1) {
-            FAILIF(!errno && !S_ISREG(output_st.st_mode),
-                   "you have a single input file: -o must specify a "
-                   "file name!\n");
-        }
-        else {
-            FAILIF(errno == ENOENT,
-                   "you have multiple input files: -o must specify a "
-                   "directory name, but %s does not exist!\n",
-                   output);
-            FAILIF(!S_ISDIR(output_st.st_mode),
-                   "you have multiple input files: -o must specify a "
-                   "directory name, but %s is not a directory!\n",
-                   output);
-        }
-    }
-
-    if (cmdline_err) {
-        print_help(argv[0]);
-        FAILIF(1, "There are command-line-option errors.\n");
-    }
-
-    /* Check to see whether the ELF library is current. */
-    FAILIF (elf_version(EV_CURRENT) == EV_NONE, "libelf is out of date!\n");
-
-	if (inc_addr < 0) {
-        if (!locals_only)
-            PRINT("User has not provided an increment address, "
-                  "will use library size to calculate successive "
-                  "prelink addresses.\n");
-        inc_addr = 0;
-	}
-
-    void (*func_report_library_size_in_memory)(const char *name, off_t fsize);
-    unsigned (*func_get_next_link_address)(const char *name);
-
-    if (prelinkmap != NULL) {
-        INFO("Reading prelink addresses from prelink-map file [%s].\n",
-             prelinkmap);
-        pm_init(prelinkmap);
-        func_report_library_size_in_memory = pm_report_library_size_in_memory;
-        func_get_next_link_address = pm_get_next_link_address;
-    }
-    else {
-        INFO("Start address: 0x%x\n", start_addr);
-        INFO("Increment address: 0x%x\n", inc_addr);
-        s_next_link_addr = start_addr;
-        s_addr_increment = inc_addr;
-        func_report_library_size_in_memory = report_library_size_in_memory;
-        func_get_next_link_address = get_next_link_address;
-    }
-
-    /* Prelink... */
-    apriori(&argv[first], argc - first, output,
-            func_report_library_size_in_memory, func_get_next_link_address,
-            locals_only,
-            dry_run,
-            lookup_dirs, num_lookup_dirs,
-            default_libs, num_default_libs,
-			mapfile);
-
-	FREEIF(mapfile);
-    FREEIF(output);
-	if (lookup_dirs) {
-		ASSERT(num_lookup_dirs);
-		while (num_lookup_dirs--)
-			FREE(lookup_dirs[num_lookup_dirs]);
-		FREE(lookup_dirs);
-	}
-	if (default_libs) {
-		ASSERT(num_default_libs);
-		while (num_default_libs--)
-			FREE(default_libs[num_default_libs]);
-		FREE(default_libs);
-	}
-
-    return 0;
-}
diff --git a/tools/apriori/prelink_info.c b/tools/apriori/prelink_info.c
deleted file mode 100644
index da7ca05..0000000
--- a/tools/apriori/prelink_info.c
+++ /dev/null
@@ -1,106 +0,0 @@
-#ifdef SUPPORT_ANDROID_PRELINK_TAGS
-
-#include <sys/types.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <string.h>
-#include <errno.h>
-
-#include <prelink_info.h>
-#include <debug.h>
-#include <common.h>
-
-typedef struct {
-	int32_t mmap_addr;
-	char tag[4]; /* 'P', 'R', 'E', ' ' */
-} prelink_info_t __attribute__((packed));
-
-static inline void set_prelink(long *prelink_addr, 
-							   int elf_little,
-							   prelink_info_t *info)
-{
-    FAILIF(sizeof(prelink_info_t) != 8, "Unexpected sizeof(prelink_info_t) == %d!\n", sizeof(prelink_info_t));
-	if (prelink_addr) {
-		if (!(elf_little ^ is_host_little())) {
-			/* Same endianness */
-			*prelink_addr = info->mmap_addr;
-		}
-		else {
-			/* Different endianness */
-			*prelink_addr = switch_endianness(info->mmap_addr);
-		}
-	}
-}
-
-int check_prelinked(const char *fname, int elf_little, long *prelink_addr)
-{
-    FAILIF(sizeof(prelink_info_t) != 8, "Unexpected sizeof(prelink_info_t) == %d!\n", sizeof(prelink_info_t));
-	int fd = open(fname, O_RDONLY);
-	FAILIF(fd < 0, "open(%s, O_RDONLY): %s (%d)!\n",
-		   fname, strerror(errno), errno);
-	off_t end = lseek(fd, 0, SEEK_END);
-
-    int nr = sizeof(prelink_info_t);
-
-    off_t sz = lseek(fd, -nr, SEEK_CUR);
-	ASSERT((long)(end - sz) == (long)nr);
-	FAILIF(sz == (off_t)-1, 
-		   "lseek(%d, 0, SEEK_END): %s (%d)!\n", 
-		   fd, strerror(errno), errno);
-
-	prelink_info_t info;
-	int num_read = read(fd, &info, nr);
-	FAILIF(num_read < 0, 
-		   "read(%d, &info, sizeof(prelink_info_t)): %s (%d)!\n",
-		   fd, strerror(errno), errno);
-	FAILIF(num_read != sizeof(info),
-		   "read(%d, &info, sizeof(prelink_info_t)): did not read %d bytes as "
-		   "expected (read %d)!\n",
-		   fd, sizeof(info), num_read);
-
-	int prelinked = 0;
-	if (!strncmp(info.tag, "PRE ", 4)) {
-		set_prelink(prelink_addr, elf_little, &info);
-		prelinked = 1;
-	}
-	FAILIF(close(fd) < 0, "close(%d): %s (%d)!\n", fd, strerror(errno), errno);
-	return prelinked;
-}
-
-void setup_prelink_info(const char *fname, int elf_little, long base)
-{
-    FAILIF(sizeof(prelink_info_t) != 8, "Unexpected sizeof(prelink_info_t) == %d!\n", sizeof(prelink_info_t));
-    int fd = open(fname, O_WRONLY);
-    FAILIF(fd < 0, 
-           "open(%s, O_WRONLY): %s (%d)\n" ,
-           fname, strerror(errno), errno);
-    prelink_info_t info;
-    off_t sz = lseek(fd, 0, SEEK_END);
-    FAILIF(sz == (off_t)-1, 
-           "lseek(%d, 0, SEEK_END): %s (%d)!\n", 
-           fd, strerror(errno), errno);
-
-    if (!(elf_little ^ is_host_little())) {
-        /* Same endianness */
-        INFO("Host and ELF file [%s] have same endianness.\n", fname);
-        info.mmap_addr = base;
-    }
-    else {
-        /* Different endianness */
-        INFO("Host and ELF file [%s] have different endianness.\n", fname);
-		info.mmap_addr = switch_endianness(base);
-    }
-    strncpy(info.tag, "PRE ", 4);
-
-    int num_written = write(fd, &info, sizeof(info));
-    FAILIF(num_written < 0, 
-           "write(%d, &info, sizeof(info)): %s (%d)\n",
-           fd, strerror(errno), errno);
-    FAILIF(sizeof(info) != num_written, 
-           "Could not write %d bytes (wrote only %d bytes) as expected!\n",
-           sizeof(info), num_written);
-    FAILIF(close(fd) < 0, "close(%d): %s (%d)!\n", fd, strerror(errno), errno);
-}
-
-#endif /*SUPPORT_ANDROID_PRELINK_TAGS*/
diff --git a/tools/apriori/prelink_info.h b/tools/apriori/prelink_info.h
deleted file mode 100644
index e2787cb..0000000
--- a/tools/apriori/prelink_info.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef PRELINK_INFO_H
-#define PRELINK_INFO_H
-#ifdef SUPPORT_ANDROID_PRELINK_TAGS
-
-int check_prelinked(const char *fname, int elf_little, long *prelink_addr);
-void setup_prelink_info(const char *fname, int elf_little, long base);
-
-#endif
-#endif/*PRELINK_INFO_H*/
diff --git a/tools/apriori/prelinkmap.c b/tools/apriori/prelinkmap.c
deleted file mode 100644
index 9fb00e4..0000000
--- a/tools/apriori/prelinkmap.c
+++ /dev/null
@@ -1,170 +0,0 @@
-#include <prelinkmap.h>
-#include <debug.h>
-#include <errno.h>
-#include <string.h>
-#include <libgen.h>
-#include <ctype.h>
-
-typedef struct mapentry mapentry;
-
-#define MAX_ALIASES 10
-
-struct mapentry
-{
-    mapentry *next;
-    unsigned base;
-    char *names[MAX_ALIASES];
-    int num_names;
-};
-
-static mapentry *maplist = 0;
-
-/* These values limit the address range within which we prelinked libraries
-   reside.  The limit is not set in stone, but should be observed in the 
-   prelink map, or the prelink step will fail.
-*/
-
-#define PRELINK_MIN 0x90000000
-#define PRELINK_MAX 0xBFFFFFFF
-
-void pm_init(const char *file)
-{
-    unsigned line = 0;
-    char buf[256];
-    char *x;
-    FILE *fp;
-    mapentry *me;
-    unsigned last = -1UL;
-    
-    fp = fopen(file, "r");
-    FAILIF(fp == NULL, "Error opening file %s: %s (%d)\n", 
-           file, strerror(errno), errno);
-
-    while(fgets(buf, 256, fp)){
-        x = buf;
-        line++;
-        
-        /* eat leading whitespace */
-        while(isspace(*x)) x++;
-
-        /* comment or blank line? skip! */
-        if(*x == '#') continue;
-        if(*x == 0) continue;
-
-        /* skip name */
-        while(*x && !isspace(*x)) x++;
-
-        if(*x) {
-            *x++ = 0;
-            /* skip space before address */
-            while(*x && isspace(*x)) x++;
-        }
-
-        /* no address? complain. */
-        if(*x == 0) {
-            fprintf(stderr,"warning: %s:%d no base address specified\n",
-                    file, line);
-            continue;
-        }
-        
-        if (isalpha(*x)) {
-            /* Assume that this is an alias, and look through the list of
-               already-installed libraries.
-            */
-            me = maplist;
-            while(me) {
-                /* The strlen() call ignores the newline at the end of x */
-                if (!strncmp(me->names[0], x, strlen(me->names[0]))) {
-                    PRINT("Aliasing library %s to %s at %08x\n",
-                          buf, x, me->base);
-                    break;
-                }
-                me = me->next;
-            }
-            FAILIF(!me, "Nonexistent alias %s -> %s\n", buf, x);
-        }
-        else {
-            unsigned n = strtoul(x, 0, 16);
-            /* Note that this is not the only bounds check.  If a library's
-               size exceeds its slot as defined in the prelink map, the
-               prelinker will exit with an error.  See
-               pm_report_library_size_in_memory().
-            */
-            FAILIF((n < PRELINK_MIN) || (n > PRELINK_MAX),
-                   "%s:%d base 0x%08x out of range.\n",
-                   file, line, n);
-
-            me = malloc(sizeof(mapentry));
-            FAILIF(me == NULL, "Out of memory parsing %s\n", file);
-
-            FAILIF(last <= n, "The prelink map is not in descending order "
-                   "at entry %s (%08x)!\n", buf, n);
-            last = n;
-
-            me->base = n;
-            me->next = maplist;
-            me->num_names = 0;
-            maplist = me;
-        }
-
-        FAILIF(me->num_names >= MAX_ALIASES,
-               "Too many aliases for library %s, maximum is %d.\n",
-               me->names[0],
-               MAX_ALIASES);
-        me->names[me->num_names] = strdup(buf);
-        me->num_names++;
-    }
-
-    fclose(fp);
-}
-
-/* apriori() calls this function when it determine the size of a library 
-   in memory.  pm_report_library_size_in_memory() makes sure that the library
-   fits in the slot provided by the prelink map.
-*/
-void pm_report_library_size_in_memory(const char *name,
-                                      off_t fsize)
-{
-    char *x;
-    mapentry *me;
-    int n;
-    
-    x = strrchr(name,'/');
-    if(x) name = x+1;
-
-    for(me = maplist; me; me = me->next){
-        for (n = 0; n < me->num_names; n++) {
-            if(!strcmp(name, me->names[n])) {
-                off_t slot = me->next ? me->next->base : PRELINK_MAX;
-                slot -= me->base;
-                FAILIF(fsize > slot,
-                       "prelink map error: library %s@0x%08x is too big "
-                       "at %lld bytes, it runs %lld bytes into "
-                       "library %s@0x%08x!\n",
-                       me->names[0], me->base, fsize, fsize - slot,
-                       me->next->names[0], me->next->base);
-                return;
-            }
-        }
-    }
-    
-    FAILIF(1, "library '%s' not in prelink map\n", name);
-}
-
-unsigned pm_get_next_link_address(const char *lookup_name)
-{
-    char *x;
-    mapentry *me;
-    int n;
-    
-    x = strrchr(lookup_name,'/');
-    if(x) lookup_name = x+1;
-    
-    for(me = maplist; me; me = me->next)
-        for (n = 0; n < me->num_names; n++)
-            if(!strcmp(lookup_name, me->names[n]))
-                return me->base;
-
-    FAILIF(1, "library '%s' not in prelink map\n", lookup_name);
-    return 0;
-}
diff --git a/tools/apriori/prelinkmap.h b/tools/apriori/prelinkmap.h
deleted file mode 100644
index 17f7660..0000000
--- a/tools/apriori/prelinkmap.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef PRELINKMAP_H
-#define PRELINKMAP_H
-
-#include <sys/types.h>
-
-extern void pm_init(const char *file);
-extern void pm_report_library_size_in_memory(const char *name, off_t fsize);
-extern unsigned pm_get_next_link_address(const char *name);
-
-#endif/*PRELINKMAP_H*/
diff --git a/tools/apriori/rangesort.c b/tools/apriori/rangesort.c
deleted file mode 100644
index b0295e8..0000000
--- a/tools/apriori/rangesort.c
+++ /dev/null
@@ -1,317 +0,0 @@
-#include <common.h>
-#include <debug.h>
-#include <rangesort.h>
-
-#define PARALLEL_ARRAY_SIZE (5)
-
-struct range_list_t {
-    range_t *array;
-#ifdef DEBUG
-    int is_sorted;
-#endif
-    int array_length;
-    int num_ranges;
-};
-
-range_list_t* init_range_list(void) {
-    range_list_t *ranges = (range_list_t *)MALLOC(sizeof(range_list_t));
-
-    ranges->array = (range_t *)MALLOC(PARALLEL_ARRAY_SIZE*sizeof(range_t));
-    ranges->array_length = PARALLEL_ARRAY_SIZE;
-    ranges->num_ranges = 0;
-#ifdef DEBUG
-    ranges->is_sorted = 0;
-#endif
-    return ranges; 
-}
-
-void destroy_range_list(range_list_t *ranges) {
-    int idx;
-    for (idx = 0; idx < ranges->num_ranges; idx++) {
-        if (ranges->array[idx].user_dtor) {
-            ASSERT(ranges->array[idx].user);
-            ranges->array[idx].user_dtor(ranges->array[idx].user);
-        }
-    }
-    FREE(ranges->array);
-    FREE(ranges);
-}
-
-static inline int CONTAINS(range_t *container, range_t *contained) {
-    return container->start <= contained->start && contained->length && 
-    (container->start + container->length > 
-     contained->start + contained->length);
-}
-
-static inline int IN_RANGE(range_t *range, GElf_Off point) {
-    return 
-    range->start <= point && 
-    point < (range->start + range->length);
-}
-
-static inline int INTERSECT(range_t *left, range_t *right) {
-    return 
-    (IN_RANGE(left, right->start) && 
-     IN_RANGE(right, left->start + left->length)) ||
-    (IN_RANGE(right, left->start) && 
-     IN_RANGE(left, right->start + right->length));
-}
-
-static int range_cmp_for_search(const void *l, const void *r) {
-    range_t *left = (range_t *)l, *right = (range_t *)r;
-    if (INTERSECT(left, right) ||
-        CONTAINS(left, right) ||
-        CONTAINS(right, left)) {
-        return 0;
-    }
-    return left->start - right->start;
-}
-
-static inline void run_checks(const void *l, const void *r) {
-    range_t *left = (range_t *)l, *right = (range_t *)r;
-    if (CONTAINS(left, right)) {
-        if (left->err_fn)
-            left->err_fn(ERROR_CONTAINS, left, right);
-        FAILIF(1, "Range sorting error: [%lld, %lld) contains [%lld, %lld)!\n",
-               left->start, left->start + left->length,
-               right->start, right->start + right->length);
-    }
-    if (CONTAINS(right, left)) {
-        if (right->err_fn)
-            right->err_fn(ERROR_CONTAINS, left, right);
-        FAILIF(1, "Range sorting error: [%lld, %lld) contains [%lld, %lld)!\n",
-               right->start, right->start + right->length,
-               left->start, left->start + left->length);
-    }
-    if (INTERSECT(left, right)) {
-        if (left->err_fn)
-            left->err_fn(ERROR_OVERLAPS, left, right);
-        FAILIF(1, "Range sorting error: [%lld, %lld)and [%lld, %lld) intersect!\n",
-               left->start, left->start + left->length,
-               right->start, right->start + right->length);
-    }
-}
-
-static int range_cmp(const void *l, const void *r) {
-    run_checks(l, r);
-    range_t *left = (range_t *)l, *right = (range_t *)r;
-    return left->start - right->start;
-}
-
-void add_unique_range_nosort(
-                            range_list_t *ranges, 
-                            GElf_Off start, 
-                            GElf_Off length, 
-                            void *user,
-                            void (*err_fn)(range_error_t, range_t *, range_t *),
-                            void (*user_dtor)(void * )) 
-{
-    if (ranges->num_ranges == ranges->array_length) {
-        ranges->array_length += PARALLEL_ARRAY_SIZE;
-        ranges->array = REALLOC(ranges->array, 
-                                ranges->array_length*sizeof(range_t));
-    }
-    ranges->array[ranges->num_ranges].start  = start;
-    ranges->array[ranges->num_ranges].length = length;
-    ranges->array[ranges->num_ranges].user   = user;
-    ranges->array[ranges->num_ranges].err_fn = err_fn;
-    ranges->array[ranges->num_ranges].user_dtor = user_dtor;
-    ranges->num_ranges++;
-}
-
-range_list_t *sort_ranges(range_list_t *ranges) {
-    if (ranges->num_ranges > 1)
-        qsort(ranges->array, ranges->num_ranges, sizeof(range_t), range_cmp);
-    ranges->is_sorted = 1;
-    return ranges;
-}
-
-range_t *find_range(range_list_t *ranges, GElf_Off value) {
-#if 1
-    int i;
-    for (i = 0; i < ranges->num_ranges; i++) {
-        if (ranges->array[i].start <= value && 
-            value < ranges->array[i].start + ranges->array[i].length)
-            return ranges->array + i;
-    }
-    return NULL;
-#else
-    ASSERT(ranges->is_sorted); /* The range list must be sorted */
-    range_t lookup;
-    lookup.start = value;
-    lookup.length = 0;
-    return 
-    (range_t *)bsearch(&lookup, 
-                       ranges->array, ranges->num_ranges, sizeof(range_t), 
-                       range_cmp_for_search);
-#endif
-}
-
-int get_num_ranges(const range_list_t *ranges)
-{
-    return ranges->num_ranges;
-}
-
-range_t *get_sorted_ranges(const range_list_t *ranges, int *num_ranges) {
-    ASSERT(ranges->is_sorted); /* The range list must be sorted */
-    if (num_ranges) {
-        *num_ranges = ranges->num_ranges;
-    }
-    return ranges->array;
-}
-
-GElf_Off get_last_address(const range_list_t *ranges) {
-    ASSERT(ranges->num_ranges);
-    return 
-    ranges->array[ranges->num_ranges-1].start +
-    ranges->array[ranges->num_ranges-1].length;
-}
-
-static void handle_range_error(range_error_t err, 
-                               range_t *left, range_t *right) {
-    switch (err) {
-    case ERROR_CONTAINS:
-        ERROR("ERROR: section (%lld, %lld bytes) contains "
-              "section (%lld, %lld bytes)\n",
-              left->start, left->length,
-              right->start, right->length);
-        break;
-    case ERROR_OVERLAPS:
-        ERROR("ERROR: Section (%lld, %lld bytes) intersects "
-              "section (%lld, %lld bytes)\n",
-              left->start, left->length,
-              right->start, right->length);
-        break;
-    default:
-        ASSERT(!"Unknown range error code!");
-    }
-
-    FAILIF(1, "Range error.\n");
-}
-
-static void destroy_contiguous_range_info(void *user) {
-    contiguous_range_info_t *info = (contiguous_range_info_t *)user;
-    FREE(info->ranges);
-    FREE(info);
-}
-
-static void handle_contiguous_range_error(range_error_t err, 
-                                          range_t *left, 
-                                          range_t *right)
-{
-    contiguous_range_info_t *left_data = 
-        (contiguous_range_info_t *)left->user;
-    ASSERT(left_data);
-    contiguous_range_info_t *right_data = 
-        (contiguous_range_info_t *)right->user;
-    ASSERT(right_data);
-
-    PRINT("Contiguous-range overlap error.  Printing contained ranges:\n");
-    int cnt;
-    PRINT("\tLeft ranges:\n");
-    for (cnt = 0; cnt < left_data->num_ranges; cnt++) {
-        PRINT("\t\t[%lld, %lld)\n",
-              left_data->ranges[cnt].start,
-              left_data->ranges[cnt].start + left_data->ranges[cnt].length);
-    }
-    PRINT("\tRight ranges:\n");
-    for (cnt = 0; cnt < right_data->num_ranges; cnt++) {
-        PRINT("\t\t[%lld, %lld)\n",
-              right_data->ranges[cnt].start,
-              right_data->ranges[cnt].start + right_data->ranges[cnt].length);
-    }
-
-    handle_range_error(err, left, right);
-}
-
-range_list_t* get_contiguous_ranges(const range_list_t *input)
-{
-    ASSERT(input);
-    FAILIF(!input->is_sorted, 
-           "get_contiguous_ranges(): input range list is not sorted!\n");
-
-    range_list_t* ret = init_range_list();
-    int num_ranges;
-    range_t *ranges = get_sorted_ranges(input, &num_ranges);
-
-    int end_idx = 0;
-    while (end_idx < num_ranges) {
-        int start_idx = end_idx++;
-        int old_end_idx = start_idx;
-        int total_length = ranges[start_idx].length;
-        while (end_idx < num_ranges) {
-            if (ranges[old_end_idx].start + ranges[old_end_idx].length !=
-                ranges[end_idx].start)
-                break;
-            old_end_idx = end_idx++;
-            total_length += ranges[old_end_idx].length;
-        }
-
-        contiguous_range_info_t *user = 
-            (contiguous_range_info_t *)MALLOC(sizeof(contiguous_range_info_t));
-        user->num_ranges = end_idx - start_idx;
-        user->ranges = (range_t *)MALLOC(user->num_ranges * sizeof(range_t));
-        int i;
-        for (i = 0; i < end_idx - start_idx; i++)
-            user->ranges[i] = ranges[start_idx + i];
-        add_unique_range_nosort(ret, 
-                                ranges[start_idx].start,
-                                total_length,
-                                user,
-                                handle_contiguous_range_error,
-                                destroy_contiguous_range_info);
-    }
-
-    return ret;
-}
-
-range_list_t* subtract_ranges(const range_list_t *r, const range_list_t *s)
-{
-    ASSERT(r);  ASSERT(r->is_sorted);
-    ASSERT(s);  ASSERT(s->is_sorted);
-
-    range_list_t *result = init_range_list();
-
-    int r_num_ranges, r_idx;
-    range_t *r_ranges = get_sorted_ranges(r, &r_num_ranges);
-    ASSERT(r_ranges);
-
-    int s_num_ranges, s_idx;
-    range_t *s_ranges = get_sorted_ranges(s, &s_num_ranges);
-    ASSERT(s_ranges);
-
-    s_idx = 0;
-    for (r_idx = 0; r_idx < r_num_ranges; r_idx++) {
-        GElf_Off last_start = r_ranges[r_idx].start;
-        for (; s_idx < s_num_ranges; s_idx++) {
-            if (CONTAINS(&r_ranges[r_idx], &s_ranges[s_idx])) {
-                if (last_start == 
-                    r_ranges[r_idx].start + r_ranges[r_idx].length) {
-                    break;
-                }
-                if (last_start == s_ranges[s_idx].start) {
-                    last_start += s_ranges[s_idx].length;
-                    continue;
-                }
-                INFO("Adding subtracted range [%lld, %lld)\n",
-                     last_start,
-                     s_ranges[s_idx].start);
-                add_unique_range_nosort(
-                    result, 
-                    last_start,
-                    s_ranges[s_idx].start - last_start,
-                    NULL,
-                    NULL,
-                    NULL);
-                last_start = s_ranges[s_idx].start + s_ranges[s_idx].length;
-            } else {
-                ASSERT(!INTERSECT(&r_ranges[r_idx], &s_ranges[s_idx]));
-                break;
-            }
-        } /* while (s_idx < s_num_ranges) */
-    } /* for (r_idx = 0; r_idx < r_num_ranges; r_idx++) */
-
-    return result;
-}
-
-
diff --git a/tools/apriori/rangesort.h b/tools/apriori/rangesort.h
deleted file mode 100644
index 21db357..0000000
--- a/tools/apriori/rangesort.h
+++ /dev/null
@@ -1,105 +0,0 @@
-#ifndef RANGESORT_H
-#define RANGESORT_H
-
-/* This implements a simple sorted list of non-overlapping ranges. */
-
-#include <debug.h>
-#include <common.h>
-#include <gelf.h>
-
-typedef enum range_error_t {
-    ERROR_CONTAINS,
-    ERROR_OVERLAPS
-} range_error_t;
-
-typedef struct range_t range_t;
-struct range_t {
-    GElf_Off start;
-    GElf_Off length;
-    void *user;
-    void (*err_fn)(range_error_t, range_t *, range_t *);
-    void (*user_dtor)(void *);
-};
-
-typedef struct range_list_t range_list_t;
-
-range_list_t* init_range_list();
-void destroy_range_list(range_list_t *);
-
-/* Just adds a range to the list. We won't detect whether the range overlaps
-   other ranges or contains them, or is contained by them, till we call 
-   sort_ranges(). */
-void add_unique_range_nosort(range_list_t *ranges, 
-                             GElf_Off start, GElf_Off length, 
-                             void *user,
-                             void (*err_fn)(range_error_t, range_t *, range_t *),
-                             void (*user_dtor)(void * ));
-
-/* Sorts the ranges.  If there are overlapping ranges or ranges that contain
-   other ranges, it will cause the program to exit with a FAIL. */
-range_list_t* sort_ranges(range_list_t *ranges);
-/* Find which range value falls in.  Return that range or NULL if value does
-   not fall within any range. */
-range_t *find_range(range_list_t *ranges, GElf_Off value);
-int get_num_ranges(const range_list_t *ranges);
-range_t *get_sorted_ranges(const range_list_t *ranges, int *num_ranges);
-GElf_Off get_last_address(const range_list_t *ranges);
-
-/* This returns a range_list_t handle that contains ranges composed of the 
-   adjacent ranges of the input range list.  The user data of each range in 
-   the range list is a structure of the type contiguous_range_info_t. 
-   This structure contains an array of pointers to copies of the original 
-   range_t structures comprising each new contiguous range, as well as the 
-   length of that array.  
-
-   NOTE: The input range must be sorted!
-
-   NOTE: destroy_range_list() will take care of releasing the data that it
-   allocates as a result of calling get_contiguous_ranges().  Do not free that
-   data yourself.
-
-   NOTE: the user data of the original range_t structures is simply copied, so 
-   be careful handling it. You can destroy the range_list_t with 
-   destroy_range_list() as usual.  On error, the function does not return--the 
-   program terminates. 
-
-   NOTE: The returned range is not sorted.  You must call sort_ranges() if you
-   need to.
-*/
-
-typedef struct {
-    int num_ranges;
-    range_t *ranges;
-} contiguous_range_info_t;
-
-range_list_t* get_contiguous_ranges(const range_list_t *);
-
-/* The function below takes in two range lists: r and s, and subtracts the 
-   ranges in s from those in r.  For example, if r and s are as follows:
-
-   r = { [0, 10) }
-   s = { [3, 5), [7, 9) }
-
-   Then r - s is { [0, 3), [5, 7), [9, 10) }
-
-   NOTE: Both range lists must be sorted on input.  This is guarded by an 
-         assertion.
-
-   NOTE: Range s must contain ranges, which are fully contained by the span of
-         range r (the span being the interval between the start of the lowest
-         range in r, inclusive, and the end of the highest range in r, 
-         exclusive).
-
-   NOTE: In addition to the requirement above, range s must contain ranges, 
-         each of which is a subrange of one of the ranges of r.
-
-   NOTE: There is no user info associated with the resulting range. 
-
-   NOTE: The resulting range is not sorted.
-
-   Ther returned list must be destroyed with destroy_range_list().
-*/
-
-range_list_t* subtract_ranges(const range_list_t *r, const range_list_t *s);
-
-#endif/*RANGESORT_H*/
diff --git a/tools/apriori/source.c b/tools/apriori/source.c
deleted file mode 100644
index 69c57c7..0000000
--- a/tools/apriori/source.c
+++ /dev/null
@@ -1,18 +0,0 @@
-#include <source.h>
-
-void find_section(source_t *source, Elf64_Addr address,
-                  Elf_Scn **scn, 
-                  GElf_Shdr *shdr, 
-                  Elf_Data **data)
-{
-    range_t *range = find_range(source->sorted_sections, address);
-    FAILIF(NULL == range, 
-           "Cannot match address %lld to any range in [%s]!\n",
-           address,
-           source->name);
-    *scn = (Elf_Scn *)range->user;
-    ASSERT(*scn);
-    FAILIF_LIBELF(NULL == gelf_getshdr(*scn, shdr), gelf_getshdr);
-    *data = elf_getdata(*scn, NULL);
-    FAILIF_LIBELF(NULL == *data, elf_getdata);
-}
diff --git a/tools/apriori/source.h b/tools/apriori/source.h
deleted file mode 100644
index 5381a29..0000000
--- a/tools/apriori/source.h
+++ /dev/null
@@ -1,122 +0,0 @@
-#ifndef SOURCE_H
-#define SOURCE_H
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <libelf.h>
-#include <libebl.h>
-#ifdef ARM_SPECIFIC_HACKS
-    #include <libebl_arm.h>
-#endif/*ARM_SPECIFIC_HACKS*/
-#include <elf.h>
-#include <gelf.h>
-#include <rangesort.h>
-#include <elfcopy.h>
-
-typedef struct source_t source_t;
-
-typedef struct {
-    Elf_Scn *scn;
-    GElf_Shdr shdr;
-    Elf_Data *data;
-    shdr_info_t *info;
-} section_info_t;
-
-typedef struct {
-    GElf_Rel *rels;
-    int num_rels; /* number of relocations that were not finished */
-    int rels_size; /* this is the size of rels[], NOT the number of rels! */
-} unfinished_relocation_t;
-
-typedef struct {
-    int processed;
-    size_t idx; /* index of DT entry in the .dynamic section, if entry has a ptr value */
-    Elf64_Addr addr; /* if DT entry's value is an address, we save it here */
-    size_t sz_idx; /* index of DT entry in the .dynamic section, if entry has a size value */
-    Elf64_Xword size; /* if DT entry's value is a size, we save it here */
-
-    range_list_t *sections; /* list of sections corresponding to this entry */
-    int num_unfinished_relocs; /* this variables is populated by adjust_dynamic_segment_for()
-                                  during the second pass of the prelinker */
-} dt_rel_info_t;
-
-struct source_t {
-    source_t *next;
-
-    char *name;  /* full path name of this executable file */
-    char *output; /* name of the output file or directory */
-    int output_is_dir; /* nonzero if output is a directory, 0 if output is a file */
-    /* ELF-related information: */
-    Elf *oldelf;
-    Elf *elf;
-    /* info[] is an array of structures describing the sections of the new ELF
-       file.  We populate the info[] array in clone_elf(), and use it to
-       adjust the size of the ELF file when we modify the relocation-entry
-       section.
-    */
-    shdr_info_t *shdr_info;
-    GElf_Ehdr old_ehdr_mem; /* store ELF header of original library */
-    GElf_Ehdr ehdr_mem; /* store ELF header of new library */
-    GElf_Phdr *phdr_info;
-    Ebl *ebl;
-    Elf_Data *shstrtab_data;
-    int elf_fd;
-    int newelf_fd; /* fd of output file, -1 if output == NULL */
-    int newelf_relo_fd; /* fd of relocaion output file */
-    struct stat elf_file_info;
-    GElf_Ehdr elf_hdr, oldelf_hdr;
-    size_t shstrndx;
-    int shnum; /* number of sections */
-    int dry_run; /* 0 if we do not update the files, 1 (default) otherwise */
-
-    section_info_t symtab;
-    section_info_t strtab;
-    section_info_t dynamic;
-    section_info_t hash;
-    section_info_t bss;
-
-    range_list_t *sorted_sections;
-
-    section_info_t *relocation_sections; /* relocation sections in file */
-    int num_relocation_sections; /* number of relocation sections (<= relocation_sections_size) */
-    int relocation_sections_size; /* sice of array -- NOT number of relocs! */
-
-    /* relocation sections that contain relocations that could not be handled.
-       This array is parallel to relocation_sections, and for each entry
-       in that array, it contains a list of relocations that could not be
-       handled.
-    */
-    unfinished_relocation_t *unfinished;
-
-    /* The sections field of these two structuer contains a list of elements
-       of the member variable relocations. */
-    dt_rel_info_t rel;
-    dt_rel_info_t jmprel;
-
-    int num_syms; /* number of symbols in symbol table.  This is the length of
-                     both exports[] and satisfied[] arrays. */
-
-    /* This is an array that contains one element for each library dependency
-       listed in the executable or shared library. */
-    source_t **lib_deps; /* list of library dependencies */
-    int num_lib_deps; /* actual number of library dependencies */
-    int lib_deps_size; /* size of lib_deps array--NOT actual number of deps! */
-
-    /* This is zero for executables.  For shared libraries, it is the address
-	   at which the library was prelinked. */
-    unsigned base;
-#ifdef SUPPORT_ANDROID_PRELINK_TAGS
-	/* When we read in a file, if it has the prelinked tag, we set prelinked
-	   to 1 and the prelink address in the tag to prelink_base.  This address
-	   must match the value of base that we choose. */
-	int prelinked;
-	long prelink_base; /* valid if prelinked != 0 */
-#endif/*SUPPORT_ANDROID_PRELINK_TAGS*/
-};
-
-extern void find_section(source_t *source, Elf64_Addr address,
-                         Elf_Scn **scn,
-                         GElf_Shdr *shdr,
-                         Elf_Data **data);
-
-#endif/*SOURCE_H*/
diff --git a/tools/apriori/tweak.h b/tools/apriori/tweak.h
deleted file mode 100755
index 3afedee..0000000
--- a/tools/apriori/tweak.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#ifndef TWEAK_H
-#define TWEAK_H
-
-#include <source.h>
-
-/* This function will break up the .bss section into multiple subsegments, 
-   depending on whether the .bss segment contains copy-relocated symbols.  This
-   will produce a nonstandard ELF file (with multiple .bss sections), tht the
-   linker will need to know how to handle.  The return value is the number of
-   segments that the .bss segment was broken into (zero if the .bss segment was
-   not modified. */
-
-int tweak_bss_if_necessary(source_t *source);
-
-#endif/*TWEAK_H*/
diff --git a/tools/check_prereq/Android.mk b/tools/check_prereq/Android.mk
index abedff6..4329aff 100644
--- a/tools/check_prereq/Android.mk
+++ b/tools/check_prereq/Android.mk
@@ -15,8 +15,6 @@
 LOCAL_PATH := $(call my-dir)
 include $(CLEAR_VARS)
 
-ifneq ($(TARGET_SIMULATOR),true)
-
 LOCAL_SRC_FILES := check_prereq.c
 LOCAL_MODULE := check_prereq
 LOCAL_FORCE_STATIC_EXECUTABLE := true
@@ -25,6 +23,3 @@
 LOCAL_STATIC_LIBRARIES += libcutils libc
 
 include $(BUILD_EXECUTABLE)
-
-endif  # !TARGET_SIMULATOR
-
diff --git a/tools/fs_config/Android.mk b/tools/fs_config/Android.mk
index 3f2ed95..5486bc2 100644
--- a/tools/fs_config/Android.mk
+++ b/tools/fs_config/Android.mk
@@ -15,13 +15,9 @@
 LOCAL_PATH := $(call my-dir)
 include $(CLEAR_VARS)
 
-ifneq ($(TARGET_SIMULATOR),true)
-
 LOCAL_SRC_FILES := fs_config.c
 LOCAL_MODULE := fs_config
 LOCAL_FORCE_STATIC_EXECUTABLE := true
 LOCAL_MODULE_TAGS := eng
 
 include $(BUILD_HOST_EXECUTABLE)
-
-endif  # !TARGET_SIMULATOR
diff --git a/tools/iself/Android.mk b/tools/iself/Android.mk
deleted file mode 100755
index 49fabff..0000000
--- a/tools/iself/Android.mk
+++ /dev/null
@@ -1,23 +0,0 @@
-# Copyright 2005 The Android Open Source Project
-#
-# Android.mk for iself
-#
-
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_CFLAGS += -O2 -g
-LOCAL_CFLAGS += -fno-function-sections -fno-data-sections -fno-inline
-LOCAL_CFLAGS += -Wall -Wno-unused-function #-Werror
-LOCAL_CFLAGS += -DDEBUG
-
-LOCAL_C_INCLUDES:= \
-	$(LOCAL_PATH)/
-
-LOCAL_SRC_FILES := \
-	iself.c
-
-LOCAL_MODULE := iself
-
-include $(BUILD_HOST_EXECUTABLE)
diff --git a/tools/iself/debug.h b/tools/iself/debug.h
deleted file mode 100644
index 9bbf47f..0000000
--- a/tools/iself/debug.h
+++ /dev/null
@@ -1,90 +0,0 @@
-#ifndef DEBUG_H
-#define DEBUG_H
-
-#include <stdlib.h>
-#include <stdio.h>
-
-#define unlikely(expr) __builtin_expect (expr, 0)
-#define likely(expr)   __builtin_expect (expr, 1)
-
-#ifdef DEBUG
-
-    #define FAILIF(cond, msg...) do {                        \
-	if (unlikely(cond)) {                                \
-        fprintf(stderr, "%s(%d): ", __FILE__, __LINE__); \
-		fprintf(stderr, ##msg);                          \
-		exit(1);                                         \
-	}                                                    \
-} while(0)
-
-/* Debug enabled */
-    #define ASSERT(x) do {                                \
-	if (unlikely(!(x))) {                             \
-		fprintf(stderr,                               \
-				"ASSERTION FAILURE %s:%d: [%s]\n",    \
-				__FILE__, __LINE__, #x);              \
-		exit(1);                                      \
-	}                                                 \
-} while(0)
-
-#else
-
-    #define FAILIF(cond, msg...) do { \
-	if (unlikely(cond)) {         \
-		fprintf(stderr, ##msg);   \
-		exit(1);                  \
-	}                             \
-} while(0)
-
-/* No debug */
-    #define ASSERT(x)   do { } while(0)
-
-#endif/* DEBUG */
-
-#define FAILIF_LIBELF(cond, function) \
-    FAILIF(cond, "%s(): %s\n", #function, elf_errmsg(elf_errno()));
-
-static inline void *MALLOC(unsigned int size) {
-    void *m = malloc(size);
-    FAILIF(NULL == m, "malloc(%d) failed!\n", size);
-    return m;
-}
-
-static inline void *CALLOC(unsigned int num_entries, unsigned int entry_size) {
-    void *m = calloc(num_entries, entry_size);
-    FAILIF(NULL == m, "calloc(%d, %d) failed!\n", num_entries, entry_size);
-    return m;
-}
-
-static inline void *REALLOC(void *ptr, unsigned int size) {
-    void *m = realloc(ptr, size);
-    FAILIF(NULL == m, "realloc(%p, %d) failed!\n", ptr, size);
-    return m;
-}
-
-static inline void FREE(void *ptr) {
-    free(ptr);
-}
-
-static inline void FREEIF(void *ptr) {
-    if (ptr) FREE(ptr);
-}
-
-#define PRINT(x...)  do {                             \
-    extern int quiet_flag;                            \
-    if(likely(!quiet_flag))                           \
-        fprintf(stdout, ##x);                         \
-} while(0)
-
-#define ERROR PRINT
-
-#define INFO(x...)  do {                              \
-    extern int verbose_flag;                          \
-    if(unlikely(verbose_flag))                        \
-        fprintf(stdout, ##x);                         \
-} while(0)
-
-/* Prints a hex and ASCII dump of the selected buffer to the selected stream. */
-int dump_hex_buffer(FILE *s, void *b, size_t l, size_t elsize);
-
-#endif/*DEBUG_H*/
diff --git a/tools/iself/iself.c b/tools/iself/iself.c
deleted file mode 100644
index e634a22..0000000
--- a/tools/iself/iself.c
+++ /dev/null
@@ -1,36 +0,0 @@
-#include <debug.h>
-#include <unistd.h>
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <string.h>
-#include <errno.h>
-
-int
-main(int argc, char **argv)
-{
-	char *fname;
-	int fd;
-	char magic[4];
-
-	argc--, argv++;
-	FAILIF(argc != 1, "Expecting a file name!\n");
-	fname = *argv;
-
-	fd = open(fname, O_RDONLY);
-	FAILIF(fd < 0, "Error opening %s for reading: %s (%d)!\n",
-           fname, strerror(errno), errno);
-
-	FAILIF(4 != read(fd, magic, 4),
-           "Could not read first 4 bytes from %s: %s (%d)!\n",
-           fname, strerror(errno), errno);
-
-    if (magic[0] != 0x7f) return 1;
-    if (magic[1] != 'E')  return 1;
-    if (magic[2] != 'L')  return 1;
-    if (magic[3] != 'F')  return 1;
-
-    return 0;
-}
diff --git a/tools/isprelinked/Android.mk b/tools/isprelinked/Android.mk
deleted file mode 100755
index e085f29..0000000
--- a/tools/isprelinked/Android.mk
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright 2005 The Android Open Source Project
-#
-# Android.mk for apriori 
-#
-
-LOCAL_PATH:= $(call my-dir)
-
-ifeq ($(TARGET_ARCH),arm)
-include $(CLEAR_VARS)
-
-LOCAL_LDLIBS += -ldl
-LOCAL_CFLAGS += -O2 -g 
-LOCAL_CFLAGS += -fno-function-sections -fno-data-sections -fno-inline 
-LOCAL_CFLAGS += -Wall -Wno-unused-function #-Werror
-LOCAL_CFLAGS += -DSUPPORT_ANDROID_PRELINK_TAGS
-LOCAL_CFLAGS += -DARM_SPECIFIC_HACKS
-LOCAL_CFLAGS += -DDEBUG
-
-ifeq ($(HOST_OS),windows)
-LOCAL_LDLIBS += -lintl
-endif
-
-LOCAL_SRC_FILES := \
-	isprelinked.c \
-	debug.c \
-	prelink_info.c
-
-LOCAL_C_INCLUDES:= \
-	$(LOCAL_PATH)/ \
-	external/elfutils/lib/ \
-	external/elfutils/libelf/ \
-	external/elfutils/libebl/ \
-	external/elfcopy/
-
-LOCAL_STATIC_LIBRARIES := libelfcopy libelf libebl libebl_arm #dl
-
-LOCAL_MODULE := isprelinked
-
-include $(BUILD_HOST_EXECUTABLE)
-endif #TARGET_ARCH==arm
diff --git a/tools/isprelinked/common.h b/tools/isprelinked/common.h
deleted file mode 100644
index f5d9d2e..0000000
--- a/tools/isprelinked/common.h
+++ /dev/null
@@ -1,28 +0,0 @@
-#ifndef COMMON_H
-#define COMMON_H
-
-#include <libelf.h>
-#include <elf.h>
-
-#define unlikely(expr) __builtin_expect (expr, 0)
-#define likely(expr)   __builtin_expect (expr, 1)
-
-#define MIN(a,b) ((a)<(b)?(a):(b)) /* no side effects in arguments allowed! */
-
-static inline int is_host_little(void)
-{
-    short val = 0x10;
-    return ((char *)&val)[0] != 0;
-}
-
-static inline long switch_endianness(long val)
-{
-	long newval;
-	((char *)&newval)[3] = ((char *)&val)[0];
-	((char *)&newval)[2] = ((char *)&val)[1];
-	((char *)&newval)[1] = ((char *)&val)[2];
-	((char *)&newval)[0] = ((char *)&val)[3];
-	return newval;
-}
-
-#endif/*COMMON_H*/
diff --git a/tools/isprelinked/debug.c b/tools/isprelinked/debug.c
deleted file mode 100644
index 6066543..0000000
--- a/tools/isprelinked/debug.c
+++ /dev/null
@@ -1,37 +0,0 @@
-#include <debug.h>
-#include <stdio.h>
-#include <ctype.h>
-
-#define NUM_COLS  (32)
-
-int dump_hex_buffer(FILE *s, void *b, size_t len, size_t elsize) {
-    int num_nonprintable = 0;
-    int i, last;
-    char *pchr = (char *)b;
-    fputc('\n', s);
-    for (i = last = 0; i < len; i++) {
-        if (!elsize) {
-            if (i && !(i % 4)) fprintf(s, " ");
-            if (i && !(i % 8)) fprintf(s, " ");
-        } else {
-            if (i && !(i % elsize)) fprintf(s, " ");
-        }
-
-        if (i && !(i % NUM_COLS)) {
-            while (last < i) {
-                if (isprint(pchr[last]))
-                    fputc(pchr[last], s);
-                else {
-                    fputc('.', s); 
-                    num_nonprintable++;
-                }
-                last++;
-            }
-            fprintf(s, " (%d)\n", i);
-        }
-        fprintf(s, "%02x", (unsigned char)pchr[i]);
-    }
-    if (i && (i % NUM_COLS)) fputs("\n", s);
-    return num_nonprintable;
-}
-
diff --git a/tools/isprelinked/debug.h b/tools/isprelinked/debug.h
deleted file mode 100644
index 3996898..0000000
--- a/tools/isprelinked/debug.h
+++ /dev/null
@@ -1,88 +0,0 @@
-#ifndef DEBUG_H
-#define DEBUG_H
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <common.h>
-
-#ifdef DEBUG
-
-    #define FAILIF(cond, msg...) do {                        \
-	if (unlikely(cond)) {                                \
-        fprintf(stderr, "%s(%d): ", __FILE__, __LINE__); \
-		fprintf(stderr, ##msg);                          \
-		exit(1);                                         \
-	}                                                    \
-} while(0)
-
-/* Debug enabled */
-    #define ASSERT(x) do {                                \
-	if (unlikely(!(x))) {                             \
-		fprintf(stderr,                               \
-				"ASSERTION FAILURE %s:%d: [%s]\n",    \
-				__FILE__, __LINE__, #x);              \
-		exit(1);                                      \
-	}                                                 \
-} while(0)
-
-#else
-
-    #define FAILIF(cond, msg...) do { \
-	if (unlikely(cond)) {         \
-		fprintf(stderr, ##msg);   \
-		exit(1);                  \
-	}                             \
-} while(0)
-
-/* No debug */
-    #define ASSERT(x)   do { } while(0)
-
-#endif/* DEBUG */
-
-#define FAILIF_LIBELF(cond, function) \
-    FAILIF(cond, "%s(): %s\n", #function, elf_errmsg(elf_errno()));
-
-static inline void *MALLOC(unsigned int size) {
-    void *m = malloc(size);
-    FAILIF(NULL == m, "malloc(%d) failed!\n", size);
-    return m;
-}
-
-static inline void *CALLOC(unsigned int num_entries, unsigned int entry_size) {
-    void *m = calloc(num_entries, entry_size);
-    FAILIF(NULL == m, "calloc(%d, %d) failed!\n", num_entries, entry_size);
-    return m;
-}
-
-static inline void *REALLOC(void *ptr, unsigned int size) {
-    void *m = realloc(ptr, size);
-    FAILIF(NULL == m, "realloc(%p, %d) failed!\n", ptr, size);
-    return m;
-}
-
-static inline void FREE(void *ptr) {
-    free(ptr);
-}
-
-static inline void FREEIF(void *ptr) {
-    if (ptr) FREE(ptr);
-}
-
-#define PRINT(x...)  do {                             \
-    extern int quiet_flag;                            \
-    if(likely(!quiet_flag))                           \
-        fprintf(stdout, ##x);                         \
-} while(0)
-
-#define ERROR PRINT
-
-#define INFO(x...)  do {                              \
-    extern int verbose_flag;                          \
-    if(unlikely(verbose_flag))                        \
-        fprintf(stdout, ##x);                         \
-} while(0)
-
-/* Prints a hex and ASCII dump of the selected buffer to the selected stream. */
-int dump_hex_buffer(FILE *s, void *b, size_t l, size_t elsize);
-
-#endif/*DEBUG_H*/
diff --git a/tools/isprelinked/isprelinked.c b/tools/isprelinked/isprelinked.c
deleted file mode 100644
index c677e39..0000000
--- a/tools/isprelinked/isprelinked.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/* TODO:
-   1. check the ARM EABI version--this works for versions 1 and 2.
-   2. use a more-intelligent approach to finding the symbol table, symbol-string
-      table, and the .dynamic section.
-   3. fix the determination of the host and ELF-file endianness
-   4. write the help screen
-*/
-
-#include <stdio.h>
-#include <common.h>
-#include <debug.h>
-#include <libelf.h>
-#include <libebl.h>
-#ifdef ARM_SPECIFIC_HACKS
-    #include <libebl_arm.h>
-#endif/*ARM_SPECIFIC_HACKS*/
-#include <elf.h>
-#include <gelf.h>
-#include <string.h>
-#include <errno.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <rangesort.h>
-#include <prelink_info.h>
-#include <libgen.h>
-
-
-/* Flag set by --verbose.  This variable is global as it is accessed by the
-   macro INFO() in multiple compilation unites. */
-int verbose_flag = 0;
-/* Flag set by --quiet.  This variable is global as it is accessed by the
-   macro PRINT() in multiple compilation unites. */
-int quiet_flag = 0;
-
-int main(int argc, char **argv) {
-
-    argc--, argv++;
-    if (!argc)
-        return 0;
-
-    /* Check to see whether the ELF library is current. */
-    FAILIF (elf_version(EV_CURRENT) == EV_NONE, "libelf is out of date!\n");
-
-    const char *filename;
-    for (; argc; argc--) {
-        filename = *argv++;
-
-        Elf *elf;
-        GElf_Ehdr elf_hdr;
-        int fd; 
-        int prelinked;
-        long prelink_addr = 0;
-
-        INFO("Processing file [%s]\n", filename);
-
-        fd = open(filename, O_RDONLY);
-        FAILIF(fd < 0, "open(%d): %s (%d).\n", 
-               filename,
-               strerror(errno),
-               errno);
-
-        elf = elf_begin(fd, ELF_C_READ_MMAP_PRIVATE, NULL);
-        FAILIF_LIBELF(elf == NULL, elf_begin);
-
-        FAILIF_LIBELF(0 == gelf_getehdr(elf, &elf_hdr), 
-                      gelf_getehdr);
-
-#ifdef SUPPORT_ANDROID_PRELINK_TAGS
-        prelinked = check_prelinked(filename, elf_hdr.e_ident[EI_DATA] == ELFDATA2LSB, 
-                                    &prelink_addr);
-#else
-        #error 'SUPPORT_ANDROID_PRELINK_TAGS is not defined!'
-#endif
-
-        if (prelinked)
-            PRINT("%s: 0x%08x\n", filename, prelink_addr);
-        else
-            PRINT("%s: not prelinked\n", filename);
-
-        FAILIF_LIBELF(elf_end(elf), elf_end);
-        close(fd);
-    }
-    
-    return 0;
-} 
-
diff --git a/tools/isprelinked/prelink_info.c b/tools/isprelinked/prelink_info.c
deleted file mode 100644
index 21b1519..0000000
--- a/tools/isprelinked/prelink_info.c
+++ /dev/null
@@ -1,71 +0,0 @@
-#ifdef SUPPORT_ANDROID_PRELINK_TAGS
-
-#include <sys/types.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <string.h>
-#include <errno.h>
-
-#include <prelink_info.h>
-#include <debug.h>
-#include <common.h>
-
-typedef struct {
-	long mmap_addr;
-	char tag[4]; /* 'P', 'R', 'E', ' ' */
-} prelink_info_t __attribute__((packed));
-
-static inline void set_prelink(long *prelink_addr, 
-							   int elf_little,
-							   prelink_info_t *info)
-{
-    FAILIF(sizeof(prelink_info_t) != 8, "Unexpected sizeof(prelink_info_t) == %d!\n", sizeof(prelink_info_t));
-	if (prelink_addr) {
-		if (!(elf_little ^ is_host_little())) {
-			/* Same endianness */
-			*prelink_addr = info->mmap_addr;
-		}
-		else {
-			/* Different endianness */
-			*prelink_addr = switch_endianness(info->mmap_addr);
-		}
-	}
-}
-
-int check_prelinked(const char *fname, int elf_little, long *prelink_addr)
-{
-    FAILIF(sizeof(prelink_info_t) != 8, "Unexpected sizeof(prelink_info_t) == %d!\n", sizeof(prelink_info_t));
-	int fd = open(fname, O_RDONLY);
-	FAILIF(fd < 0, "open(%s, O_RDONLY): %s (%d)!\n",
-		   fname, strerror(errno), errno);
-	off_t end = lseek(fd, 0, SEEK_END);
-
-    int nr = sizeof(prelink_info_t);
-
-    off_t sz = lseek(fd, -nr, SEEK_CUR);
-	ASSERT((long)(end - sz) == (long)nr);
-	FAILIF(sz == (off_t)-1, 
-		   "lseek(%d, 0, SEEK_END): %s (%d)!\n", 
-		   fd, strerror(errno), errno);
-
-	prelink_info_t info;
-	int num_read = read(fd, &info, nr);
-	FAILIF(num_read < 0, 
-		   "read(%d, &info, sizeof(prelink_info_t)): %s (%d)!\n",
-		   fd, strerror(errno), errno);
-	FAILIF(num_read != sizeof(info),
-		   "read(%d, &info, sizeof(prelink_info_t)): did not read %d bytes as "
-		   "expected (read %d)!\n",
-		   fd, sizeof(info), num_read);
-
-	int prelinked = 0;
-	if (!strncmp(info.tag, "PRE ", 4)) {
-		set_prelink(prelink_addr, elf_little, &info);
-		prelinked = 1;
-	}
-	FAILIF(close(fd) < 0, "close(%d): %s (%d)!\n", fd, strerror(errno), errno);
-	return prelinked;
-}
-
-#endif /*SUPPORT_ANDROID_PRELINK_TAGS*/
diff --git a/tools/isprelinked/prelink_info.h b/tools/isprelinked/prelink_info.h
deleted file mode 100644
index afc03e9..0000000
--- a/tools/isprelinked/prelink_info.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef PRELINK_INFO_H
-#define PRELINK_INFO_H
-#ifdef SUPPORT_ANDROID_PRELINK_TAGS
-
-int check_prelinked(const char *fname, int elf_little, long *prelink_addr);
-
-#endif
-#endif/*PRELINK_INFO_H*/
diff --git a/tools/lsd/Android.mk b/tools/lsd/Android.mk
deleted file mode 100644
index a224741..0000000
--- a/tools/lsd/Android.mk
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright 2005 The Android Open Source Project
-#
-# Android.mk for lsd 
-#
-
-LOCAL_PATH:= $(call my-dir)
-
-ifeq ($(TARGET_ARCH),arm)
-include $(CLEAR_VARS)
-
-LOCAL_LDLIBS += -ldl
-LOCAL_CFLAGS += -O2 -g 
-LOCAL_CFLAGS += -fno-function-sections -fno-data-sections -fno-inline 
-LOCAL_CFLAGS += -Wall -Wno-unused-function #-Werror
-LOCAL_CFLAGS += -DBIG_ENDIAN=1
-LOCAL_CFLAGS += -DARM_SPECIFIC_HACKS
-LOCAL_CFLAGS += -DSUPPORT_ANDROID_PRELINK_TAGS
-LOCAL_CFLAGS += -DDEBUG
-
-ifeq ($(HOST_OS),windows)
-LOCAL_LDLIBS += -lintl
-endif
-
-LOCAL_SRC_FILES := \
-        cmdline.c \
-        debug.c \
-        hash.c \
-        lsd.c \
-        main.c
-
-LOCAL_C_INCLUDES:= \
-	$(LOCAL_PATH)/ \
-	external/elfutils/lib/ \
-	external/elfutils/libelf/ \
-	external/elfutils/libebl/
-
-LOCAL_STATIC_LIBRARIES := libelf libebl libebl_arm #dl
-
-LOCAL_MODULE := lsd
-
-include $(BUILD_HOST_EXECUTABLE)
-endif #TARGET_ARCH==arm
-
diff --git a/tools/lsd/cmdline.c b/tools/lsd/cmdline.c
deleted file mode 100644
index a3445cd..0000000
--- a/tools/lsd/cmdline.c
+++ /dev/null
@@ -1,130 +0,0 @@
-#include <debug.h>
-#include <cmdline.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <getopt.h>
-#include <string.h>
-#include <ctype.h>
-
-extern char *optarg;
-extern int optind, opterr, optopt;
-
-static struct option long_options[] = {
-	{"verbose", no_argument, 0, 'V'},
-	{"help", no_argument, 0, 'h'},
-	{"print-info", no_argument, 0, 'p'},
-	{"list-needed-libs", no_argument, 0, 'n'},
-	{"lookup",     required_argument, 0, 'L'},
-	{0, 0, 0, 0},
-};
-
-/* This array must parallel long_options[] */
-static const char *descriptions[] = {
-	"print verbose output",
-	"print help screen",
-	"for each file, generate a listing of all dependencies that each symbol "
-	     "satisfies",
-	"print out a list of needed libraries",
-	"provide a directory for library lookup"
-};
-
-void print_help(void)
-{
-    fprintf(stdout, 
-			"invokation:\n"
-			"\tlsd file1 [file2 file3 ... fileN] [-Ldir1 -Ldir2 ... -LdirN] "
-			"[-Vpn]\n"
-			"or\n"
-			"\tlsd -h\n\n");
-	fprintf(stdout, "options:\n");
-	struct option *opt = long_options;
-	const char **desc = descriptions;
-	while (opt->name) {
-		fprintf(stdout, "\t-%c\n"
-						"\t--%-15s: %s\n",
-				opt->val,
-				opt->name,
-				*desc);
-		opt++;
-		desc++;
-	}
-}
-
-int get_options(int argc, char **argv,
-				int *list_needed_libs,
-				int *info,
-                char ***dirs,
-                int *num_dirs,
-                int *verbose)
-{
-    int c;
-
-	ASSERT(list_needed_libs);
-	*list_needed_libs = 0;
-	ASSERT(info);
-	*info = 0;
-    ASSERT(verbose);
-    *verbose = 0;
-    ASSERT(dirs);
-	*dirs = NULL;
-    ASSERT(num_dirs);
-    int size = 0;
-    *num_dirs = 0;
-
-    while (1) {
-        /* getopt_long stores the option index here. */
-        int option_index = 0;
-
-        c = getopt_long (argc, argv, 
-                         "VhpnL:",
-                         long_options, 
-                         &option_index);
-        /* Detect the end of the options. */
-        if (c == -1) break;
-
-        if (isgraph(c)) {
-            INFO ("option -%c with value `%s'\n", c, (optarg ?: "(null)"));
-        }
-
-#define SET_STRING_OPTION(name) do { \
-    ASSERT(optarg);                  \
-    (*name) = strdup(optarg);        \
-} while(0)
-
-        switch (c) {
-        case 0:
-            /* If this option set a flag, do nothing else now. */
-            if (long_options[option_index].flag != 0)
-                break;
-            INFO ("option %s", long_options[option_index].name);
-            if (optarg)
-                INFO (" with arg %s", optarg);
-            INFO ("\n");
-            break;
-        case 'h': print_help(); exit(1); break;
-		case 'V': *verbose = 1; break;
-		case 'p': *info = 1; break;
-		case 'n': *list_needed_libs = 1; break;
-        case 'L': 
-            {
-                if (*num_dirs == size) {
-                    size += 10;
-                    *dirs = (char **)REALLOC(*dirs, size * sizeof(char *));
-                }
-                SET_STRING_OPTION(((*dirs) + *num_dirs));
-                (*num_dirs)++;
-            }
-			break;
-        case '?':
-            /* getopt_long already printed an error message. */
-            break;
-
-#undef SET_STRING_OPTION
-
-        default:
-            FAILIF(1, "Unknown option");
-        }
-    }
-
-    return optind;
-}
diff --git a/tools/lsd/cmdline.h b/tools/lsd/cmdline.h
deleted file mode 100644
index fc3be3e..0000000
--- a/tools/lsd/cmdline.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef CMDLINE_H
-#define CMDLINE_H
-
-void print_help(void);
-
-int get_options(int argc, char **argv,
-				int *list_needed_libs,
-				int *info,
-                char ***dirs,
-                int *num_dirs,
-                int *verbose);
-
-#endif/*CMDLINE_H*/
diff --git a/tools/lsd/common.h b/tools/lsd/common.h
deleted file mode 100644
index 6447b10..0000000
--- a/tools/lsd/common.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef COMMON_H
-#define COMMON_H
-
-#include <libelf.h>
-#include <elf.h>
-
-#define unlikely(expr) __builtin_expect (expr, 0)
-#define likely(expr)   __builtin_expect (expr, 1)
-
-#define MIN(a,b) ((a)<(b)?(a):(b)) /* no side effects in arguments allowed! */
-
-#endif/*COMMON_H*/
diff --git a/tools/lsd/debug.c b/tools/lsd/debug.c
deleted file mode 100644
index 54b18df..0000000
--- a/tools/lsd/debug.c
+++ /dev/null
@@ -1,39 +0,0 @@
-#include <debug.h>
-#include <stdio.h>
-#include <ctype.h>
-
-#define NUM_COLS  (32)
-
-int dump_hex_buffer(FILE *s, void *b, size_t len, size_t elsize)
-{
-    int num_nonprintable = 0;
-    int i, last;
-    char *pchr = (char *)b;
-    fputc('\n', s);
-    for (i = last = 0; i < len; i++) {
-        if (!elsize) {
-            if (i && !(i % 4)) fprintf(s, " ");
-            if (i && !(i % 8)) fprintf(s, " ");
-        }
-        else {
-            if (i && !(i % elsize)) fprintf(s, " ");
-        }
-
-        if (i && !(i % NUM_COLS)) {
-            while (last < i) {
-                if (isprint(pchr[last]))
-                    fputc(pchr[last], s); 
-                else {
-                    fputc('.', s); 
-                    num_nonprintable++;
-                }
-                last++;
-            }
-            fprintf(s, " (%d)\n", i);
-        }
-        fprintf(s, "%02x", (unsigned char)pchr[i]);
-    }
-    if (i && (i % NUM_COLS)) fputs("\n", s);
-    return num_nonprintable;
-}
-
diff --git a/tools/lsd/debug.h b/tools/lsd/debug.h
deleted file mode 100644
index f7842f8..0000000
--- a/tools/lsd/debug.h
+++ /dev/null
@@ -1,93 +0,0 @@
-#ifndef DEBUG_H
-#define DEBUG_H
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <common.h>
-
-#ifdef DEBUG
-
-#define FAILIF(cond, msg...) do {                        \
-	if (unlikely(cond)) {                                \
-        fprintf(stderr, "%s(%d): ", __FILE__, __LINE__); \
-		fprintf(stderr, ##msg);                          \
-		exit(1);                                         \
-	}                                                    \
-} while(0)
-
-/* Debug enabled */
-#define ASSERT(x) do {                                \
-	if (unlikely(!(x))) {                             \
-		fprintf(stderr,                               \
-				"ASSERTION FAILURE %s:%d: [%s]\n",    \
-				__FILE__, __LINE__, #x);              \
-		exit(1);                                      \
-	}                                                 \
-} while(0)
-
-#else
-
-#define FAILIF(cond, msg...) do { \
-	if (unlikely(cond)) {         \
-		fprintf(stderr, ##msg);   \
-		exit(1);                  \
-	}                             \
-} while(0)
-
-/* No debug */
-#define ASSERT(x)   do { } while(0)
-
-#endif/* DEBUG */
-
-#define FAILIF_LIBELF(cond, function) \
-    FAILIF(cond, "%s(): %s\n", #function, elf_errmsg(elf_errno()));
-
-static inline void *MALLOC(unsigned int size) 
-{
-    void *m = malloc(size);
-    FAILIF(NULL == m, "malloc(%d) failed!\n", size);
-    return m;
-}
-
-static inline void *CALLOC(unsigned int num_entries, unsigned int entry_size) 
-{
-    void *m = calloc(num_entries, entry_size);
-    FAILIF(NULL == m, "calloc(%d, %d) failed!\n", num_entries, entry_size);
-    return m;
-}
-
-static inline void *REALLOC(void *ptr, unsigned int size) 
-{
-    void *m = realloc(ptr, size);
-    FAILIF(NULL == m, "realloc(%p, %d) failed!\n", ptr, size);
-    return m;
-}
-
-static inline void FREE(void *ptr)
-{
-    free(ptr);
-}
-
-static inline void FREEIF(void *ptr)
-{
-    if (ptr) FREE(ptr);
-}
-
-#define PRINT(x...)  do {                             \
-    extern int quiet_flag;                            \
-    if(likely(!quiet_flag))                           \
-        fprintf(stdout, ##x);                         \
-} while(0)
-
-#define ERROR(x...) fprintf(stderr, ##x)
-
-#define INFO(x...)  do {                              \
-    extern int verbose_flag;                          \
-    if(unlikely(verbose_flag))                        \
-        fprintf(stdout, ##x);                         \
-} while(0)
-
-/* Prints a hex and ASCII dump of the selected buffer to the selected stream. */
-int dump_hex_buffer(FILE *s, void *b, size_t l, size_t elsize);
-
-#endif/*DEBUG_H*/
diff --git a/tools/lsd/hash.c b/tools/lsd/hash.c
deleted file mode 100644
index bbac675..0000000
--- a/tools/lsd/hash.c
+++ /dev/null
@@ -1,29 +0,0 @@
-#include <common.h>
-#include <debug.h>
-#include <libelf.h>
-#include <hash.h>
-#include <string.h>
-
-int hash_lookup(Elf *elf, 
-                Elf_Data *hash,
-                Elf_Data *symtab,
-                Elf_Data *symstr,
-                const char *symname)
-{
-    Elf32_Word *hash_data = (Elf32_Word *)hash->d_buf;
-    Elf32_Word index;
-    Elf32_Word nbuckets = *hash_data++;
-    Elf32_Word *buckets = ++hash_data;
-    Elf32_Word *chains  = hash_data + nbuckets;
-
-    index = buckets[elf_hash(symname) % nbuckets];
-    while(index != STN_UNDEF &&
-          strcmp((char *)symstr->d_buf + 
-                 ((Elf32_Sym *)symtab->d_buf)[index].st_name,
-                 symname))
-    {
-        index = chains[index];
-    }
-
-    return index;
-}
diff --git a/tools/lsd/hash.h b/tools/lsd/hash.h
deleted file mode 100644
index af29b9e..0000000
--- a/tools/lsd/hash.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#ifndef HASH_H
-#define HASH_H
-
-#include <common.h>
-#include <libelf.h>
-#include <gelf.h>
-
-int hash_lookup(Elf *elf, 
-                Elf_Data *hash,
-                Elf_Data *symtab,
-                Elf_Data *symstr,
-                const char *symname);
-
-#endif/*HASH_H*/
diff --git a/tools/lsd/lsd.c b/tools/lsd/lsd.c
deleted file mode 100644
index 03c235b..0000000
--- a/tools/lsd/lsd.c
+++ /dev/null
@@ -1,777 +0,0 @@
-#include <stdio.h>
-#include <common.h>
-#include <debug.h>
-#include <libelf.h>
-#include <libebl.h>
-#include <elf.h>
-#include <gelf.h>
-#include <string.h>
-#include <errno.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <hash.h>
-#include <lsd.h>
-
-extern int verbose_flag;
-
-typedef struct source_t source_t;
-
-typedef struct {
-    Elf_Scn *scn;
-    GElf_Shdr shdr;
-    Elf_Data *data;
-} section_info_t;
-
-typedef struct next_export_t { 
-    source_t *source;
-    int next_idx;
-} next_export_t;
-
-struct source_t {
-    source_t *next;
-    int visited;
-
-    char *name;  /* full path name of this executable file */
-    /* ELF-related information: */
-    Elf *elf;
-    int elf_fd;
-    GElf_Ehdr elf_hdr;
-    size_t shstrndx;
-    int shnum; /* number of sections */
-
-    section_info_t symtab;
-    section_info_t strtab;
-    section_info_t dynamic;
-    section_info_t hash;
-
-    section_info_t *relocations;
-    int num_relocations; /* number of relocs (<= relocations_size) */
-    int relocations_size; /* sice of array -- NOT number of relocs! */
-
-	/* satisfied_execs: array containing pointers to the libraries or 
-	   executables that this executable satisfies symbol references for. */
-	source_t **satisfied_execs;
-    int num_satisfied_execs;
-    int satisfied_execs_size;
-
-    /* satisfied: array is parallel to symbol table; for each undefined symbol 
-       in that array, we maintain a flag stating whether that symbol has been 
-       satisfied, and if so, by which library.  This applies both to executable
-       files and libraries.
-    */
-    source_t **satisfied;
-
-    /* exports: array is parallel to symbol table; for each global symbol 
-       in that array, we maintain a flag stating whether that symbol satisfies 
-       a dependency in some other file.  num_syms is the length of the exports
-       array, as well as the satisfied array. This applied to libraries only.
-
-       next_exports:  this is a bit tricky.  We use this field to maintain a 
-       linked list of source_t for each global symbol of a shared library. 
-       For a shared library's global symbol at index N has the property that
-       exports[N] is the head of a linked list (threaded through next_export)
-       of all source_t that this symbol resolves a reference to.  For example, 
-       if symbol printf has index 1000 in libc.so, and an executable A and 
-       library L use printf, then the source_t entry corresponding to libc.so
-       will have exports[1000] be a linked list that contains the nodes for 
-       application A and library L.
-    */
-
-    next_export_t *exports;
-    /* num_exported is the number of symbols in this file actually used by
-       somebody else;  it's not the size of the exports array. */
-    int num_exported;
-    next_export_t *next_export;
-    int num_next_export;
-    int next_export_size;
-
-    int num_syms; /* number of symbols in symbol table.  This is the length of
-                     both exports[] and satisfied[] arrays. */
-
-    /* This is an array that contains one element for each library dependency
-       listed in the executable or shared library. */
-    source_t **lib_deps; /* list of library dependencies */
-    int num_lib_deps; /* actual number of library dependencies */
-    int lib_deps_size; /* size of lib_deps array--NOT actual number of deps! */
-
-};
-
-static source_t *sources = NULL;
-
-static char * find_file(const char *libname, 
-                        char **lib_lookup_dirs, 
-                        int num_lib_lookup_dirs);
-
-static inline source_t* find_source(const char *name,
-                                    char **lib_lookup_dirs, 
-                                    int num_lib_lookup_dirs) {
-    source_t *trav = sources;
-	char *full = find_file(name, lib_lookup_dirs, num_lib_lookup_dirs);
-    FAILIF(full == NULL, "Cannot construct full path for file [%s]!\n", name);
-    while (trav) {
-        if (!strcmp(trav->name, full))
-            break;
-        trav = trav->next;
-    }
-	free(full);
-    return trav;
-}
-
-static inline void add_to_sources(source_t *src) {
-    src->next = sources;
-    sources = src;
-}
-
-static source_t* init_source(char *full_path) {
-    source_t *source = (source_t *)CALLOC(1, sizeof(source_t));
-
-    ASSERT(full_path);
-    source->name = full_path;
-    source->elf_fd = -1;
-
-    INFO("Opening %s...\n", full_path);
-    source->elf_fd = open(full_path, O_RDONLY);
-    FAILIF(source->elf_fd < 0, "open(%s): %s (%d)\n", 
-           full_path, 
-           strerror(errno), 
-           errno);
-    INFO("Calling elf_begin(%s)...\n", full_path);
-    source->elf = elf_begin(source->elf_fd, ELF_C_READ, NULL);
-    FAILIF_LIBELF(source->elf == NULL, elf_begin);
-
-    /* libelf can recognize COFF and A.OUT formats, but we handle only ELF. */
-    if (elf_kind(source->elf) != ELF_K_ELF) {
-        ERROR("Input file %s is not in ELF format!\n", full_path);
-        return NULL;
-    }
-
-    /* Make sure this is a shared library or an executable. */
-    {
-        INFO("Making sure %s is a shared library or an executable...\n", 
-             full_path);
-        FAILIF_LIBELF(0 == gelf_getehdr(source->elf, &source->elf_hdr), gelf_getehdr);
-        FAILIF(source->elf_hdr.e_type != ET_DYN && 
-               source->elf_hdr.e_type != ET_EXEC,
-               "%s must be a shared library (elf type is %d, expecting %d).\n", 
-               full_path,
-               source->elf_hdr.e_type, 
-               ET_DYN);
-    }
-
-    /* Get the index of the section-header-strings-table section. */
-    FAILIF_LIBELF(elf_getshstrndx (source->elf, &source->shstrndx) < 0, 
-                  elf_getshstrndx);
-
-    FAILIF_LIBELF(elf_getshnum (source->elf, &source->shnum) < 0, elf_getshnum);
-
-    /* Find various sections. */
-    size_t scnidx;
-    Elf_Scn *scn;
-    GElf_Shdr *shdr, shdr_mem;
-    INFO("Locating %d sections in %s...\n", source->shnum, full_path);
-    for (scnidx = 1; scnidx < source->shnum; scnidx++) {
-        scn = elf_getscn(source->elf, scnidx);
-        FAILIF_LIBELF(NULL == scn, elf_getscn);
-        shdr = gelf_getshdr(scn, &shdr_mem);
-        FAILIF_LIBELF(NULL == shdr, gelf_getshdr);
-        INFO("\tfound section [%s]...\n", elf_strptr(source->elf, source->shstrndx, shdr->sh_name));
-        if (shdr->sh_type == SHT_DYNSYM) {
-            source->symtab.scn = scn;
-            source->symtab.data = elf_getdata(scn, NULL);
-            FAILIF_LIBELF(NULL == source->symtab.data, elf_getdata);
-            memcpy(&source->symtab.shdr, shdr, sizeof(GElf_Shdr));
-
-            /* The sh_link field of the section header of the symbol table
-               contains the index of the associated strings table. */
-            source->strtab.scn = elf_getscn(source->elf, 
-                                            source->symtab.shdr.sh_link);
-            FAILIF_LIBELF(NULL == source->strtab.scn, elf_getscn);
-            FAILIF_LIBELF(NULL == gelf_getshdr(scn, &source->strtab.shdr),
-                          gelf_getshdr);
-            source->strtab.data = elf_getdata(source->strtab.scn, NULL);
-            FAILIF_LIBELF(NULL == source->strtab.data, elf_getdata);
-        }
-        else if (shdr->sh_type == SHT_DYNAMIC) {
-            source->dynamic.scn = scn;
-            source->dynamic.data = elf_getdata(scn, NULL);
-            FAILIF_LIBELF(NULL == source->symtab.data, elf_getdata);
-            memcpy(&source->dynamic.shdr, shdr, sizeof(GElf_Shdr));
-        }
-        else if (shdr->sh_type == SHT_HASH) {
-            source->hash.scn = scn;
-            source->hash.data = elf_getdata(scn, NULL);
-            FAILIF_LIBELF(NULL == source->hash.data, elf_getdata);
-            memcpy(&source->hash.shdr, shdr, sizeof(GElf_Shdr));
-        }
-        else if (shdr->sh_type == SHT_REL || shdr->sh_type == SHT_RELA) {
-            if (source->num_relocations == source->relocations_size) {
-                source->relocations_size += 5;
-                source->relocations = 
-                    (section_info_t *)REALLOC(source->relocations,
-                                              source->relocations_size *
-                                              sizeof(section_info_t));
-            }
-            section_info_t *reloc = 
-                source->relocations + source->num_relocations;
-            reloc->scn = scn;
-            reloc->data = elf_getdata(scn, NULL);
-            FAILIF_LIBELF(NULL == reloc->data, elf_getdata);
-            memcpy(&reloc->shdr, shdr, sizeof(GElf_Shdr));
-            source->num_relocations++;
-        }
-    }
-
-    if (source->dynamic.scn == NULL) {
-        INFO("File [%s] does not have a dynamic section!\n", full_path);
-        return 0;
-    }
-
-    FAILIF(source->symtab.scn == NULL, 
-           "File [%s] does not have a dynamic symbol table!\n",
-           full_path);
-
-    FAILIF(source->hash.scn == NULL, 
-           "File [%s] does not have a hash table!\n",
-           full_path);
-    FAILIF(source->hash.shdr.sh_link != elf_ndxscn(source->symtab.scn),
-           "Hash points to section %d, not to %d as expected!\n",
-           source->hash.shdr.sh_link,
-           elf_ndxscn(scn));
-
-    /* Now, find out how many symbols we have and allocate the array of 
-       satisfied symbols.
-
-       NOTE: We don't count the number of undefined symbols here; we will 
-       iterate over the symbol table later, and count them then, when it is 
-       more convenient. 
-    */
-    size_t symsize = gelf_fsize (source->elf, 
-                                 ELF_T_SYM, 
-                                 1, source->elf_hdr.e_version);
-    ASSERT(symsize);
-
-    source->num_syms = source->symtab.data->d_size / symsize;
-    source->satisfied = (source_t **)CALLOC(source->num_syms, 
-                                            sizeof(source_t *));
-    source->exports = (source_t **)CALLOC(source->num_syms, 
-                                          sizeof(next_export_t));
-
-    source->num_exported = 0;
-    source->satisfied_execs = NULL;
-    source->num_satisfied_execs = 0;
-    source->satisfied_execs_size = 0;
-
-    add_to_sources(source);
-    return source;
-}
-
-static void destroy_source(source_t *source) {
-    FREE(source->satisfied_execs);
-    FREE(source->satisfied);
-    FREE(source->exports);
-    FREE(source->next_export);    
-    FREE(source->lib_deps); /* list of library dependencies */
-    FAILIF_LIBELF(elf_end(source->elf), elf_end);
-    FAILIF(close(source->elf_fd) < 0, "Could not close file %s: %s (%d)!\n", 
-           source->name, strerror(errno), errno);
-    FREE(source->name);
-    FREE(source);
-}
-
-static void print_needed_libs(source_t *source)
-{
-	size_t idx;
-	for (idx = 0; idx < source->num_lib_deps; idx++) {
-		PRINT("%s:%s\n", 
-			  source->name, 
-			  source->lib_deps[idx]->name);
-	}
-}
-
-static int is_symbol_imported(source_t *source,
-                              GElf_Sym *sym, 
-                              size_t symidx)
-{
-    const char *symname = elf_strptr(source->elf,
-                                     elf_ndxscn(source->strtab.scn),
-                                     sym->st_name);
-
-    /* A symbol is imported by an executable or a library if it is undefined
-       and is either global or weak. There is an additional case for 
-       executables that we will check below. */
-    if (sym->st_shndx == SHN_UNDEF &&
-        (GELF_ST_BIND(sym->st_info) == STB_GLOBAL ||
-         GELF_ST_BIND(sym->st_info) == STB_WEAK)) {
-        INFO("*** symbol [%s:%s] is imported (UNDEFIEND).\n",
-             source->name,
-             symname);
-        return 1;
-    }
-
-#ifdef ARM_SPECIFIC_HACKS
-    /* A symbol is imported by an executable if is marked as an undefined 
-       symbol--this is standard to all ELF formats.  Alternatively, according 
-       to the ARM specifications, a symbol in a BSS section that is also marked
-       by an R_ARM_COPY relocation is also imported. */
-
-    if (source->elf_hdr.e_type != ET_EXEC) {
-        INFO("is_symbol_imported(): [%s] is a library, "
-             "no further checks.\n", source->name);
-        return 0;
-    }
-
-    /* Is the symbol in the BSS section, and is there a COPY relocation on 
-       that symbol? */
-    INFO("*** [%s:%s] checking further to see if symbol is imported.\n",
-         source->name, symname);
-    if (sym->st_shndx < source->shnum) {
-        /* Is it the .bss section? */
-        Elf_Scn *scn = elf_getscn(source->elf, sym->st_shndx);
-        FAILIF_LIBELF(NULL == scn, elf_getscn);
-        GElf_Shdr *shdr, shdr_mem;
-        shdr = gelf_getshdr(scn, &shdr_mem);
-        FAILIF_LIBELF(NULL == shdr, gelf_getshdr);
-        if (!strcmp(".bss", elf_strptr(source->elf,
-                                       source->shstrndx,
-                                       shdr->sh_name)))
-        {
-            /* Is there an R_ARM_COPY relocation on this symbol?  Iterate 
-               over the list of relocation sections and scan each section for
-               an entry that matches the symbol. */
-            size_t idx;
-            for (idx = 0; idx < source->num_relocations; idx++) {
-                section_info_t *reloc = source->relocations + idx;
-                /* Does the relocation section refer to the symbol table in
-                   which this symbol resides, and does it relocate the .bss
-                   section? */
-                if (reloc->shdr.sh_link == elf_ndxscn(source->symtab.scn) &&
-                    reloc->shdr.sh_info == sym->st_shndx)
-                {
-                    /* Go over the relocations and see if any of them matches
-                       our symbol. */
-                    size_t nrels = reloc->shdr.sh_size / reloc->shdr.sh_entsize;
-                    size_t relidx, newidx;
-                    if (reloc->shdr.sh_type == SHT_REL) {
-                        for (newidx = relidx = 0; relidx < nrels; ++relidx) {
-                            GElf_Rel rel_mem;
-                            FAILIF_LIBELF(gelf_getrel (reloc->data, 
-                                                       relidx, 
-                                                       &rel_mem) == NULL,
-                                          gelf_getrel);
-                            if (GELF_R_TYPE(rel_mem.r_info) == R_ARM_COPY &&
-                                GELF_R_SYM (rel_mem.r_info) == symidx)
-                            {
-                                INFO("*** symbol [%s:%s] is imported "
-                                     "(DEFINED, REL-COPY-RELOCATED).\n",
-                                     source->name,
-                                     symname);
-                                return 1;
-                            }
-                        } /* for each rel entry... */
-                    } else {
-                        for (newidx = relidx = 0; relidx < nrels; ++relidx) {
-                            GElf_Rela rel_mem;
-                            FAILIF_LIBELF(gelf_getrela (reloc->data, 
-                                                        relidx, 
-                                                        &rel_mem) == NULL,
-                                          gelf_getrela);
-                            if (GELF_R_TYPE(rel_mem.r_info) == R_ARM_COPY &&
-                                GELF_R_SYM (rel_mem.r_info) == symidx)
-                            {
-                                INFO("*** symbol [%s:%s] is imported "
-                                     "(DEFINED, RELA-COPY-RELOCATED).\n",
-                                     source->name,
-                                     symname);
-                                return 1;
-                            }
-                        } /* for each rela entry... */
-                    } /* if rel else rela */
-                }
-            }
-        }
-    }
-#endif/*ARM_SPECIFIC_HACKS*/
-
-    return 0;
-}
-
-static void resolve(source_t *source) {
-    /* Iterate the symbol table.  For each undefined symbol, scan the 
-       list of dependencies till we find a global symbol in one of them that 
-       satisfies the undefined reference.  At this point, we update both the 
-       satisfied[] array of the sources entry, as well as the exports array of 
-       the dependency where we found the match.
-    */
-
-    GElf_Sym *sym, sym_mem;
-    size_t symidx;
-    for (symidx = 0; symidx < source->num_syms; symidx++) {
-        sym = gelf_getsymshndx(source->symtab.data, 
-                               NULL,
-                               symidx,
-                               &sym_mem,
-                               NULL);
-        FAILIF_LIBELF(NULL == sym, gelf_getsymshndx);
-        if (is_symbol_imported(source, sym, symidx)) 
-		{
-            /* This is an undefined symbol.  Go over the list of libraries 
-               and look it up. */
-            size_t libidx;
-			int found = 0;
-			source_t *last_found = NULL;
-			const char *symname = elf_strptr(source->elf,
-											 elf_ndxscn(source->strtab.scn),
-											 sym->st_name);
-            for (libidx = 0; libidx < source->num_lib_deps; libidx++) {
-                source_t *lib = source->lib_deps[libidx];
-                int lib_symidx = hash_lookup(lib->elf,
-                                             lib->hash.data,
-                                             lib->symtab.data,
-                                             lib->strtab.data,
-                                             symname);
-                if (STN_UNDEF != lib_symidx)
-                {
-					/* We found the symbol--now check to see if it is global 
-					   or weak.  If this is the case, then the symbol satisfies
-					   the dependency. */
-					GElf_Sym *lib_sym, lib_sym_mem;
-					lib_sym = gelf_getsymshndx(lib->symtab.data, 
-											   NULL,
-											   lib_symidx,
-											   &lib_sym_mem,
-											   NULL);
-					FAILIF_LIBELF(NULL == lib_sym, gelf_getsymshndx);
-
-					if(lib_sym->st_shndx != STN_UNDEF &&
-					   (GELF_ST_BIND(lib_sym->st_info) == STB_GLOBAL ||
-						GELF_ST_BIND(lib_sym->st_info) == STB_WEAK))
-					{
-						/* We found the symbol! Update the satisfied array at this
-						   index location. */
-						source->satisfied[symidx] = lib;
-						/* Now, link this structure into the linked list 
-						   corresponding to the found symbol in the library's 
-						   global array. */
-                        if (source->num_next_export == source->next_export_size) {
-                            source->next_export_size += 30;
-                            source->next_export = 
-                                (source_t **)REALLOC(source->next_export,
-                                                     source->next_export_size *
-                                                     sizeof(struct next_export_t));
-                        }
-                        source->next_export[source->num_next_export] = lib->exports[lib_symidx];
-                        lib->exports[lib_symidx].source = source;
-                        lib->exports[lib_symidx].next_idx = source->num_next_export;
-
-                        source->num_next_export++;
-                        lib->num_exported++;
-
-                        INFO("[%s:%s (index %d)] satisfied by [%s] (index %d)\n",
-							 source->name,
-							 symname,
-							 symidx,
-							 lib->name,
-							 lib_symidx);
-						if (found) {
-							if (found == 1) {
-								found++;
-								ERROR("ERROR: multiple definitions found for [%s:%s]!\n",
-									  source->name, symname);
-								ERROR("\tthis definition     [%s]\n", lib->name);
-							}
-							ERROR("\tprevious definition [%s]\n", last_found->name);
-						}
-
-						last_found = lib;
-						if (!found) found = 1;
-					}
-                }
-            }
-			if(found == 0) {
-				ERROR("ERROR: could not find match for %s:%s.\n", 
-					  source->name, 
-					  symname);
-			}
-        } /* if we found the symbol... */
-    } /* for each symbol... */
-} /* resolve() */
-
-static void print_used_symbols(source_t *source) {
-
-    int name_len = strlen(source->name);
-    static const char ext[] = ".syms";
-    char *filter = (char *)MALLOC(name_len + sizeof(ext));
-    strcpy(filter, source->name);
-    strcpy(filter + name_len, ext);
-
-    FILE *fp = fopen(filter, "w+");
-    FAILIF(NULL == fp, 
-           "Can't open %s: %s (%d)\n", 
-           filter, 
-           strerror(errno), errno);
-    
-    /* Is anybody using the symbols defined in source? */
-
-    if (source->num_exported > 0) {
-        INFO("[%s] exports %d symbols to %d libraries and executables.\n",
-             source->name,
-             source->num_exported,
-             source->num_satisfied_execs);
-        size_t symidx;
-        for (symidx = 0; symidx < source->num_syms; symidx++) {
-            if (source->exports[symidx].source != NULL) {
-                GElf_Sym *sym, sym_mem;
-                sym = gelf_getsymshndx(source->symtab.data, 
-                                       NULL,
-                                       symidx,
-                                       &sym_mem,
-                                       NULL);
-                FAILIF_LIBELF(NULL == sym, gelf_getsymshndx);
-                fprintf(fp, "%s\n", elf_strptr(source->elf,
-                                               elf_ndxscn(source->strtab.scn),
-                                               sym->st_name));
-            }
-        }
-    }
-    else if (source->num_satisfied_execs > 0) {
-
-        /*  Is the source listed as a depenency on anyone?  If so, then the source exports no symbols
-            to anyone, but someone lists it as a dependency, which is unnecessary, so we print a warning.
-         */
-
-        ERROR("WARNING: [%s] is listed as a dependency in: ", source->name);
-        int i;
-        for (i = 0; i < source->num_satisfied_execs; i++) {
-            ERROR(" [%s],", source->satisfied_execs[i]->name);
-        }
-        ERROR(" but none of its symbols are used!.\n");
-    }
-#if 0 /* This is not really an error--a library's symbols may not be used anyone as specified in the ELF file,
-         but someone may still open a library via dlopen(). 
-      */
-    else {
-        ERROR("WARNING: None of [%s]'s symbols are used by any library or executable!\n", source->name);
-    }
-#endif
-
-	fclose(fp);
-    FREE(filter);
-}
-
-static void print_symbol_references(source_t *source) {
-
-    int name_len = strlen(source->name);
-    static const char ext[] = ".info";
-    char *filter = (char *)MALLOC(name_len + sizeof(ext));
-    strcpy(filter, source->name);
-    strcpy(filter + name_len, ext);
-
-    FILE *fp = fopen(filter, "w+");
-    FAILIF(NULL == fp, 
-           "Can't open %s: %s (%d)\n", 
-           filter, 
-           strerror(errno), errno);
-
-    if (source->num_exported > 0) {
-        size_t symidx;
-        for (symidx = 0; symidx < source->num_syms; symidx++) {
-            if (source->exports[symidx].source != NULL) {
-                const char *symname;
-                GElf_Sym *sym, sym_mem;
-                sym = gelf_getsymshndx(source->symtab.data, 
-                                       NULL,
-                                       symidx,
-                                       &sym_mem,
-                                       NULL);
-                FAILIF_LIBELF(NULL == sym, gelf_getsymshndx);
-                symname = elf_strptr(source->elf, 
-                                     elf_ndxscn(source->strtab.scn),
-                                     sym->st_name);
-                fprintf(fp, "%s\n", symname);
-                next_export_t *export = &source->exports[symidx];
-                while (export->source != NULL) {
-                    //fprintf(stderr, "%s:%s\n", symname, export->source->name);
-                    fprintf(fp, "\t%s\n", export->source->name);
-                    export = &export->source->next_export[export->next_idx];
-                }
-            }
-        }
-    }
-
-	fclose(fp);
-    FREE(filter);
-}
-
-static char * find_file(const char *libname, 
-                        char **lib_lookup_dirs, 
-                        int num_lib_lookup_dirs) {
-    if (libname[0] == '/') {
-        /* This is an absolute path name--just return it. */
-        INFO("ABSOLUTE PATH: [%s].\n", libname);
-        return strdup(libname);
-    } else {
-        /* First try the working directory. */
-        int fd;
-        if ((fd = open(libname, O_RDONLY)) > 0) {
-            close(fd);
-            INFO("FOUND IN CURRENT DIR: [%s].\n", libname);
-            return strdup(libname);
-        } else {
-            /* Iterate over all library paths.  For each path, append the file
-               name and see if there is a file at that place. If that fails, 
-               bail out. */
-
-            char *name;
-            while (num_lib_lookup_dirs--) {
-                size_t lib_len = strlen(*lib_lookup_dirs);
-                /* one extra character for the slash, and another for the 
-                   terminating NULL. */
-                name = (char *)MALLOC(lib_len + strlen(libname) + 2);
-                strcpy(name, *lib_lookup_dirs);
-                name[lib_len] = '/';
-                strcpy(name + lib_len + 1, libname);
-                if ((fd = open(name, O_RDONLY)) > 0) {
-                    close(fd);
-                    INFO("FOUND: [%s] in [%s].\n", libname, name);
-                    return name;
-                }
-                INFO("NOT FOUND: [%s] in [%s].\n", libname, name);
-                free(name);
-            }
-        }
-    }
-    return NULL;
-}
-
-static source_t* process_library(const char *libname,
-                                 char **lib_lookup_dirs, 
-                                 int num_lib_lookup_dirs) {
-    source_t *source = find_source(libname, lib_lookup_dirs, num_lib_lookup_dirs);
-    if (NULL == source) {
-        INFO("Processing [%s].\n", libname);
-        char *full = find_file(libname, lib_lookup_dirs, num_lib_lookup_dirs);
-        FAILIF(NULL == full, 
-               "Could not find [%s] in the current directory or in any of "
-               "the search paths!\n", libname);
-        source = init_source(full);
-        if (source) {
-            GElf_Dyn *dyn, dyn_mem;
-            size_t dynidx;
-            size_t numdyn =
-            source->dynamic.shdr.sh_size / 
-            source->dynamic.shdr.sh_entsize;
-
-            for (dynidx = 0; dynidx < numdyn; dynidx++) {
-                dyn = gelf_getdyn (source->dynamic.data, 
-                                   dynidx, 
-                                   &dyn_mem);
-                FAILIF_LIBELF(NULL == dyn, gelf_getdyn);
-                if (dyn->d_tag == DT_NEEDED) {
-                    /* Process the needed library recursively. */
-                    const char *dep_lib =
-                    elf_strptr (source->elf, 
-                                source->dynamic.shdr.sh_link, 
-                                dyn->d_un.d_val);
-                    INFO("[%s] depends on [%s].\n", libname, dep_lib);
-                    source_t *dep = process_library(dep_lib, 
-                                                    lib_lookup_dirs,
-                                                    num_lib_lookup_dirs);
-
-                    /* Tell dep that source depends on it. */
-                    if (dep->num_satisfied_execs == dep->satisfied_execs_size) {
-                        dep->satisfied_execs_size += 10;
-                        dep->satisfied_execs = 
-                            REALLOC(dep->satisfied_execs,
-                                    dep->satisfied_execs_size *
-                                    sizeof(source_t *));
-                    }
-                    dep->satisfied_execs[dep->num_satisfied_execs++] = source;
-
-                    /* Add the library to the dependency list. */
-                    if (source->num_lib_deps == source->lib_deps_size) {
-                        source->lib_deps_size += 10;
-                        source->lib_deps = REALLOC(source->lib_deps, 
-                                                   source->lib_deps_size *
-                                                   sizeof(source_t *));
-                    }
-                    source->lib_deps[source->num_lib_deps++] = dep;
-                }
-            } /* for each dynamic entry... */
-        }
-    } else INFO("[%s] has been processed already.\n", libname);
-
-    return source;
-}
-
-void lsd(char **execs, int num_execs,
-		 int list_needed_libs,
-		 int print_info,
-         char **lib_lookup_dirs, int num_lib_lookup_dirs) {
-
-    source_t *source; /* for general usage */
-    int input_idx;
-
-    for (input_idx = 0; input_idx < num_execs; input_idx++) {
-        INFO("executable: [%s]\n", execs[input_idx]);
-        /* Here process library is actually processing the top-level executable
-           files. */
-        process_library(execs[input_idx], lib_lookup_dirs, num_lib_lookup_dirs);
-        /* if source is NULL, then the respective executable is static */
-        /* Mark the source as an executable */
-    } /* for each input executable... */
-
-	if (list_needed_libs) {
-		source = sources;
-		while (source) {
-			print_needed_libs(source);
-			source = source->next;
-		}
-	}
-
-    /* Now, for each entry in the sources array, iterate its symbol table.  For
-       each undefined symbol, scan the list of dependencies till we find a 
-       global symbol in one of them that satisfies the undefined reference.  
-       At this point, we update both the satisfied[] array of the sources entry, 
-       as well as the exports array of the dependency where we found the match.
-    */
-
-    source = sources;
-    while (source) {
-        resolve(source);
-        source = source->next;
-    }
-
-    /* We are done!  Since the end result of our calculations is a set of 
-       symbols for each library that other libraries or executables link 
-       against, we iterate over the set of libraries one last time, and for
-       each symbol that is marked as satisfying some dependence, we emit 
-       a line with the symbol's name to a text file derived from the library's
-       name by appending the suffix .syms to it. */
-
-    source = sources;
-    while (source) {
-        /* If it's a library, print the results. */
-        if (source->elf_hdr.e_type == ET_DYN) {
-			print_used_symbols(source);
-			if (print_info) 
-				print_symbol_references(source);
-		}
-        source = source->next;
-    }
-
-	/* Free the resources--you can't do it in the loop above because function 
-	   print_symbol_references() accesses nodes other than the one being 
-	   iterated over.
-	 */
-	source = sources;
-	while (source) {
-		source_t *old = source;
-		source = source->next;
-		/* Destroy the evidence. */
-		destroy_source(old);
-	}
-}
-
diff --git a/tools/lsd/lsd.h b/tools/lsd/lsd.h
deleted file mode 100644
index 883c423..0000000
--- a/tools/lsd/lsd.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef LSD_H
-#define LSD_H
-
-void lsd(char **execs, int num_execs,
-		 int list_needed_libs,
-		 int print_info,
-         char **lib_lookup_dirs, 
-         int num_lib_lookup_dirs);
-
-#endif
diff --git a/tools/lsd/main.c b/tools/lsd/main.c
deleted file mode 100644
index f29157a..0000000
--- a/tools/lsd/main.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/* TODO:
-   1. check the ARM EABI version--this works for versions 1 and 2.
-   2. use a more-intelligent approach to finding the symbol table, symbol-string
-      table, and the .dynamic section.
-   3. fix the determination of the host and ELF-file endianness
-   4. write the help screen
-*/
-
-#include <stdio.h>
-#include <common.h>
-#include <debug.h>
-#include <libelf.h>
-#include <elf.h>
-#include <gelf.h>
-#include <cmdline.h>
-#include <string.h>
-#include <errno.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <lsd.h>
-
-/* Flag set by --verbose.  This variable is global as it is accessed by the
-   macro INFO() in multiple compilation unites. */
-int verbose_flag = 0;
-/* Flag set by --quiet.  This variable is global as it is accessed by the
-   macro PRINT() in multiple compilation unites. */
-int quiet_flag = 0;
-
-int main(int argc, char **argv)
-{
-    char **lookup_dirs = NULL;
-    int num_lookup_dirs;
-	int print_info;
-	int list_needed_libs;
-
-    /* Do not issue INFO() statements before you call get_options() to set 
-       the verbose flag as necessary.
-    */
-
-    int first = get_options(argc, argv,
-							&list_needed_libs,
-							&print_info,
-                            &lookup_dirs,
-                            &num_lookup_dirs,
-                            &verbose_flag);
-
-    if (first == argc) {
-        print_help();
-        FAILIF(1,  "You must specify at least one input ELF file!\n");
-    }
-
-    /* Check to see whether the ELF library is current. */
-    FAILIF (elf_version(EV_CURRENT) == EV_NONE, "libelf is out of date!\n");
-
-    /* List symbol dependencies... */
-    lsd(&argv[first], argc - first, 
-		list_needed_libs, print_info, 
-		lookup_dirs, num_lookup_dirs);
-
-    FREE(lookup_dirs);
-
-    return 0;
-} 
-
diff --git a/tools/post_process_props.py b/tools/post_process_props.py
new file mode 100755
index 0000000..01f9128
--- /dev/null
+++ b/tools/post_process_props.py
@@ -0,0 +1,82 @@
+#!/usr/bin/env python
+#
+# Copyright (C) 2009 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import sys
+
+# Put the modifications that you need to make into the /system/build.prop into this
+# function. The prop object has get(name) and put(name,value) methods.
+def mangle_build_prop(prop):
+  pass
+
+
+# Put the modifications that you need to make into the /system/build.prop into this
+# function. The prop object has get(name) and put(name,value) methods.
+def mangle_default_prop(prop):
+  # If ro.debuggable is 1, then enable adb on USB by default
+  # (this is for userdebug builds)
+  if prop.get("ro.debuggable") == "1":
+    val = prop.get("persist.sys.usb.config")
+    if val == "":
+      val = "adb"
+    else:
+      val = val + ",adb"
+    prop.put("persist.sys.usb.config", val)
+
+
+class PropFile:
+  def __init__(self, lines):
+    self.lines = [s[:-1] for s in lines]
+
+  def get(self, name):
+    key = name + "="
+    for line in self.lines:
+      if line.startswith(key):
+        return line[len(key):]
+    return ""
+
+  def put(self, name, value):
+    key = name + "="
+    for i in range(0,len(self.lines)):
+      if self.lines[i].startswith(key):
+        self.lines[i] = key + value
+        return
+    self.lines.append(key + value)
+
+  def write(self, f):
+    f.write("\n".join(self.lines))
+    f.write("\n")
+
+def main(argv):
+  filename = argv[1]
+  f = open(filename)
+  lines = f.readlines()
+  f.close()
+
+  properties = PropFile(lines)
+  if filename.endswith("/build.prop"):
+    mangle_build_prop(properties)
+  elif filename.endswith("/default.prop"):
+    mangle_default_prop(properties)
+  else:
+    sys.stderr.write("bad command line: " + str(argv) + "\n")
+    sys.exit(1)
+
+  f = open(filename, 'w+')
+  properties.write(f)
+  f.close()
+
+if __name__ == "__main__":
+  main(sys.argv)
diff --git a/tools/releasetools/edify_generator.py b/tools/releasetools/edify_generator.py
index 6c53f9e..d7b924b 100644
--- a/tools/releasetools/edify_generator.py
+++ b/tools/releasetools/edify_generator.py
@@ -200,9 +200,8 @@
       args = {'device': p.device, 'fn': fn}
       if partition_type == "MTD":
         self.script.append(
-            ('assert(package_extract_file("%(fn)s", "/tmp/%(device)s.img"),\n'
-             '       write_raw_image("/tmp/%(device)s.img", "%(device)s"),\n'
-             '       delete("/tmp/%(device)s.img"));') % args)
+            'write_raw_image(package_extract_file("%(fn)s"), "%(device)s");'
+            % args)
       elif partition_type == "EMMC":
         self.script.append(
             'package_extract_file("%(fn)s", "%(device)s");' % args)
diff --git a/tools/soslim/Android.mk b/tools/soslim/Android.mk
deleted file mode 100644
index 60a860a..0000000
--- a/tools/soslim/Android.mk
+++ /dev/null
@@ -1,49 +0,0 @@
-# Copyright 2005 The Android Open Source Project
-#
-# Android.mk for soslim
-#
-
-LOCAL_PATH:= $(call my-dir)
-
-ifeq ($(TARGET_ARCH),arm)
-include $(CLEAR_VARS)
-
-LOCAL_LDLIBS += -ldl
-LOCAL_CFLAGS += -O2 -g
-LOCAL_CFLAGS += -fno-function-sections -fno-data-sections -fno-inline
-LOCAL_CFLAGS += -Wall -Wno-unused-function #-Werror
-LOCAL_CFLAGS += -DBIG_ENDIAN=1
-LOCAL_CFLAGS += -DARM_SPECIFIC_HACKS
-LOCAL_CFLAGS += -DSUPPORT_ANDROID_PRELINK_TAGS
-LOCAL_CFLAGS += -DDEBUG
-LOCAL_CFLAGS += -DSTRIP_STATIC_SYMBOLS
-LOCAL_CFLAGS += -DMOVE_SECTIONS_IN_RANGES
-
-ifeq ($(HOST_OS),windows)
-# Cygwin stat does not support ACCESSPERMS bitmask
-LOCAL_CFLAGS += -DACCESSPERMS=0777
-LOCAL_LDLIBS += -lintl
-endif
-
-LOCAL_SRC_FILES := \
-        cmdline.c \
-        common.c \
-        debug.c \
-        soslim.c \
-        main.c \
-        prelink_info.c \
-        symfilter.c
-
-LOCAL_C_INCLUDES:= \
-	$(LOCAL_PATH)/ \
-	external/elfutils/lib/ \
-	external/elfutils/libelf/ \
-	external/elfutils/libebl/ \
-	external/elfcopy/
-
-LOCAL_STATIC_LIBRARIES := libelfcopy libelf libebl libebl_arm #dl
-
-LOCAL_MODULE := soslim
-
-include $(BUILD_HOST_EXECUTABLE)
-endif #TARGET_ARCH==arm
diff --git a/tools/soslim/cmdline.c b/tools/soslim/cmdline.c
deleted file mode 100644
index c2d5e71..0000000
--- a/tools/soslim/cmdline.c
+++ /dev/null
@@ -1,141 +0,0 @@
-#include <debug.h>
-#include <cmdline.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <getopt.h>
-#include <string.h>
-#include <ctype.h>
-
-extern char *optarg;
-extern int optind, opterr, optopt;
-
-static struct option long_options[] =
-{
-    {"verbose",  no_argument,       0, 'V'},
-    {"quiet",    no_argument,       0, 'Q'},
-    {"shady",    no_argument,       0, 'S'},
-    {"print",    no_argument,       0, 'p'},
-    {"help",     no_argument,       0, 'h'},
-    {"outfile",  required_argument, 0, 'o'},
-    {"filter",   required_argument, 0, 'f'},
-    {"dry",      no_argument,       0, 'n'},
-    {"strip",    no_argument,       0, 's'},
-    {0, 0, 0, 0},
-};
-
-/* This array must parallel long_options[] */
-static
-const char *descriptions[sizeof(long_options)/sizeof(long_options[0])] = {
-	"print verbose output",
-    "suppress errors and warnings",
-    "patch ABS symbols whose values coincide with section starts and ends",
-    "print the symbol table (if specified, only -V is allowed)",
-    "this help screen",
-    "specify an output file (if not provided, input file is modified)",
-    "specify a symbol-filter file",
-    "dry run (perform all calculations but do not modify the ELF file)",
-    "strip debug sections, if they are present"
-};
-
-void print_help(void)
-{
-    fprintf(stdout,
-			"invokation:\n"
-			"\tsoslim file1 [file2 file3 ... fileN] [-Ldir1 -Ldir2 ... -LdirN] "
-			"[-Vpn]\n"
-			"or\n"
-			"\tsoslim -h\n\n");
-	fprintf(stdout, "options:\n");
-	struct option *opt = long_options;
-	const char **desc = descriptions;
-	while (opt->name) {
-		fprintf(stdout, "\t-%c/--%-15s %s\n",
-				opt->val,
-				opt->name,
-				*desc);
-		opt++;
-		desc++;
-	}
-}
-
-int get_options(int argc, char **argv,
-                char **outfile,
-                char **symsfile,
-                int *print_symtab,
-                int *verbose,
-                int *quiet,
-                int *shady,
-                int *dry_run,
-                int *strip_debug)
-{
-    int c;
-
-    ASSERT(outfile);
-    *outfile = NULL;
-    ASSERT(symsfile);
-    *symsfile = NULL;
-    ASSERT(print_symtab);
-    *print_symtab = 0;
-    ASSERT(verbose);
-    *verbose = 0;
-    ASSERT(quiet);
-    *quiet = 0;
-    ASSERT(shady);
-    *shady = 0;
-    ASSERT(dry_run);
-    *dry_run = 0;
-    ASSERT(strip_debug);
-    *strip_debug = 0;
-
-    while (1) {
-        /* getopt_long stores the option index here. */
-        int option_index = 0;
-
-        c = getopt_long (argc, argv,
-                         "QVSphi:o:y:Y:f:ns",
-                         long_options,
-                         &option_index);
-        /* Detect the end of the options. */
-        if (c == -1) break;
-
-        if (isgraph(c)) {
-            INFO ("option -%c with value `%s'\n", c, (optarg ?: "(null)"));
-        }
-
-#define SET_STRING_OPTION(name) do { \
-    ASSERT(optarg);                  \
-    *name = strdup(optarg);          \
-} while(0)
-
-        switch (c) {
-        case 0:
-            /* If this option set a flag, do nothing else now. */
-            if (long_options[option_index].flag != 0)
-                break;
-            INFO ("option %s", long_options[option_index].name);
-            if (optarg)
-                INFO (" with arg %s", optarg);
-            INFO ("\n");
-            break;
-        case 'p': *print_symtab = 1; break;
-        case 'h': print_help(); exit(1); break;
-        case 'V': *verbose = 1; break;
-        case 'Q': *quiet = 1; break;
-        case 'S': *shady = 1; break;
-        case 'n': *dry_run = 1; break;
-        case 's': *strip_debug = 1; break;
-        case 'o': SET_STRING_OPTION(outfile); break;
-        case 'f': SET_STRING_OPTION(symsfile); break;
-        case '?':
-            /* getopt_long already printed an error message. */
-            break;
-
-#undef SET_STRING_OPTION
-
-        default:
-            FAILIF(1, "Unknown option");
-        }
-    }
-
-    return optind;
-}
diff --git a/tools/soslim/cmdline.h b/tools/soslim/cmdline.h
deleted file mode 100644
index bfc431e..0000000
--- a/tools/soslim/cmdline.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifndef CMDLINE_H
-#define CMDLINE_H
-
-void print_help(void);
-
-int get_options(int argc, char **argv,
-                char **outfile,
-                char **symsfile,
-                int *print_symtab,
-                int *verbose,
-                int *quiet,
-                int *shady,
-                int *dry_run,
-                int *strip_debug);
-
-#endif/*CMDLINE_H*/
diff --git a/tools/soslim/common.c b/tools/soslim/common.c
deleted file mode 100644
index b90cf41..0000000
--- a/tools/soslim/common.c
+++ /dev/null
@@ -1,35 +0,0 @@
-#include <stdlib.h>
-#include <common.h>
-#include <debug.h>
-
-void map_over_sections(Elf *elf, 
-                       section_match_fn_t match,
-                       void *user_data)
-{
-    Elf_Scn* section = NULL;
-    while ((section = elf_nextscn(elf, section)) != NULL) {
-        if (match(elf, section, user_data))
-            return;
-    }
-}   
-
-void map_over_segments(Elf *elf, 
-                       segment_match_fn_t match, 
-                       void *user_data)
-{
-    Elf32_Ehdr *ehdr; 
-    Elf32_Phdr *phdr; 
-    int index;
-
-    ehdr = elf32_getehdr(elf);
-    phdr = elf32_getphdr(elf);
-
-    INFO("Scanning over %d program segments...\n", 
-         ehdr->e_phnum);
-
-    for (index = ehdr->e_phnum; index; index--) {
-        if (match(elf, phdr++, user_data))
-            return;
-    }
-}
-
diff --git a/tools/soslim/common.h b/tools/soslim/common.h
deleted file mode 100644
index dacf930..0000000
--- a/tools/soslim/common.h
+++ /dev/null
@@ -1,49 +0,0 @@
-#ifndef COMMON_H
-#define COMMON_H
-
-#include <libelf.h>
-#include <elf.h>
-
-#define unlikely(expr) __builtin_expect (expr, 0)
-#define likely(expr)   __builtin_expect (expr, 1)
-
-#define MIN(a,b) ((a)<(b)?(a):(b)) /* no side effects in arguments allowed! */
-
-typedef int (*section_match_fn_t)(Elf *, Elf_Scn *, void *);
-void map_over_sections(Elf *, section_match_fn_t, void *);
-
-typedef int (*segment_match_fn_t)(Elf *, Elf32_Phdr *, void *);
-void map_over_segments(Elf *, segment_match_fn_t, void *);
-
-typedef struct {
-    Elf_Scn *sect;
-    Elf32_Shdr *hdr;
-    Elf_Data *data;
-    size_t index;
-} section_info_t;
-
-static inline void get_section_info(Elf_Scn *sect, section_info_t *info)
-{
-    info->sect = sect;
-    info->data = elf_getdata(sect, 0);
-    info->hdr = elf32_getshdr(sect);
-    info->index = elf_ndxscn(sect);
-}
-
-static inline int is_host_little(void)
-{
-    short val = 0x10;
-    return ((char *)&val)[0] != 0;
-}
-
-static inline long switch_endianness(long val)
-{
-	long newval;
-	((char *)&newval)[3] = ((char *)&val)[0];
-	((char *)&newval)[2] = ((char *)&val)[1];
-	((char *)&newval)[1] = ((char *)&val)[2];
-	((char *)&newval)[0] = ((char *)&val)[3];
-	return newval;
-}
-
-#endif/*COMMON_H*/
diff --git a/tools/soslim/debug.c b/tools/soslim/debug.c
deleted file mode 100644
index b8365af..0000000
--- a/tools/soslim/debug.c
+++ /dev/null
@@ -1,40 +0,0 @@
-#include <debug.h>
-#include <stdio.h>
-#include <ctype.h>
-
-#if 0
-
-#define NUM_COLS  (32)
-
-int dump_hex_buffer(FILE *s, void *b, size_t len, size_t elsize) {
-    int num_nonprintable = 0;
-    int i, last;
-    char *pchr = (char *)b;
-    fputc('\n', s);
-    for (i = last = 0; i < len; i++) {
-        if (!elsize) {
-            if (i && !(i % 4)) fprintf(s, " ");
-            if (i && !(i % 8)) fprintf(s, " ");
-        } else {
-            if (i && !(i % elsize)) fprintf(s, " ");
-        }
-
-        if (i && !(i % NUM_COLS)) {
-            while (last < i) {
-                if (isprint(pchr[last]))
-                    fputc(pchr[last], s);
-                else {
-                    fputc('.', s);
-                    num_nonprintable++;
-                }
-                last++;
-            }
-            fprintf(s, " (%d)\n", i);
-        }
-        fprintf(s, "%02x", (unsigned char)pchr[i]);
-    }
-    if (i && (i % NUM_COLS)) fputs("\n", s);
-    return num_nonprintable;
-}
-
-#endif
diff --git a/tools/soslim/debug.h b/tools/soslim/debug.h
deleted file mode 100644
index e7a2f9a..0000000
--- a/tools/soslim/debug.h
+++ /dev/null
@@ -1,88 +0,0 @@
-#ifndef DEBUG_H
-#define DEBUG_H
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <common.h>
-
-#ifdef DEBUG
-
-    #define FAILIF(cond, msg...) do {                        \
-	if (unlikely(cond)) {                                \
-        fprintf(stderr, "%s(%d): ", __FILE__, __LINE__); \
-		fprintf(stderr, ##msg);                          \
-		exit(1);                                         \
-	}                                                    \
-} while(0)
-
-/* Debug enabled */
-    #define ASSERT(x) do {                                \
-	if (unlikely(!(x))) {                             \
-		fprintf(stderr,                               \
-				"ASSERTION FAILURE %s:%d: [%s]\n",    \
-				__FILE__, __LINE__, #x);              \
-		exit(1);                                      \
-	}                                                 \
-} while(0)
-
-#else
-
-    #define FAILIF(cond, msg...) do { \
-	if (unlikely(cond)) {         \
-		fprintf(stderr, ##msg);   \
-		exit(1);                  \
-	}                             \
-} while(0)
-
-/* No debug */
-    #define ASSERT(x)   do { } while(0)
-
-#endif/* DEBUG */
-
-#define FAILIF_LIBELF(cond, function) \
-    FAILIF(cond, "%s(): %s\n", #function, elf_errmsg(elf_errno()));
-
-static inline void *MALLOC(unsigned int size) {
-    void *m = malloc(size);
-    FAILIF(NULL == m, "malloc(%d) failed!\n", size);
-    return m;
-}
-
-static inline void *CALLOC(unsigned int num_entries, unsigned int entry_size) {
-    void *m = calloc(num_entries, entry_size);
-    FAILIF(NULL == m, "calloc(%d, %d) failed!\n", num_entries, entry_size);
-    return m;
-}
-
-static inline void *REALLOC(void *ptr, unsigned int size) {
-    void *m = realloc(ptr, size);
-    FAILIF(NULL == m, "realloc(%p, %d) failed!\n", ptr, size);
-    return m;
-}
-
-static inline void FREE(void *ptr) {
-    free(ptr);
-}
-
-static inline void FREEIF(void *ptr) {
-    if (ptr) FREE(ptr);
-}
-
-#define PRINT(x...)  do {                             \
-    extern int quiet_flag;                            \
-    if(likely(!quiet_flag))                           \
-        fprintf(stdout, ##x);                         \
-} while(0)
-
-#define ERROR(x...) fprintf(stderr, ##x)
-
-#define INFO(x...)  do {                              \
-    extern int verbose_flag;                          \
-    if(unlikely(verbose_flag))                        \
-        fprintf(stdout, ##x);                         \
-} while(0)
-
-/* Prints a hex and ASCII dump of the selected buffer to the selected stream. */
-int dump_hex_buffer(FILE *s, void *b, size_t l, size_t elsize);
-
-#endif/*DEBUG_H*/
diff --git a/tools/soslim/main.c b/tools/soslim/main.c
deleted file mode 100644
index df48484..0000000
--- a/tools/soslim/main.c
+++ /dev/null
@@ -1,374 +0,0 @@
-/* TODO:
-   1. check the ARM EABI version--this works for versions 1 and 2.
-   2. use a more-intelligent approach to finding the symbol table, symbol-string
-      table, and the .dynamic section.
-   3. fix the determination of the host and ELF-file endianness
-   4. write the help screen
-*/
-
-#include <stdio.h>
-#include <common.h>
-#include <debug.h>
-#include <hash.h>
-#include <libelf.h>
-#include <elf.h>
-#include <gelf.h>
-#include <cmdline.h>
-#include <string.h>
-#include <errno.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <soslim.h>
-#include <symfilter.h>
-#ifdef SUPPORT_ANDROID_PRELINK_TAGS
-#include <prelink_info.h>
-#endif
-
-/* Flag set by --verbose.  This variable is global as it is accessed by the
-   macro INFO() in multiple compilation unites. */
-int verbose_flag = 0;
-/* Flag set by --quiet.  This variable is global as it is accessed by the
-   macro PRINT() in multiple compilation unites. */
-int quiet_flag = 0;
-static void print_dynamic_symbols(Elf *elf, const char *symtab_name);
-
-int main(int argc, char **argv)
-{
-    int elf_fd = -1, newelf_fd = -1;
-    Elf *elf = NULL, *newelf = NULL;
-    char *infile = NULL;
-    char *outfile = NULL;
-    char *symsfile_name = NULL;
-    int print_symtab = 0;
-    int shady = 0;
-    int dry_run = 0;
-    int strip_debug = 0;
-
-    /* Do not issue INFO() statements before you call get_options() to set
-       the verbose flag as necessary.
-    */
-
-    int first = get_options(argc, argv,
-                            &outfile,
-                            &symsfile_name,
-                            &print_symtab,
-                            &verbose_flag,
-                            &quiet_flag,
-                            &shady,
-                            &dry_run,
-                            &strip_debug);
-
-    if ((print_symtab && (first == argc)) ||
-        (!print_symtab && first + 1 != argc)) {
-        print_help();
-        FAILIF(1,  "You must specify an input ELF file!\n");
-    }
-    FAILIF(print_symtab && (outfile || symsfile_name || shady),
-           "You cannot provide --print and --outfile, --filter options, or "
-           "--shady simultaneously!\n");
-    FAILIF(dry_run && outfile,
-           "You cannot have a dry run and output a file at the same time.");
-
-    /* Check to see whether the ELF library is current. */
-    FAILIF (elf_version(EV_CURRENT) == EV_NONE, "libelf is out of date!\n");
-
-    if (print_symtab) {
-
-        while (first < argc) {
-            infile = argv[first++];
-
-            INFO("Opening %s...\n", infile);
-            elf_fd = open(infile, O_RDONLY);
-            FAILIF(elf_fd < 0, "open(%s): %s (%d)\n",
-                   infile,
-                   strerror(errno),
-                   errno);
-            INFO("Calling elf_begin(%s)...\n", infile);
-            elf = elf_begin(elf_fd, ELF_C_READ, NULL);
-            FAILIF_LIBELF(elf == NULL, elf_begin);
-
-            /* libelf can recognize COFF and A.OUT formats, but we handle only
-               ELF. */
-            FAILIF(elf_kind(elf) != ELF_K_ELF,
-                   "Input file %s is not in ELF format!\n",
-                   infile);
-
-            /* Make sure this is a shared library or an executable. */
-            {
-                GElf_Ehdr elf_hdr;
-                INFO("Making sure %s is a shared library or an executable.\n",
-                     infile);
-                FAILIF_LIBELF(0 == gelf_getehdr(elf, &elf_hdr), gelf_getehdr);
-                FAILIF(elf_hdr.e_type != ET_DYN &&
-                       elf_hdr.e_type != ET_EXEC,
-                       "%s must be a shared library or an executable "
-                       "(elf type is %d).\n",
-                       infile,
-                       elf_hdr.e_type);
-            }
-
-            print_dynamic_symbols(elf, infile);
-
-            FAILIF_LIBELF(elf_end(elf), elf_end);
-            FAILIF(close(elf_fd) < 0, "Could not close file %s: %s (%d)!\n",
-                   infile, strerror(errno), errno);
-        }
-    }
-    else {
-        int elf_fd = -1;
-        Elf *elf = NULL;
-        infile = argv[first];
-
-        INFO("Opening %s...\n", infile);
-        elf_fd = open(infile, ((outfile == NULL && dry_run == 0) ? O_RDWR : O_RDONLY));
-        FAILIF(elf_fd < 0, "open(%s): %s (%d)\n",
-               infile,
-               strerror(errno),
-               errno);
-        INFO("Calling elf_begin(%s)...\n", infile);
-        elf = elf_begin(elf_fd,
-                        ((outfile == NULL && dry_run == 0) ? ELF_C_RDWR : ELF_C_READ),
-                        NULL);
-        FAILIF_LIBELF(elf == NULL, elf_begin);
-
-        /* libelf can recognize COFF and A.OUT formats, but we handle only ELF. */
-        FAILIF(elf_kind(elf) != ELF_K_ELF,
-               "Input file %s is not in ELF format!\n",
-               infile);
-
-        /* We run a better check in adjust_elf() itself.  It is permissible to call adjust_elf()
-           on an executable if we are only stripping sections from the executable, not rearranging
-           or moving sections.
-        */
-        if (0) {
-            /* Make sure this is a shared library. */
-            GElf_Ehdr elf_hdr;
-            INFO("Making sure %s is a shared library...\n", infile);
-            FAILIF_LIBELF(0 == gelf_getehdr(elf, &elf_hdr), gelf_getehdr);
-            FAILIF(elf_hdr.e_type != ET_DYN,
-                   "%s must be a shared library (elf type is %d, expecting %d).\n",
-                   infile,
-                   elf_hdr.e_type,
-                   ET_DYN);
-        }
-
-        if (outfile != NULL) {
-            ASSERT(!dry_run);
-            struct stat st;
-            FAILIF(fstat (elf_fd, &st) != 0,
-                   "Cannot stat input file %s: %s (%d)!\n",
-                   infile, strerror(errno), errno);
-            newelf_fd = open (outfile, O_RDWR | O_CREAT | O_TRUNC,
-                    st.st_mode & ACCESSPERMS);
-            FAILIF(newelf_fd < 0, "Cannot create file %s: %s (%d)!\n",
-                   outfile, strerror(errno), errno);
-            INFO("Output file is [%s].\n", outfile);
-            newelf = elf_begin(newelf_fd, ELF_C_WRITE_MMAP, NULL);
-        } else {
-            INFO("Modifying [%s] in-place.\n", infile);
-            newelf = elf_clone(elf, ELF_C_EMPTY);
-        }
-
-        symfilter_t symfilter;
-
-        symfilter.symbols_to_keep = NULL;
-        symfilter.num_symbols_to_keep = 0;
-        if (symsfile_name) {
-            /* Make sure that the file is not empty. */
-            struct stat s;
-            FAILIF(stat(symsfile_name, &s) < 0,
-                   "Cannot stat file %s.\n", symsfile_name);
-            if (s.st_size) {
-                INFO("Building symbol filter.\n");
-                build_symfilter(symsfile_name, elf, &symfilter, s.st_size);
-            }
-            else INFO("Not building symbol filter, filter file is empty.\n");
-        }
-#ifdef SUPPORT_ANDROID_PRELINK_TAGS
-        int prelinked = 0, retouched = 0;
-        int elf_little; /* valid if prelinked != 0 */
-        long prelink_addr; /* valid if prelinked != 0 */
-#define RETOUCH_MAX_SIZE 600000
-        /* _cnt valid if retouched != 0 */
-        unsigned int retouch_byte_cnt = RETOUCH_MAX_SIZE;
-        char retouch_buf[RETOUCH_MAX_SIZE]; /* valid if retouched != 0 */
-#endif
-        clone_elf(elf, newelf,
-                  infile, outfile,
-                  symfilter.symbols_to_keep,
-                  symfilter.num_symbols_to_keep,
-                  shady
-#ifdef SUPPORT_ANDROID_PRELINK_TAGS
-                  , &prelinked,
-                  &elf_little,
-                  &prelink_addr,
-                  &retouched,
-                  &retouch_byte_cnt,
-                  retouch_buf
-#endif
-                  ,
-                  true, /* rebuild the section-header-strings table */
-                  strip_debug,
-                  dry_run);
-
-        if (symsfile_name && symfilter.symbols_to_keep != NULL) {
-            destroy_symfilter(&symfilter);
-        }
-
-        if (outfile != NULL) INFO("Closing %s...\n", outfile);
-        FAILIF_LIBELF(elf_end (newelf) != 0, elf_end);
-        FAILIF(newelf_fd >= 0 && close(newelf_fd) < 0,
-               "Could not close file %s: %s (%d)!\n",
-               outfile, strerror(errno), errno);
-
-        INFO("Closing %s...\n", infile);
-        FAILIF_LIBELF(elf_end(elf), elf_end);
-        FAILIF(close(elf_fd) < 0, "Could not close file %s: %s (%d)!\n",
-               infile, strerror(errno), errno);
-
-#ifdef SUPPORT_ANDROID_PRELINK_TAGS
-        if (retouched) {
-            INFO("File has retouch data, putting it back in place.\n");
-            retouch_dump(outfile != NULL ? outfile : infile,
-                         elf_little,
-                         retouch_byte_cnt,
-                         retouch_buf);
-        }
-        if (prelinked) {
-            INFO("File is prelinked, putting prelink TAG back in place.\n");
-            setup_prelink_info(outfile != NULL ? outfile : infile,
-                               elf_little,
-                               prelink_addr);
-        }
-#endif
-    }
-
-    FREEIF(outfile);
-    return 0;
-}
-
-static void print_dynamic_symbols(Elf *elf, const char *file)
-{
-    Elf_Scn *scn = NULL;
-    GElf_Shdr shdr;
-
-    GElf_Ehdr ehdr;
-    FAILIF_LIBELF(0 == gelf_getehdr(elf, &ehdr), gelf_getehdr);
-    while ((scn = elf_nextscn (elf, scn)) != NULL) {
-        FAILIF_LIBELF(NULL == gelf_getshdr(scn, &shdr), gelf_getshdr);
-        if (SHT_DYNSYM == shdr.sh_type) {
-            /* This failure is too restrictive.  There is no reason why
-               the symbol table couldn't be called something else, but
-               there is a standard name, and chances are that if we don't
-               see it, there's something wrong.
-            */
-            size_t shstrndx;
-            FAILIF_LIBELF(elf_getshstrndx(elf, &shstrndx) < 0,
-                          elf_getshstrndx);
-            /* Now print the symbols. */
-            {
-                Elf_Data *symdata;
-                size_t elsize;
-                symdata = elf_getdata (scn, NULL); /* get the symbol data */
-                FAILIF_LIBELF(NULL == symdata, elf_getdata);
-                /* Get the number of section.  We need to compare agains this
-                   value for symbols that have special info in their section
-                   references */
-                size_t shnum;
-                FAILIF_LIBELF(elf_getshnum (elf, &shnum) < 0, elf_getshnum);
-                /* Retrieve the size of a symbol entry */
-                elsize = gelf_fsize(elf, ELF_T_SYM, 1, ehdr.e_version);
-
-                size_t index;
-                for (index = 0; index < symdata->d_size / elsize; index++) {
-                    GElf_Sym sym_mem;
-                    GElf_Sym *sym;
-                    /* Get the symbol. */
-                    sym = gelf_getsymshndx (symdata, NULL,
-                                            index, &sym_mem, NULL);
-                    FAILIF_LIBELF(sym == NULL, gelf_getsymshndx);
-                    /* Print the symbol. */
-                    char bind = '?';
-                    switch(ELF32_ST_BIND(sym->st_info))
-                    {
-                    case STB_LOCAL: bind = 'l'; break;
-                    case STB_GLOBAL: bind = 'g'; break;
-                    case STB_WEAK: bind = 'w'; break;
-                    default: break;
-                    }
-                    char type = '?';
-                    switch(ELF32_ST_TYPE(sym->st_info))
-                    {
-                    case STT_NOTYPE: /* Symbol type is unspecified */
-                        type = '?';
-                        break;
-                    case STT_OBJECT: /* Symbol is a data object */
-                        type = 'o';
-                        break;
-                    case STT_FUNC: /* Symbol is a code object */
-                        type = 'f';
-                        break;
-                    case STT_SECTION:/* Symbol associated with a section */
-                        type = 's';
-                        break;
-                    case STT_FILE: /* Symbol's name is file name */
-                        type = 'f';
-                        break;
-                    case STT_COMMON: /* Symbol is a common data object */
-                        type = 'c';
-                        break;
-                    case STT_TLS: /* Symbol is thread-local data object*/
-                        type = 't';
-                        break;
-                    }
-                    {
-                        int till_lineno;
-                        int lineno;
-                        const char *section_name = "(unknown)";
-                        FAILIF(sym->st_shndx == SHN_XINDEX,
-                               "Can't handle symbol's st_shndx == SHN_XINDEX!\n");
-                        if (sym->st_shndx != SHN_UNDEF &&
-                            sym->st_shndx < shnum) {
-                            Elf_Scn *symscn = elf_getscn(elf, sym->st_shndx);
-                            FAILIF_LIBELF(NULL == symscn, elf_getscn);
-                            GElf_Shdr symscn_shdr;
-                            FAILIF_LIBELF(NULL == gelf_getshdr(symscn,
-                                                               &symscn_shdr),
-                                          gelf_getshdr);
-                            section_name = elf_strptr(elf, shstrndx,
-                                                      symscn_shdr.sh_name);
-                        }
-                        else if (sym->st_shndx == SHN_ABS) {
-                            section_name = "SHN_ABS";
-                        }
-                        else if (sym->st_shndx == SHN_COMMON) {
-                            section_name = "SHN_COMMON";
-                        }
-                        else if (sym->st_shndx == SHN_UNDEF) {
-                            section_name = "(undefined)";
-                        }
-                        /* value size binding type section symname */
-                        PRINT("%-15s %8zd: %08llx %08llx %c%c %5d %n%s%n",
-                              file,
-                              index,
-                              sym->st_value, sym->st_size, bind, type,
-                              sym->st_shndx,
-                              &till_lineno,
-                              section_name,
-                              &lineno);
-                        lineno -= till_lineno;
-                        /* Create padding for section names of 15 chars.
-                           This limit is somewhat arbitratry. */
-                        while (lineno++ < 15) PRINT(" ");
-                        PRINT("(%d) %s\n",
-                              sym->st_name,
-                              elf_strptr(elf, shdr.sh_link, sym->st_name));
-                    }
-                }
-            }
-        } /* if (shdr.sh_type = SHT_DYNSYM) */
-    } /* while ((scn = elf_nextscn (elf, scn)) != NULL) */
-}
diff --git a/tools/soslim/prelink_info.c b/tools/soslim/prelink_info.c
deleted file mode 100644
index 2600ac7..0000000
--- a/tools/soslim/prelink_info.c
+++ /dev/null
@@ -1,204 +0,0 @@
-#ifdef SUPPORT_ANDROID_PRELINK_TAGS
-
-#include <sys/types.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <string.h>
-#include <errno.h>
-
-#include <prelink_info.h>
-#include <debug.h>
-#include <common.h>
-
-#define RETOUCH_SUFFIX_SIZE 12
-typedef struct {
-	uint32_t mmap_addr;
-	char tag[4]; /* 'P', 'R', 'E', ' ' */
-} __attribute__((packed)) prelink_info_t;
-
-static inline void set_prelink(long *prelink_addr, 
-							   int elf_little,
-							   prelink_info_t *info)
-{
-    FAILIF(sizeof(prelink_info_t) != 8, "Unexpected sizeof(prelink_info_t) == %zd!\n", sizeof(prelink_info_t));
-	if (prelink_addr) {
-		if (!(elf_little ^ is_host_little())) {
-			/* Same endianness */
-			*prelink_addr = info->mmap_addr;
-		}
-		else {
-			/* Different endianness */
-                        *prelink_addr = switch_endianness(info->mmap_addr);
-		}
-	}
-}
-
-int check_prelinked(const char *fname, int elf_little, long *prelink_addr)
-{
-    FAILIF(sizeof(prelink_info_t) != 8, "Unexpected sizeof(prelink_info_t) == %zd!\n", sizeof(prelink_info_t));
-	int fd = open(fname, O_RDONLY);
-	FAILIF(fd < 0, "open(%s, O_RDONLY): %s (%d)!\n",
-		   fname, strerror(errno), errno);
-	off_t end = lseek(fd, 0, SEEK_END);
-#ifndef DEBUG
-	(void)end;
-#endif
-
-    int nr = sizeof(prelink_info_t);
-
-    off_t sz = lseek(fd, -nr, SEEK_CUR);
-	ASSERT((long)(end - sz) == (long)nr);
-	FAILIF(sz == (off_t)-1, 
-		   "lseek(%d, 0, SEEK_END): %s (%d)!\n", 
-		   fd, strerror(errno), errno);
-
-	prelink_info_t info;
-	ssize_t num_read = read(fd, &info, nr);
-	FAILIF(num_read < 0, 
-		   "read(%d, &info, sizeof(prelink_info_t)): %s (%d)!\n",
-		   fd, strerror(errno), errno);
-	FAILIF((size_t)num_read != sizeof(info),
-		   "read(%d, &info, sizeof(prelink_info_t)): did not read %zd bytes as "
-		   "expected (read %zd)!\n",
-		   fd, sizeof(info), (size_t)num_read);
-
-	int prelinked = 0;
-	if (!strncmp(info.tag, "PRE ", 4)) {
-		set_prelink(prelink_addr, elf_little, &info);
-		prelinked = 1;
-	}
-	FAILIF(close(fd) < 0,
-               "close(%d): %s (%d)!\n", fd, strerror(errno), errno);
-	return prelinked;
-}
-
-int check_retouched(const char *fname, int elf_little,
-                    unsigned int *retouch_byte_cnt, char *retouch_buf) {
-    FAILIF(sizeof(prelink_info_t) != 8,
-           "Unexpected sizeof(prelink_info_t) == %d!\n",
-           sizeof(prelink_info_t));
-    int fd = open(fname, O_RDONLY);
-    FAILIF(fd < 0, "open(%s, O_RDONLY): %s (%d)!\n",
-           fname, strerror(errno), errno);
-    off_t end = lseek(fd, 0, SEEK_END);
-    int nr = sizeof(prelink_info_t);
-    off_t sz = lseek(fd, -nr-RETOUCH_SUFFIX_SIZE, SEEK_CUR);
-    ASSERT((long)(end - sz) == (long)(nr+RETOUCH_SUFFIX_SIZE));
-    FAILIF(sz == (off_t)-1,
-           "lseek(%d, 0, SEEK_END): %s (%d)!\n",
-           fd, strerror(errno), errno);
-
-    char retouch_meta[RETOUCH_SUFFIX_SIZE];
-    int num_read = read(fd, &retouch_meta, RETOUCH_SUFFIX_SIZE);
-    FAILIF(num_read < 0,
-           "read(%d, &info, sizeof(prelink_info_t)): %s (%d)!\n",
-           fd, strerror(errno), errno);
-    FAILIF(num_read != RETOUCH_SUFFIX_SIZE,
-           "read(%d, &info, sizeof(prelink_info_t)): did not read %d bytes as "
-           "expected (read %d)!\n",
-           fd, RETOUCH_SUFFIX_SIZE, num_read);
-
-    int retouched = 0;
-    if (!strncmp(retouch_meta, "RETOUCH ", 8)) {
-        unsigned int retouch_byte_cnt_meta;
-        if (!(elf_little ^ is_host_little()))
-            retouch_byte_cnt_meta = *(unsigned int *)(retouch_meta+8);
-        else
-            retouch_byte_cnt_meta =
-              switch_endianness(*(unsigned int *)(retouch_meta+8));
-        FAILIF(*retouch_byte_cnt < retouch_byte_cnt_meta,
-               "Retouch buffer too small at %d bytes (%d needed).",
-               *retouch_byte_cnt, retouch_byte_cnt_meta);
-        *retouch_byte_cnt = retouch_byte_cnt_meta;
-        off_t sz = lseek(fd,
-                         -((long)*retouch_byte_cnt)-RETOUCH_SUFFIX_SIZE-nr,
-                         SEEK_END);
-        ASSERT((long)(end - sz) ==
-               (long)(*retouch_byte_cnt+RETOUCH_SUFFIX_SIZE+nr));
-        FAILIF(sz == (off_t)-1,
-               "lseek(%d, 0, SEEK_END): %s (%d)!\n",
-               fd, strerror(errno), errno);
-        num_read = read(fd, retouch_buf, *retouch_byte_cnt);
-        FAILIF(num_read < 0,
-               "read(%d, &info, sizeof(prelink_info_t)): %s (%d)!\n",
-               fd, strerror(errno), errno);
-        FAILIF(num_read != *retouch_byte_cnt,
-               "read(%d, retouch_buf, %u): did not read %d bytes as "
-               "expected (read %d)!\n",
-               fd, *retouch_byte_cnt, *retouch_byte_cnt, num_read);
-
-        retouched = 1;
-    }
-    FAILIF(close(fd) < 0, "close(%d): %s (%d)!\n", fd, strerror(errno), errno);
-    return retouched;
-}
-
-void retouch_dump(const char *fname, int elf_little,
-                  unsigned int retouch_byte_cnt, char *retouch_buf) {
-    int fd = open(fname, O_WRONLY);
-    FAILIF(fd < 0,
-           "open(%s, O_WRONLY): %s (%d)\n",
-           fname, strerror(errno), errno);
-    off_t sz = lseek(fd, 0, SEEK_END);
-    FAILIF(sz == (off_t)-1,
-           "lseek(%d, 0, SEEK_END): %s (%d)!\n",
-           fd, strerror(errno), errno);
-
-    // The retouch blob ends with "RETOUCH XXXX", where XXXX is the 4-byte
-    // size of the retouch blob, in target endianness.
-    strncpy(retouch_buf+retouch_byte_cnt, "RETOUCH ", 8);
-    if (elf_little ^ is_host_little()) {
-        *(unsigned int *)(retouch_buf+retouch_byte_cnt+8) =
-          switch_endianness(retouch_byte_cnt);
-    } else {
-        *(unsigned int *)(retouch_buf+retouch_byte_cnt+8) =
-          retouch_byte_cnt;
-    }
-
-    int num_written = write(fd, retouch_buf, retouch_byte_cnt+12);
-    FAILIF(num_written < 0,
-           "write(%d, &info, sizeof(info)): %s (%d)\n",
-           fd, strerror(errno), errno);
-    FAILIF((retouch_byte_cnt+12) != num_written,
-           "Could not write %d bytes as expected (wrote %d bytes instead)!\n",
-           retouch_byte_cnt, num_written);
-    FAILIF(close(fd) < 0, "close(%d): %s (%d)!\n", fd, strerror(errno), errno);
-}
-
-void setup_prelink_info(const char *fname, int elf_little, long base)
-{
-    FAILIF(sizeof(prelink_info_t) != 8, "Unexpected sizeof(prelink_info_t) == %zd!\n", sizeof(prelink_info_t));
-    int fd = open(fname, O_WRONLY);
-    FAILIF(fd < 0, 
-           "open(%s, O_WRONLY): %s (%d)\n" ,
-           fname, strerror(errno), errno);
-    prelink_info_t info;
-    off_t sz = lseek(fd, 0, SEEK_END);
-    FAILIF(sz == (off_t)-1, 
-           "lseek(%d, 0, SEEK_END): %s (%d)!\n", 
-           fd, strerror(errno), errno);
-
-    if (!(elf_little ^ is_host_little())) {
-        /* Same endianness */
-        INFO("Host and ELF file [%s] have same endianness.\n", fname);
-        info.mmap_addr = base;
-    }
-    else {
-        /* Different endianness */
-        INFO("Host and ELF file [%s] have different endianness.\n", fname);
-        info.mmap_addr = switch_endianness(base);
-    }
-    strncpy(info.tag, "PRE ", 4);
-
-    ssize_t num_written = write(fd, &info, sizeof(info));
-    FAILIF(num_written < 0, 
-           "write(%d, &info, sizeof(info)): %s (%d)\n",
-           fd, strerror(errno), errno);
-    FAILIF(sizeof(info) != (size_t)num_written,
-           "Could not write %zd bytes (wrote only %zd bytes) as expected!\n",
-           sizeof(info), (size_t)num_written);
-    FAILIF(close(fd) < 0, "close(%d): %s (%d)!\n", fd, strerror(errno), errno);
-}
-
-#endif /*SUPPORT_ANDROID_PRELINK_TAGS*/
diff --git a/tools/soslim/prelink_info.h b/tools/soslim/prelink_info.h
deleted file mode 100644
index efa84fd..0000000
--- a/tools/soslim/prelink_info.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef PRELINK_INFO_H
-#define PRELINK_INFO_H
-#ifdef SUPPORT_ANDROID_PRELINK_TAGS
-
-int check_prelinked(const char *fname, int elf_little, long *prelink_addr);
-int check_retouched(const char *fname, int elf_little,
-                    unsigned int *retouch_byte_cnt, char *retouch_buf);
-void retouch_dump(const char *fname, int elf_little,
-                  unsigned int retouch_byte_cnt, char *retouch_buf);
-void setup_prelink_info(const char *fname, int elf_little, long base);
-
-#endif
-#endif/*PRELINK_INFO_H*/
diff --git a/tools/soslim/soslim.c b/tools/soslim/soslim.c
deleted file mode 100644
index 33b1ee7..0000000
--- a/tools/soslim/soslim.c
+++ /dev/null
@@ -1,536 +0,0 @@
-#include <stdio.h>
-//#include <common.h>
-#include <debug.h>
-#include <libelf.h>
-#include <libebl.h>
-#include <libebl_arm.h>
-#include <elf.h>
-#include <gelf.h>
-#include <string.h>
-#include <errno.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#ifdef SUPPORT_ANDROID_PRELINK_TAGS
-#include <prelink_info.h>
-#endif
-
-#include <elfcopy.h>
-
-void clone_elf(Elf *elf, Elf *newelf,
-               const char *elf_name,
-               const char *newelf_name,
-               bool *sym_filter, int num_symbols,
-               int shady
-#ifdef SUPPORT_ANDROID_PRELINK_TAGS
-               , int *prelinked,
-               int *elf_little,
-               long *prelink_addr,
-               int *retouched,
-               unsigned int *retouch_byte_cnt,
-               char *retouch_buf
-#endif
-               , bool rebuild_shstrtab,
-               bool strip_debug,
-               bool dry_run)
-{
-	GElf_Ehdr ehdr_mem, *ehdr; /* store ELF header of original library */
-	size_t shstrndx; /* section-strings-section index */
-	size_t shnum; /* number of sections in the original file */
-	/* string table for section headers in new file */
-	struct Ebl_Strtab *shst = NULL;
-    int dynamic_idx = -1; /* index in shdr_info[] of .dynamic section */
-    int dynsym_idx = -1; /* index in shdr_info[] of dynamic symbol table
-                            section */
-
-    unsigned int cnt;	  /* general-purpose counter */
-    /* This flag is true when at least one section is dropped or when the
-       relative order of sections has changed, so that section indices in
-       the resulting file will be different from those in the original. */
-    bool sections_dropped_or_rearranged;
-	Elf_Scn *scn; /* general-purpose section */
-	size_t idx;	  /* general-purporse section index */
-
-	shdr_info_t *shdr_info = NULL;
-    unsigned int shdr_info_len = 0;
-    GElf_Phdr *phdr_info = NULL;
-
-	/* Get the information from the old file. */
-	ehdr = gelf_getehdr (elf, &ehdr_mem);
-	FAILIF_LIBELF(NULL == ehdr, gelf_getehdr);
-
-	/* Create new program header for the elf file */
-	FAILIF(gelf_newehdr (newelf, gelf_getclass (elf)) == 0 ||
-		   (ehdr->e_type != ET_REL && gelf_newphdr (newelf,
-													ehdr->e_phnum) == 0),
-		   "Cannot create new file: %s", elf_errmsg (-1));
-
-#ifdef SUPPORT_ANDROID_PRELINK_TAGS
-    ASSERT(prelinked);
-    ASSERT(prelink_addr);
-    ASSERT(elf_little);
-    *elf_little = (ehdr->e_ident[EI_DATA] == ELFDATA2LSB);
-    *prelinked = check_prelinked(elf_name, *elf_little, prelink_addr);
-    ASSERT(retouched);
-    ASSERT(retouch_byte_cnt);
-    ASSERT(retouch_buf);
-    *retouched = check_retouched(elf_name, *elf_little,
-                                 retouch_byte_cnt, retouch_buf);
-#endif
-
-    INFO("\n\nCALCULATING MODIFICATIONS\n\n");
-
-	/* Copy out the old program header: notice that if the ELF file does not
-	   have a program header, this loop won't execute.
-	*/
-	INFO("Copying ELF program header...\n");
-    phdr_info = (GElf_Phdr *)CALLOC(ehdr->e_phnum, sizeof(GElf_Phdr));
-	for (cnt = 0; cnt < ehdr->e_phnum; ++cnt) {
-		INFO("\tRetrieving entry %d\n", cnt);
-		FAILIF_LIBELF(NULL == gelf_getphdr(elf, cnt, phdr_info + cnt),
-                      gelf_getphdr);
-        /* -- we update the header at the end
-        FAILIF_LIBELF(gelf_update_phdr (newelf, cnt, phdr_info + cnt) == 0,
-                      gelf_update_phdr);
-        */
-	}
-
-    /* Get the section-header strings section.  This section contains the
-	   strings used to name the other sections. */
-	FAILIF_LIBELF(elf_getshstrndx(elf, &shstrndx) < 0, elf_getshstrndx);
-
-	/* Get the number of sections. */
-	FAILIF_LIBELF(elf_getshnum (elf, &shnum) < 0, elf_getshnum);
-	INFO("Original ELF file has %zd sections.\n", shnum);
-
-	/* Allocate the section-header-info buffer.  We allocate one more entry
-       for the section-strings section because we regenerate that one and
-       place it at the very end of the file.  Note that just because we create
-       an extra entry in the shdr_info array, it does not mean that we create
-       one more section the header.  We just mark the old section for removal
-       and create one as the last section.
-    */
-	INFO("Allocating section-header info structure (%zd) bytes...\n",
-		 shnum*sizeof (shdr_info_t));
-    shdr_info_len = rebuild_shstrtab ? shnum + 1 : shnum;
-	shdr_info = (shdr_info_t *)CALLOC(shdr_info_len, sizeof (shdr_info_t));
-
-	/* Iterate over all the sections and initialize the internal section-info
-	   array...
-	*/
-	INFO("Initializing section-header info structure...\n");
-	/* Gather information about the sections in this file. */
-	scn = NULL;
-	cnt = 1;
-	while ((scn = elf_nextscn (elf, scn)) != NULL) {
-		ASSERT(elf_ndxscn(scn) == cnt);
-		shdr_info[cnt].scn = scn;
-		FAILIF_LIBELF(NULL == gelf_getshdr(scn, &shdr_info[cnt].shdr),
-					  gelf_getshdr);
-
-		/* Get the name of the section. */
-		shdr_info[cnt].name = elf_strptr (elf, shstrndx,
-										  shdr_info[cnt].shdr.sh_name);
-
-		INFO("\tname: %s\n", shdr_info[cnt].name);
-		FAILIF(shdr_info[cnt].name == NULL,
-			   "Malformed file: section %d name is null\n",
-			   cnt);
-
-		/* Mark them as present but not yet investigated.  By "investigating"
-		   sections, we mean that we check to see if by stripping other
-		   sections, the sections under investigation will be compromised.  For
-		   example, if we are removing a section of code, then we want to make
-		   sure that the symbol table does not contain symbols that refer to
-		   this code, so we investigate the symbol table.  If we do find such
-		   symbols, we will not strip the code section.
-		*/
-		shdr_info[cnt].idx = 1;
-
-		/* Remember the shdr.sh_link value.  We need to remember this value
-		   for those sections that refer to other sections.  For example,
-		   we need to remember it for relocation-entry sections, because if
-		   we modify the symbol table that a relocation-entry section is
-		   relative to, then we need to patch the relocation section.  By the
-		   time we get to deciding whether we need to patch the relocation
-		   section, we will have overwritten its header's sh_link field with
-		   a new value.
-		*/
-		shdr_info[cnt].old_shdr = shdr_info[cnt].shdr;
-        INFO("\t\toriginal sh_link: %08d\n", shdr_info[cnt].old_shdr.sh_link);
-        INFO("\t\toriginal sh_addr: %lld\n", shdr_info[cnt].old_shdr.sh_addr);
-        INFO("\t\toriginal sh_offset: %lld\n",
-             shdr_info[cnt].old_shdr.sh_offset);
-        INFO("\t\toriginal sh_size: %lld\n", shdr_info[cnt].old_shdr.sh_size);
-
-        if (shdr_info[cnt].shdr.sh_type == SHT_DYNAMIC) {
-            INFO("\t\tthis is the SHT_DYNAMIC section [%s] at index %d\n",
-                 shdr_info[cnt].name,
-                 cnt);
-            dynamic_idx = cnt;
-        }
-        else if (shdr_info[cnt].shdr.sh_type == SHT_DYNSYM) {
-            INFO("\t\tthis is the SHT_DYNSYM section [%s] at index %d\n",
-                 shdr_info[cnt].name,
-                 cnt);
-            dynsym_idx = cnt;
-        }
-
-		FAILIF(shdr_info[cnt].shdr.sh_type == SHT_SYMTAB_SHNDX,
-			   "Cannot handle sh_type SHT_SYMTAB_SHNDX!\n");
-		FAILIF(shdr_info[cnt].shdr.sh_type == SHT_GROUP,
-			   "Cannot handle sh_type SHT_GROUP!\n");
-		FAILIF(shdr_info[cnt].shdr.sh_type == SHT_GNU_versym,
-			   "Cannot handle sh_type SHT_GNU_versym!\n");
-
-		/* Increment the counter. */
-		++cnt;
-	} /* while */
-
-	/* Get the EBL handling. */
-	Ebl *ebl = ebl_openbackend (elf);
-	FAILIF_LIBELF(NULL == ebl, ebl_openbackend);
-    FAILIF_LIBELF(0 != arm_init(elf, ehdr->e_machine, ebl, sizeof(Ebl)),
-                  arm_init);
-
-    if (strip_debug) {
-
-      /* This will actually strip more than just sections.  It will strip
-         anything not essential to running the image.
-      */
-
-      INFO("Finding debug sections to strip.\n");
-
-      /* Now determine which sections can go away.  The general rule is that
-         all sections which are not used at runtime are stripped out.  But
-         there are a few exceptions:
-
-         - special sections named ".comment" and ".note" are kept
-         - OS or architecture specific sections are kept since we might not
-		 know how to handle them
-         - if a section is referred to from a section which is not removed
-		 in the sh_link or sh_info element it cannot be removed either
-      */
-      for (cnt = 1; cnt < shnum; ++cnt) {
-		/* Check whether the section can be removed.  */
-		if (SECTION_STRIP_P (ebl, elf, ehdr, &shdr_info[cnt].shdr,
-							 shdr_info[cnt].name,
-							 1,	 /* remove .comment sections */
-							 1	 /* remove all debug sections */) ||
-            /* The macro above is broken--check for .comment explicitly */
-            !strcmp(".comment", shdr_info[cnt].name)
-#ifdef ARM_SPECIFIC_HACKS
-            ||
-            /* We ignore this section, that's why we can remove it. */
-            !strcmp(".stack", shdr_info[cnt].name)
-#endif
-            )
-        {
-          /* For now assume this section will be removed.  */
-          INFO("Section [%s] will be stripped from image.\n",
-               shdr_info[cnt].name);
-          shdr_info[cnt].idx = 0;
-		}
-#ifdef STRIP_STATIC_SYMBOLS
-		else if (shdr_info[cnt].shdr.sh_type == SHT_SYMTAB) {
-          /* Mark the static symbol table for removal */
-          INFO("Section [%s] (static symbol table) will be stripped from image.\n",
-               shdr_info[cnt].name);
-          shdr_info[cnt].idx = 0;
-          if (shdr_info[shdr_info[cnt].shdr.sh_link].shdr.sh_type ==
-              SHT_STRTAB)
-          {
-            /* Mark the symbol table's string table for removal. */
-            INFO("Section [%s] (static symbol-string table) will be stripped from image.\n",
-                 shdr_info[shdr_info[cnt].shdr.sh_link].name);
-            shdr_info[shdr_info[cnt].shdr.sh_link].idx = 0;
-          }
-          else {
-            ERROR("Expecting the sh_link field of a symbol table to point to"
-                  " associated symbol-strings table!  This is not mandated by"
-                  " the standard, but is a common practice and the only way "
-                  " to know for sure which strings table corresponds to which"
-                  " symbol table!\n");
-          }
-		}
-#endif
-      }
-
-      /* Mark the SHT_NULL section as handled. */
-      shdr_info[0].idx = 2;
-
-      /* Handle exceptions: section groups and cross-references.  We might have
-         to repeat this a few times since the resetting of the flag might
-         propagate.
-      */
-      int exceptions_pass = 0;
-      bool changes;
-      do {
-        changes = false;
-		INFO("\nHandling exceptions, pass %d\n\n", exceptions_pass++);
-		for (cnt = 1; cnt < shnum; ++cnt) {
-          if (shdr_info[cnt].idx == 0) {
-            /* If a relocation section is marked as being removed but the
-               section it is relocating is not, then do not remove the
-               relocation section.
-            */
-            if ((shdr_info[cnt].shdr.sh_type == SHT_REL
-                 || shdr_info[cnt].shdr.sh_type == SHT_RELA)
-                && shdr_info[shdr_info[cnt].shdr.sh_info].idx != 0) {
-              PRINT("\tSection [%s] will not be removed because the "
-                    "section it is relocating (%s) stays.\n",
-                    shdr_info[cnt].name,
-                    shdr_info[shdr_info[cnt].shdr.sh_info].name);
-            }
-          }
-          if (shdr_info[cnt].idx == 1) {
-            INFO("Processing section [%s]...\n", shdr_info[cnt].name);
-
-            /* The content of symbol tables we don't remove must not
-               reference any section which we do remove.  Otherwise
-               we cannot remove the referred section.
-            */
-            if (shdr_info[cnt].shdr.sh_type == SHT_DYNSYM ||
-                shdr_info[cnt].shdr.sh_type == SHT_SYMTAB)
-            {
-              Elf_Data *symdata;
-              size_t elsize;
-
-              INFO("\tSection [%s] is a symbol table that's not being"
-                   " removed.\n\tChecking to make sure that no symbols"
-                   " refer to sections that are being removed.\n",
-                   shdr_info[cnt].name);
-
-              /* Make sure the data is loaded.  */
-              symdata = elf_getdata (shdr_info[cnt].scn, NULL);
-              FAILIF_LIBELF(NULL == symdata, elf_getdata);
-
-              /* Go through all symbols and make sure the section they
-                 reference is not removed.  */
-              elsize = gelf_fsize (elf, ELF_T_SYM, 1, ehdr->e_version);
-
-              /* Check the length of the dynamic-symbol filter. */
-              FAILIF(sym_filter != NULL &&
-                     (size_t)num_symbols != symdata->d_size / elsize,
-                     "Length of dynsym filter (%d) must equal the number"
-                     " of dynamic symbols (%zd)!\n",
-                     num_symbols,
-                     symdata->d_size / elsize);
-
-              size_t inner;
-              for (inner = 0;
-                   inner < symdata->d_size / elsize;
-                   ++inner)
-              {
-                GElf_Sym sym_mem;
-                GElf_Sym *sym;
-                size_t scnidx;
-
-                sym = gelf_getsymshndx (symdata, NULL,
-                                        inner, &sym_mem, NULL);
-                FAILIF_LIBELF(sym == NULL, gelf_getsymshndx);
-
-                scnidx = sym->st_shndx;
-                FAILIF(scnidx == SHN_XINDEX,
-                       "Can't handle SHN_XINDEX!\n");
-                if (scnidx == SHN_UNDEF ||
-                    scnidx >= shnum ||
-                    (scnidx >= SHN_LORESERVE &&
-                     scnidx <= SHN_HIRESERVE) ||
-                    GELF_ST_TYPE (sym->st_info) == STT_SECTION)
-                {
-                  continue;
-                }
-
-                /* If the symbol is going to be thrown and it is a
-                   global or weak symbol that is defined (not imported),
-                   then continue.  Since the symbol is going away, we
-                   do not care  whether it refers to a section that is
-                   also going away.
-                */
-                if (sym_filter && !sym_filter[inner])
-                {
-                  bool global_or_weak =
-                      ELF32_ST_BIND(sym->st_info) == STB_GLOBAL ||
-                      ELF32_ST_BIND(sym->st_info) == STB_WEAK;
-                  if (!global_or_weak && sym->st_shndx != SHN_UNDEF)
-                    continue;
-                }
-
-                /* -- far too much output
-                   INFO("\t\t\tSymbol [%s] (%d)\n",
-                   elf_strptr(elf,
-                   shdr_info[cnt].shdr.sh_link,
-                   sym->st_name),
-                   shdr_info[cnt].shdr.sh_info);
-                */
-
-                if (shdr_info[scnidx].idx == 0)
-                {
-                  PRINT("\t\t\tSymbol [%s] refers to section [%s], "
-                        "which is being removed.  Will keep that "
-                        "section.\n",
-                        elf_strptr(elf,
-                                   shdr_info[cnt].shdr.sh_link,
-                                   sym->st_name),
-                        shdr_info[scnidx].name);
-                  /* Mark this section as used.  */
-                  shdr_info[scnidx].idx = 1;
-                  changes |= scnidx < cnt;
-                }
-              } /* for each symbol */
-            } /* section type is SHT_DYNSYM or SHT_SYMTAB */
-            /* Cross referencing happens:
-			   - for the cases the ELF specification says.  That are
-			   + SHT_DYNAMIC in sh_link to string table
-			   + SHT_HASH in sh_link to symbol table
-			   + SHT_REL and SHT_RELA in sh_link to symbol table
-			   + SHT_SYMTAB and SHT_DYNSYM in sh_link to string table
-			   + SHT_GROUP in sh_link to symbol table
-			   + SHT_SYMTAB_SHNDX in sh_link to symbol table
-			   Other (OS or architecture-specific) sections might as
-			   well use this field so we process it unconditionally.
-			   - references inside section groups
-			   - specially marked references in sh_info if the SHF_INFO_LINK
-			   flag is set
-            */
-
-            if (shdr_info[shdr_info[cnt].shdr.sh_link].idx == 0) {
-              shdr_info[shdr_info[cnt].shdr.sh_link].idx = 1;
-              changes |= shdr_info[cnt].shdr.sh_link < cnt;
-            }
-
-            /* Handle references through sh_info.  */
-            if (SH_INFO_LINK_P (&shdr_info[cnt].shdr) &&
-                shdr_info[shdr_info[cnt].shdr.sh_info].idx == 0) {
-              PRINT("\tSection [%s] links to section [%s], which was "
-                    "marked for removal--it will not be removed.\n",
-                    shdr_info[cnt].name,
-                    shdr_info[shdr_info[cnt].shdr.sh_info].name);
-
-              shdr_info[shdr_info[cnt].shdr.sh_info].idx = 1;
-              changes |= shdr_info[cnt].shdr.sh_info < cnt;
-            }
-
-            /* Mark the section as investigated.  */
-            shdr_info[cnt].idx = 2;
-          } /* if (shdr_info[cnt].idx == 1) */
-		} /* for (cnt = 1; cnt < shnum; ++cnt) */
-      } while (changes);
-    }
-    else {
-      INFO("Not stripping sections.\n");
-      /* Mark the SHT_NULL section as handled. */
-      shdr_info[0].idx = 2;
-    }
-
-	/* Mark the section header string table as unused, we will create
-	   a new one as the very last section in the new ELF file.
-	*/
-	shdr_info[shstrndx].idx = rebuild_shstrtab ? 0 : 2;
-
-	/* We need a string table for the section headers. */
-	FAILIF_LIBELF((shst = ebl_strtabinit (1	/* null-terminated */)) == NULL,
-				  ebl_strtabinit);
-
-	/* Assign new section numbers. */
-	INFO("Creating new sections...\n");
-	//shdr_info[0].idx = 0;
-	for (cnt = idx = 1; cnt < shnum; ++cnt) {
-		if (shdr_info[cnt].idx > 0) {
-			shdr_info[cnt].idx = idx++;
-
-			/* Create a new section. */
-			FAILIF_LIBELF((shdr_info[cnt].newscn =
-						   elf_newscn(newelf)) == NULL, elf_newscn);
-			ASSERT(elf_ndxscn (shdr_info[cnt].newscn) == shdr_info[cnt].idx);
-
-			/* Add this name to the section header string table. */
-			shdr_info[cnt].se = ebl_strtabadd (shst, shdr_info[cnt].name, 0);
-
-			INFO("\tsection [%s]  (old offset %lld, old size %lld) will have index %d "
-				 "(was %zd).\n",
-				 shdr_info[cnt].name,
-				 shdr_info[cnt].old_shdr.sh_offset,
-				 shdr_info[cnt].old_shdr.sh_size,
-				 shdr_info[cnt].idx,
-				 elf_ndxscn(shdr_info[cnt].scn));
-		} else {
-			INFO("\tIgnoring section [%s] (offset %lld, size %lld, index %zd), "
-				 "it will be discarded.\n",
-				 shdr_info[cnt].name,
-				 shdr_info[cnt].shdr.sh_offset,
-				 shdr_info[cnt].shdr.sh_size,
-				 elf_ndxscn(shdr_info[cnt].scn));
-		}
-	} /* for */
-
-    sections_dropped_or_rearranged = idx != cnt;
-
-    Elf_Data *shstrtab_data = NULL;
-
-#if 0
-    /* Fail if sections are being dropped or rearranged (except for moving shstrtab) or the
-       symbol filter is not empty, AND the file is an executable.
-    */
-    FAILIF(((idx != cnt && !(cnt - idx == 1 && rebuild_shstrtab)) || sym_filter != NULL) &&
-           ehdr->e_type != ET_DYN,
-           "You may not rearrange sections or strip symbols on an executable file!\n");
-#endif
-
-    INFO("\n\nADJUSTING ELF FILE\n\n");
-
-    adjust_elf(elf, elf_name,
-               newelf, newelf_name,
-               ebl,
-               ehdr, /* store ELF header of original library */
-               sym_filter, num_symbols,
-               shdr_info, shdr_info_len,
-               phdr_info,
-               idx, /* highest_scn_num */
-               shnum,
-               shstrndx,
-               shst,
-               sections_dropped_or_rearranged,
-               dynamic_idx, /* index in shdr_info[] of .dynamic section */
-               dynsym_idx, /* index in shdr_info[] of dynamic symbol table */
-               shady,
-               &shstrtab_data,
-               ehdr->e_type == ET_DYN, /* adjust section ofsets only when the file is a shared library */
-               rebuild_shstrtab);
-
-    /* We have everything from the old file. */
-	FAILIF_LIBELF(elf_cntl(elf, ELF_C_FDDONE) != 0, elf_cntl);
-
-	/* The ELF library better follows our layout when this is not a
-	   relocatable object file. */
-	elf_flagelf (newelf,
-				 ELF_C_SET,
-				 (ehdr->e_type != ET_REL ? ELF_F_LAYOUT : 0));
-
-	/* Finally write the file. */
-    FAILIF_LIBELF(!dry_run && elf_update(newelf, ELF_C_WRITE) == -1, elf_update);
-
-	if (shdr_info != NULL) {
-		/* For some sections we might have created an table to map symbol
-           table indices. */
-       for (cnt = 1; cnt < shdr_info_len; ++cnt) {
-            FREEIF(shdr_info[cnt].newsymidx);
-            FREEIF(shdr_info[cnt].symse);
-            if(shdr_info[cnt].dynsymst != NULL)
-                ebl_strtabfree (shdr_info[cnt].dynsymst);
-        }
-		/* Free the memory. */
-		FREE (shdr_info);
-	}
-    FREEIF(phdr_info);
-
-    ebl_closebackend(ebl);
-
-	/* Free other resources. */
-	if (shst != NULL) ebl_strtabfree (shst);
-    if (shstrtab_data != NULL)
-        FREEIF(shstrtab_data->d_buf);
-}
diff --git a/tools/soslim/soslim.h b/tools/soslim/soslim.h
deleted file mode 100644
index 952c960..0000000
--- a/tools/soslim/soslim.h
+++ /dev/null
@@ -1,35 +0,0 @@
-#ifndef ELFCOPY_H
-#define ELFCOPY_H
-
-#include <libelf.h>
-#include <libebl.h>
-#include <elf.h>
-#include <gelf.h>
-
-/*
-symbol_filter:
-	On input: symbol_filter[i] indicates whether to keep a symbol (1) or to
-	          remove it from the symbol table.
-    On output: symbol_filter[i] indicates whether a symbol was removed (0) or
-	           kept (1) in the symbol table.
-*/
-
-void clone_elf(Elf *elf, Elf *newelf,
-			   const char *elf_name,
-			   const char *newelf_name,
-			   bool *symbol_filter,
-			   int num_symbols,
-               int shady
-#ifdef SUPPORT_ANDROID_PRELINK_TAGS
-			   , int *prelinked,
-			   int *elf_little,
-			   long *prelink_addr,
-                           int *retouched,
-                           unsigned int *retouch_byte_cnt,
-                           char *retouch_buf
-#endif
-               , bool rebuild_shstrtab,
-               bool strip_debug,
-               bool dry_run);
-
-#endif/*ELFCOPY_H*/
diff --git a/tools/soslim/symfilter.c b/tools/soslim/symfilter.c
deleted file mode 100644
index b59e68a..0000000
--- a/tools/soslim/symfilter.c
+++ /dev/null
@@ -1,246 +0,0 @@
-#include <debug.h>
-#include <common.h>
-#include <symfilter.h>
-#include <hash.h>
-#include <stdio.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-#include <libelf.h>
-#include <gelf.h>
-#include <ctype.h>
-
-#include <sys/mman.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-
-static int match_hash_table_section(Elf *elf, Elf_Scn *sect, void *data);
-static int match_dynsym_section(Elf *elf, Elf_Scn *sect, void *data);
-
-void build_symfilter(const char *name, Elf *elf, symfilter_t *filter, 
-                     off_t fsize)
-{
-    char *line = NULL;
-    symfilter_list_t *symbol;
-
-    FAILIF(NULL == name,
-           "You must provide a list of symbols to filter on!\n");
-
-    filter->num_symbols = 0;
-    filter->total_name_length = 0;
-
-    /* Open the file. */
-    INFO("Opening symbol-filter file %s...\n", name);
-    filter->fd = open(name, O_RDONLY);
-    FAILIF(filter->fd < 0, "open(%s): %s (%d)\n",
-           name, 
-           strerror(errno),
-           errno);
-
-    INFO("Symbol-filter file %s is %zd bytes long...\n",
-         name,
-         (size_t)fsize);
-    filter->fsize = fsize;
-
-    /* mmap the symbols file */
-    filter->mmap = mmap(NULL, fsize, 
-                        PROT_READ | PROT_WRITE, MAP_PRIVATE, 
-                        filter->fd, 0);
-    FAILIF(MAP_FAILED == filter->mmap, 
-           "mmap(NULL, %zd, PROT_READ, MAP_PRIVATE, %d, 0): %s (%d)\n",
-           (size_t)fsize,
-           filter->fd,
-           strerror(errno),
-           errno);
-    INFO("Memory-mapped symbol-filter file at %p\n", filter->mmap);
-
-    /* Make sure that the ELF file has a hash table.  We will use the hash 
-       table to look up symbols quickly.  If the library does not have a hash-
-       table section, we can still do a linear scan, but the code for that is
-       not written, as practically every shared library has a hash table.
-    */
-
-    filter->symtab.sect = NULL;
-    map_over_sections(elf, match_dynsym_section, filter);
-    FAILIF(NULL == filter->symtab.sect, 
-           "There is no dynamic-symbol table in this library.\n");
-    filter->hash.sect = NULL;
-    map_over_sections(elf, match_hash_table_section, filter);
-    FAILIF(NULL == filter->hash.sect, 
-           "There is no hash table in this library.\n");
-    INFO("Hash table size 0x%lx, data size 0x%lx.\n",
-         (unsigned long)filter->hash.hdr->sh_size,
-         (unsigned long)filter->hash.data->d_size);
-
-    INFO("Hash table file offset: 0x%x\n", filter->hash.hdr->sh_offset);
-
-    GElf_Ehdr *ehdr, ehdr_mem;
-    ehdr = gelf_getehdr(elf, &ehdr_mem);
-    size_t symsize = gelf_fsize (elf, ELF_T_SYM, 1, ehdr->e_version);
-    ASSERT(symsize);
-    filter->num_symbols_to_keep = filter->symtab.data->d_size / symsize;
-    filter->symbols_to_keep = (bool *)CALLOC(filter->num_symbols_to_keep, 
-                                             sizeof(bool));
-
-    /* Build the symbol-name chain. */
-    INFO("Building symbol list...\n");
-    
-    line = (char *)filter->mmap;
-
-    filter->symbols = NULL;
-#define NOT_DONE ((off_t)(line - (char *)filter->mmap) < fsize)
-    do {
-        char *name = line;
-
-        /* Advance to the next line.  We seek out spaces or new lines.  At the
-           first space or newline character we find, we place a '\0', and 
-           continue till we've consumed the line.  For new lines, we scan both
-           '\r' and '\n'.  For spaces, we look for ' ', '\t', and '\f'
-        */
-
-        while (NOT_DONE && !isspace(*line)) line++;
-        if (likely(NOT_DONE)) {
-            *line++ = '\0';
-            if (line - name > 1) {
-                /* Add the entry to the symbol-filter list */
-                symbol = (symfilter_list_t *)MALLOC(sizeof(symfilter_list_t));
-                symbol->next = filter->symbols;
-                symbol->name = name;
-                filter->symbols = symbol;
-
-#if 0 
-                /* SLOW!  For debugging only! */
-                {
-                    size_t idx;
-                    size_t elsize = gelf_fsize(elf, ELF_T_SYM, 1, 
-                                               ehdr->e_version);
-                    symbol->index = SHN_UNDEF;
-                    for (idx = 0; idx < filter->symtab.data->d_size / elsize;
-                         idx++) {
-                        GElf_Sym sym_mem;
-                        GElf_Sym *sym;
-                        const char *symname;
-                        sym = gelf_getsymshndx (filter->symtab.data, NULL, 
-                                                idx, &sym_mem, NULL);
-                        ASSERT(sym);
-
-                        symname = elf_strptr(elf, 
-                                             filter->symtab.hdr->sh_link,
-                                             sym->st_name);
-                        if(!strcmp(symname, symbol->name)) {
-                            symbol->index = idx;
-                            break;
-                        }
-                    }
-                }
-#else
-                /* Look up the symbol in the ELF file and associate it with the
-                   entry in the filter. */
-                symbol->index = hash_lookup(elf,
-                                            &filter->hash,
-                                            &filter->symtab,
-                                            symbol->name,
-                                            &symbol->symbol);
-#endif                                            
-                symbol->len = line - name - 1;
-                ASSERT(symbol->len == strlen(symbol->name));
-
-                /* If we didn't find the symbol, then it's not in the library. 
-                 */
-
-                if(STN_UNDEF == symbol->index) {
-                    PRINT("%s: symbol was not found!\n", symbol->name);
-                }
-                else {
-                    /* If we found the symbol but it's an undefined symbol, then
-                       it's not in the library as well. */
-                    GElf_Sym sym_mem;
-                    GElf_Sym *sym;
-                    sym = gelf_getsymshndx (filter->symtab.data, NULL, 
-                                            symbol->index, &sym_mem, NULL);
-                    FAILIF_LIBELF(NULL == sym, gelf_getsymshndx);
-                    /* Make sure the hash lookup worked. */
-                    ASSERT(!strcmp(elf_strptr(elf, 
-                                              filter->symtab.hdr->sh_link,
-                                              sym->st_name),
-                                   symbol->name));
-                    if (sym->st_shndx == SHN_UNDEF) {
-                        PRINT("%s: symbol was not found (undefined)!\n", symbol->name);
-                    }
-                    else {
-                        filter->num_symbols++;
-                        /* Total count includes null terminators */
-                        filter->total_name_length += symbol->len + 1; 
-
-                        /* Set the flag in the symbols_to_keep[] array.  This indicates
-                           to function copy_elf() that we want to keep the symbol.
-                        */
-                        filter->symbols_to_keep[symbol->index] = true;
-                        INFO("FILTER-SYMBOL: [%s] [%d bytes]\n", 
-                             symbol->name, 
-                             symbol->len);
-                    }
-                }
-            }
-        }
-    } while (NOT_DONE);
-#undef NOT_DONE
-}
-
-void destroy_symfilter(symfilter_t *filter)
-{
-    symfilter_list_t *old;
-    INFO("Destroying symbol list...\n");
-    while ((old = filter->symbols)) {
-        filter->symbols = old->next;
-        FREE(old);
-    }
-    munmap(filter->mmap, filter->fsize);
-    close(filter->fd);
-}
-
-static int match_hash_table_section(Elf *elf, Elf_Scn *sect, void *data)
-{
-    (void)elf; // unused argument
-
-    symfilter_t *filter = (symfilter_t *)data;
-    Elf32_Shdr *shdr;
-
-    ASSERT(filter);
-    ASSERT(sect);
-    shdr = elf32_getshdr(sect);
-
-    /* The section must be marked both as a SHT_HASH, and it's sh_link field 
-       must contain the index of our symbol table (per ELF-file spec).
-    */
-    if (shdr->sh_type == SHT_HASH)
-    {
-        FAILIF(filter->hash.sect != NULL, 
-               "There is more than one hash table!\n");
-        get_section_info(sect, &filter->hash);
-    }
-
-    return 0; /* keep looking */
-}
-
-static int match_dynsym_section(Elf *elf, Elf_Scn *sect, void *data)
-{
-    (void)elf; // unused argument
-
-    symfilter_t *filter = (symfilter_t *)data;
-    Elf32_Shdr *shdr;
-
-    ASSERT(filter);
-    ASSERT(sect);
-    shdr = elf32_getshdr(sect);
-
-    if (shdr->sh_type == SHT_DYNSYM)
-    {
-        FAILIF(filter->symtab.sect != NULL, 
-               "There is more than one dynamic symbol table!\n");
-        get_section_info(sect, &filter->symtab);
-    }
-
-    return 0; /* keep looking */
-}
diff --git a/tools/soslim/symfilter.h b/tools/soslim/symfilter.h
deleted file mode 100644
index f73fd50..0000000
--- a/tools/soslim/symfilter.h
+++ /dev/null
@@ -1,50 +0,0 @@
-#ifndef SYMFILTER_H
-#define SYMFILTER_H
-
-/* This file describes the interface for parsing the list of symbols. Currently,
-   this is just a text file with each symbol on a separate line.  We build an
-   in-memory linked list of symbols out of this image.
-*/
-
-#include <stdio.h>
-#include <libelf.h>
-#include <gelf.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <libebl.h> /* defines bool */
-
-typedef struct symfilter_list_t symfilter_list_t;
-struct symfilter_list_t {
-    symfilter_list_t *next;
-    const char *name;
-    unsigned int len; /* strlen(name) */
-    Elf32_Word index;
-    GElf_Sym symbol;
-};
-
-typedef struct symfilter_t {
-
-    int fd; /* symbol-filter-file descriptor */
-    off_t fsize; /* size of file */
-    void *mmap; /* symbol-fiter-file memory mapping */
-
-    section_info_t symtab;
-    section_info_t hash;
-    symfilter_list_t *symbols;
-
-    /* The total number of symbols in the symfilter. */
-    unsigned int num_symbols;
-    /* The total number of bytes occupied by the names of the symbols, including
-       the terminating null characters.
-    */
-    unsigned int total_name_length;
-
-    bool *symbols_to_keep;
-    /* must be the same as the number of symbols in the dynamic table! */
-    int num_symbols_to_keep;
-} symfilter_t;
-
-void build_symfilter(const char *name, Elf *elf, symfilter_t *filter, off_t);
-void destroy_symfilter(symfilter_t *);
-
-#endif/*SYMFILTER_H*/
