Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 744fd569 authored by Jiyong Park's avatar Jiyong Park
Browse files

Drop /root when installing symbols

This change fixes a problem that if a module is installed to the root
partition, its symbol file appears at under symbols/root, which is an
non-existing path at runtime. Since the symbol paths should match with
the runtime path, drop /root when installing symbols.

Bug: 123985838
Test: m libc.mountpoint
libc.so is found under symbols/bionic/lib[64]

Change-Id: I38bd226c3ec758d69902f4f288c83f68170c4068
parent 010df4b4
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -123,6 +123,8 @@ ifndef LOCAL_IS_HOST_MODULE
  ifdef LOCAL_SOONG_UNSTRIPPED_BINARY
    # Store a copy with symbols for symbolic debugging
    my_unstripped_path := $(TARGET_OUT_UNSTRIPPED)/$(patsubst $(PRODUCT_OUT)/%,%,$(my_module_path))
    # drop /root as /root is mounted as /
    my_unstripped_path := $(patsubst $(TARGET_OUT_UNSTRIPPED)/root/%,$(TARGET_OUT_UNSTRIPPED)/%, $(my_unstripped_path))
    symbolic_output := $(my_unstripped_path)/$(my_installed_module_stem)
    $(eval $(call copy-one-file,$(LOCAL_SOONG_UNSTRIPPED_BINARY),$(symbolic_output)))
    $(call add-dependency,$(LOCAL_BUILT_MODULE),$(symbolic_output))