* See the License for the specific language governing permissions and
* limitations under the License.
*/
+#include "linkerconfig/common.h"
#include <string>
#include <vector>
#include <android-base/strings.h>
-#include "linkerconfig/common.h"
#include "linkerconfig/context.h"
#include "linkerconfig/section.h"
#include "linkerconfig/variables.h"
+namespace {
+const std::vector<std::string> kBionicLibs = {
+ "libc.so",
+ "libdl.so",
+ "libdl_android.so",
+ "libm.so",
+};
+} // namespace
+
namespace android {
namespace linkerconfig {
namespace contents {
const bool is_section_vndk_enabled = ctx.IsSectionVndkEnabled();
section->ForEachNamespaces([&](Namespace& ns) {
if (ns.GetName() != system_ns_name) {
+ ns.GetLink(system_ns_name).AddSharedLib(kBionicLibs);
if (!is_section_vndk_enabled || ns.GetName() != "default") {
ns.GetLink(system_ns_name)
- .AddSharedLib(Var("STUB_LIBRARIES"),
- Var("SANITIZER_RUNTIME_LIBRARIES"));
+ .AddSharedLib(Var("SANITIZER_RUNTIME_LIBRARIES"));
}
}
});