summaryrefslogtreecommitdiff
path: root/lib/csu/os-note-elf.h
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-02-03 22:59:14 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-02-03 22:59:14 +0000
commitd87d8f7737192030a2af2457478511d445245ed8 (patch)
tree01179dd366612583c89b9a005d0a6672b3ea6242 /lib/csu/os-note-elf.h
parentbcacdefa040b9d0a6c4b088cac83166a42f6d697 (diff)
Add an OS note identifying OpenBSD binaries.
This appears to be the standard way to do it.
Diffstat (limited to 'lib/csu/os-note-elf.h')
-rw-r--r--lib/csu/os-note-elf.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/csu/os-note-elf.h b/lib/csu/os-note-elf.h
new file mode 100644
index 00000000000..f9bcd9ad6a5
--- /dev/null
+++ b/lib/csu/os-note-elf.h
@@ -0,0 +1,20 @@
+/*
+ * Contents:
+ *
+ * long Name length
+ * long Description length
+ * long ELF_NOTE_TYPE_OSVERSION (1) XXX - need a define.
+ * "OpenBSD\0"
+ * version? 0 XXX
+ */
+
+__asm(" .section \".note.openbsd.ident\", \"a\"
+ .p2align 2
+
+ .long 8
+ .long 4
+ .long 1
+ .ascii \"OpenBSD\\0\"
+ .long 0
+
+ .p2align 2"); \ No newline at end of file