Make sure that ASAN runtime lib is the first DT_NEEDED one
Introduce a new tag earlySharedDepTag which is added in front of the ordinary sharedDep dependencies. Dependency to the ASAN runtime lib is added with the new tag. Bug: 120894259 Bug: 121038155 Test: m; SANITIZE_TARGET=address m Use readelf -d to see if the runtime lib is in the first DT_NEEDED one. Change-Id: I90de6ab95df734a99995532d826564b13fe05316
This commit is contained in:
@@ -363,8 +363,10 @@ func (binary *binaryDecorator) link(ctx ModuleContext,
|
||||
var sharedLibs android.Paths
|
||||
// Ignore shared libs for static executables.
|
||||
if !binary.static() {
|
||||
sharedLibs = deps.SharedLibs
|
||||
sharedLibs = deps.EarlySharedLibs
|
||||
sharedLibs = append(sharedLibs, deps.SharedLibs...)
|
||||
sharedLibs = append(sharedLibs, deps.LateSharedLibs...)
|
||||
linkerDeps = append(linkerDeps, deps.EarlySharedLibsDeps...)
|
||||
linkerDeps = append(linkerDeps, deps.SharedLibsDeps...)
|
||||
linkerDeps = append(linkerDeps, deps.LateSharedLibsDeps...)
|
||||
}
|
||||
|
Reference in New Issue
Block a user