Merge changes from topic "host_bionic_no_inject" am: f77d3804fc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1735341 Change-Id: Ie55dfa7dacf0d27e2dd2a6916c60211c5fb02344
This commit is contained in:
@@ -61,8 +61,15 @@ func main() {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
sectionName := fmt.Sprintf(".linker.sect%d", load)
|
var progName string
|
||||||
symName := fmt.Sprintf("__dlwrap_linker_sect%d", load)
|
progSection := progToFirstSection(prog, ef.Sections)
|
||||||
|
if progSection != nil {
|
||||||
|
progName = progSection.Name
|
||||||
|
} else {
|
||||||
|
progName = fmt.Sprintf(".sect%d", load)
|
||||||
|
}
|
||||||
|
sectionName := ".linker" + progName
|
||||||
|
symName := "__dlwrap_linker" + strings.ReplaceAll(progName, ".", "_")
|
||||||
|
|
||||||
flags := ""
|
flags := ""
|
||||||
if prog.Flags&elf.PF_W != 0 {
|
if prog.Flags&elf.PF_W != 0 {
|
||||||
@@ -125,3 +132,12 @@ func bytesToAsm(asm io.Writer, buf []byte) {
|
|||||||
}
|
}
|
||||||
fmt.Fprintln(asm)
|
fmt.Fprintln(asm)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func progToFirstSection(prog *elf.Prog, sections []*elf.Section) *elf.Section {
|
||||||
|
for _, section := range sections {
|
||||||
|
if section.Addr == prog.Vaddr {
|
||||||
|
return section
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user