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

Commit b68048e5 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Use note in linker.s to place linker"

parents fe261473 1cd80d9b
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -85,7 +85,7 @@ func main() {

		fmt.Fprintf(asm, ".globl %s\n%s:\n\n", symName, symName)

		fmt.Fprintf(script, "  %s %d : {\n", sectionName, baseLoadAddr+prog.Vaddr)
		fmt.Fprintf(script, "  %s 0x%x : {\n", sectionName, baseLoadAddr+prog.Vaddr)
		fmt.Fprintf(script, "    KEEP(*(%s));\n", sectionName)
		fmt.Fprintln(script, "  }")

@@ -106,8 +106,10 @@ func main() {
		load += 1
	}

	fmt.Fprintln(asm, `.section .note.android.embedded_linker,"a",%note`)

	fmt.Fprintln(script, "}")
	fmt.Fprintln(script, "INSERT BEFORE .note.android.ident;")
	fmt.Fprintln(script, "INSERT BEFORE .note.android.embedded_linker;")

	if asmPath != "" {
		if err := ioutil.WriteFile(asmPath, asm.Bytes(), 0777); err != nil {