summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlin Bingham <cb@viennan.net>2018-01-15 23:07:49 +1300
committerCarlin Bingham <cb@viennan.net>2018-01-15 23:07:49 +1300
commitbc72f16e90932998ac4a404af25ce72efeada9a3 (patch)
tree8e697f38285ab05618e5ba26bedd3f6a7996d9eb
parente2c679b435ce2e9a71a4247acaf0c9177cd33c0b (diff)
downloadmc-bc72f16e90932998ac4a404af25ce72efeada9a3.tar.gz
Define __guard_local on OpenBSD for linking libc
-rw-r--r--rt/start-openbsd.s12
1 files changed, 12 insertions, 0 deletions
diff --git a/rt/start-openbsd.s b/rt/start-openbsd.s
index 9fd8610..c0e061a 100644
--- a/rt/start-openbsd.s
+++ b/rt/start-openbsd.s
@@ -60,6 +60,18 @@ _start:
movq $1,%rax
syscall
+/*
+ * provide __guard_local for if we are
+ * linking against libc
+ */
+.section ".openbsd.randomdata", "aw"
+ .global __guard_local
+ .hidden __guard_local
+ .type __guard_local, "object"
+ .p2align 3
+__guard_local:
+ .quad 0
+ .size __guard_local, 8
.section ".note.openbsd.ident", "a"
.p2align 2