diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/csu/common_elf/crtbegin.c | 4 | ||||
-rw-r--r-- | lib/csu/common_elf/os-note-elf.h | 20 |
2 files changed, 23 insertions, 1 deletions
diff --git a/lib/csu/common_elf/crtbegin.c b/lib/csu/common_elf/crtbegin.c index d18d35a652c..750af70c7b4 100644 --- a/lib/csu/common_elf/crtbegin.c +++ b/lib/csu/common_elf/crtbegin.c @@ -1,4 +1,4 @@ -/* $OpenBSD: crtbegin.c,v 1.2 2001/02/03 22:51:31 art Exp $ */ +/* $OpenBSD: crtbegin.c,v 1.3 2001/02/03 22:59:13 art Exp $ */ /* $NetBSD: crtbegin.c,v 1.1 1996/09/12 16:59:03 cgd Exp $ */ /* @@ -41,6 +41,8 @@ */ #include <stdlib.h> +#include "os-note-elf.h" + static void (*__CTOR_LIST__[1]) __P((void)) __attribute__((section(".ctors"))) = { (void *)-1 }; /* XXX */ static void (*__DTOR_LIST__[1]) __P((void)) 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 |