summaryrefslogtreecommitdiff
path: root/lib/csu/common_elf/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
commit1e709818823f910e24ff49737dfa1d3206ec6d01 (patch)
tree10f5097cbf7554faeb95938027713509a54f246f /lib/csu/common_elf/os-note-elf.h
parent99dcff54ab48750caee115787252c69f5017030b (diff)
Add an OS note identifying OpenBSD binaries.
This appears to be the standard way to do it.
Diffstat (limited to 'lib/csu/common_elf/os-note-elf.h')
-rw-r--r--lib/csu/common_elf/os-note-elf.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/csu/common_elf/os-note-elf.h b/lib/csu/common_elf/os-note-elf.h
new file mode 100644
index 00000000000..f9bcd9ad6a5
--- /dev/null
+++ b/lib/csu/common_elf/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