Mind you, this is a note taken while I was trying to link the
su binary with
libcap.so which is newly introduced as a part of my modification.
LOCAL_SHARED_LIBRARIESmodifier didn’t seem to actually do anything…
the gcc command is located inside
/build/core/definitions.mkfile. Not sure when this is executed. If you want to see the actual gcc command, you should tweak it toi print out the command.
the linking command is also located inside
/build/core/definitions.mkfile. Not sure when this is executed.
In the linking command, I cannot find a flow where
LOCAL_SHARED_LIBRARIESvalues are related. On the other hand I have found a flow where
LOCAL_LDDIRSby default directs to the
/out/.../intermediates/libdirectory. If I have already built the
libcap.sobeforehand, the original copy will be located under this directory.
LOCAL_LDFLAGSis enough to let the linker know that it should link the
libcap.soas well. It is normal to omit the
libcharacters at the front of