diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 6146fd2..c886cd0 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -117,6 +117,30 @@ static struct sysentvec elf_freebsd_sysvec = { MINSIGSTKSZ }; +static struct sysentvec elf_dragonfly_sysvec = { + SYS_MAXSYSCALL, + sysent, + -1, + 0, + 0, + 0, + 0, + 0, + elf_freebsd_fixup, + sendsig, + sigcode, + &szsigcode, + 0, +#if defined(__x86_64__) + "DragonFly ELF64", +#else + "DragonFly ELF32", +#endif + elf_coredump, + NULL, + MINSIGSTKSZ +}; + static Elf_Brandinfo freebsd_brand_info = { ELFOSABI_FREEBSD, "FreeBSD", @@ -132,7 +156,7 @@ static Elf_Brandinfo dragonfly_brand_info = { dragonfly_match_abi_note, "", "/usr/libexec/ld-elf.so.2", - &elf_freebsd_sysvec + &elf_dragonfly_sysvec }; static Elf_Brandinfo *elf_brand_list[MAX_BRANDS] = { diff --git a/usr.bin/truss/main.c b/usr.bin/truss/main.c index cbc82cf..84a6bb1 100644 --- a/usr.bin/truss/main.c +++ b/usr.bin/truss/main.c @@ -83,10 +83,12 @@ struct ex_types { } ex_types[] = { #ifdef __i386__ { "FreeBSD a.out", i386_syscall_entry, i386_syscall_exit }, + { "DragonFly ELF32", i386_syscall_entry, i386_syscall_exit }, { "FreeBSD ELF32", i386_syscall_entry, i386_syscall_exit }, { "Linux ELF32", i386_linux_syscall_entry, i386_linux_syscall_exit }, #endif #ifdef __x86_64__ + { "DragonFly ELF64", x86_64_syscall_entry, x86_64_syscall_exit }, { "FreeBSD ELF64", x86_64_syscall_entry, x86_64_syscall_exit }, #endif { 0, 0, 0 },