summaryrefslogtreecommitdiff
path: root/cmd/extract_linker/main.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2022-02-16 15:34:52 -0800
committer Colin Cross <ccross@android.com> 2022-02-16 15:36:29 -0800
commit4d9b1f1d87a3749b07ba930639799ea012873dc4 (patch)
tree097eb696e56c4205aa81cc0eb99dce7646eab9c9 /cmd/extract_linker/main.go
parent6745a8ef1d755b6d0ed61e42ac1d28201121a007 (diff)
Discard PT_INTERP in embedded linker linker script
Discarding PT_INTERP in the linker script generated for the embedded linker allows linking without the --no-dynamic-linker argument. Bug: 216192129 Test: manual Change-Id: I0e293944c5c804b4512fb834f8f18e1d6ecd053c
Diffstat (limited to 'cmd/extract_linker/main.go')
-rw-r--r--cmd/extract_linker/main.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/extract_linker/main.go b/cmd/extract_linker/main.go
index 1280553a5..5603b411a 100644
--- a/cmd/extract_linker/main.go
+++ b/cmd/extract_linker/main.go
@@ -114,6 +114,10 @@ func main() {
fmt.Fprintln(asm, `.section .note.android.embedded_linker,"a",%note`)
+ // Discard the PT_INTERP section so that the linker doesn't need to be passed the
+ // --no-dynamic-linker flag.
+ fmt.Println(script, " /DISCARD/ : { *(.interp) }")
+
fmt.Fprintln(script, "}")
fmt.Fprintln(script, "INSERT BEFORE .note.android.embedded_linker;")