Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/imgact_elf.h
Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | |||||
#else | #else | ||||
#define AUXARGS_ENTRY_PTR(pos, id, ptr) \ | #define AUXARGS_ENTRY_PTR(pos, id, ptr) \ | ||||
{(pos)->a_type = (id); (pos)->a_un.a_ptr = (ptr); (pos)++;} | {(pos)->a_type = (id); (pos)->a_un.a_ptr = (ptr); (pos)++;} | ||||
#endif | #endif | ||||
struct image_params; | struct image_params; | ||||
struct thread; | struct thread; | ||||
struct vnode; | struct vnode; | ||||
struct note_info_list; | |||||
struct sbuf; | |||||
/* | /* | ||||
* Structure used to pass information from the loader to the | * Structure used to pass information from the loader to the | ||||
* stack fixup routine. | * stack fixup routine. | ||||
*/ | */ | ||||
typedef struct { | typedef struct { | ||||
Elf_Ssize execfd; | Elf_Ssize execfd; | ||||
Elf_Size phdr; | Elf_Size phdr; | ||||
Show All 32 Lines | |||||
#define BI_BRAND_NOTE 0x0002 /* May have note.ABI-tag section. */ | #define BI_BRAND_NOTE 0x0002 /* May have note.ABI-tag section. */ | ||||
#define BI_BRAND_NOTE_MANDATORY 0x0004 /* Must have note.ABI-tag section. */ | #define BI_BRAND_NOTE_MANDATORY 0x0004 /* Must have note.ABI-tag section. */ | ||||
#define BI_BRAND_ONLY_STATIC 0x0008 /* Match only interp-less binaries. */ | #define BI_BRAND_ONLY_STATIC 0x0008 /* Match only interp-less binaries. */ | ||||
} __ElfN(Brandinfo); | } __ElfN(Brandinfo); | ||||
__ElfType(Auxargs); | __ElfType(Auxargs); | ||||
__ElfType(Brandinfo); | __ElfType(Brandinfo); | ||||
#define MAX_BRANDS 8 | #define MAX_BRANDS 8 | ||||
#define FREEBSD_ABI_VENDOR "FreeBSD" | |||||
typedef void (*outfunc_t)(void *, struct sbuf *, size_t *); | |||||
/* Closure for __elfN(size_segments)(). */ | /* Closure for __elfN(size_segments)(). */ | ||||
kib: I am not sure that this static definition has the effect you intended, formally it add the… | |||||
struct sseg_closure { | struct sseg_closure { | ||||
int count; /* Count of writable segments. */ | int count; /* Count of writable segments. */ | ||||
size_t size; /* Total size of all writable segments. */ | size_t size; /* Total size of all writable segments. */ | ||||
}; | }; | ||||
int __elfN(brand_inuse)(Elf_Brandinfo *entry); | int __elfN(brand_inuse)(Elf_Brandinfo *entry); | ||||
int __elfN(insert_brand_entry)(Elf_Brandinfo *entry); | int __elfN(insert_brand_entry)(Elf_Brandinfo *entry); | ||||
int __elfN(remove_brand_entry)(Elf_Brandinfo *entry); | int __elfN(remove_brand_entry)(Elf_Brandinfo *entry); | ||||
int __elfN(freebsd_fixup)(uintptr_t *, struct image_params *); | int __elfN(freebsd_fixup)(uintptr_t *, struct image_params *); | ||||
int __elfN(coredump)(struct thread *, struct vnode *, off_t, int); | int __elfN(coredump)(struct thread *, struct vnode *, off_t, int); | ||||
size_t __elfN(populate_note)(int, void *, void *, size_t, void **); | size_t __elfN(populate_note)(int, void *, void *, size_t, void **); | ||||
void __elfN(stackgap)(struct image_params *, uintptr_t *); | void __elfN(stackgap)(struct image_params *, uintptr_t *); | ||||
int __elfN(freebsd_copyout_auxargs)(struct image_params *, uintptr_t); | int __elfN(freebsd_copyout_auxargs)(struct image_params *, uintptr_t); | ||||
void __elfN(puthdr)(struct thread *, void *, size_t, int, size_t, int); | void __elfN(puthdr)(struct thread *, void *, size_t, int, size_t, int); | ||||
void __elfN(prepare_notes)(struct thread *, struct note_info_list *, | |||||
size_t *); | |||||
void __elfN(size_segments)(struct thread *, struct sseg_closure *, int); | void __elfN(size_segments)(struct thread *, struct sseg_closure *, int); | ||||
size_t __elfN(register_note)(struct thread *, struct note_info_list *, | |||||
int, outfunc_t, void *); | |||||
/* Machine specific function to dump per-thread information. */ | /* Machine specific function to dump per-thread information. */ | ||||
void __elfN(dump_thread)(struct thread *, void *, size_t *); | void __elfN(dump_thread)(struct thread *, void *, size_t *); | ||||
extern int __elfN(fallback_brand); | extern int __elfN(fallback_brand); | ||||
extern Elf_Brandnote __elfN(freebsd_brandnote); | extern Elf_Brandnote __elfN(freebsd_brandnote); | ||||
extern Elf_Brandnote __elfN(kfreebsd_brandnote); | extern Elf_Brandnote __elfN(kfreebsd_brandnote); | ||||
#endif /* _KERNEL */ | #endif /* _KERNEL */ | ||||
#endif /* !_SYS_IMGACT_ELF_H_ */ | #endif /* !_SYS_IMGACT_ELF_H_ */ |
I am not sure that this static definition has the effect you intended, formally it add the instance of FREEBSD_ABI_VENDOR to all files including this header.