Move elf headers in common/include and libexec.h in lib/libexec.
It also fixes elf headers for NBSD compilation.
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
# Makefile for libexec
|
||||
|
||||
LIB= exec
|
||||
|
||||
INCS= libexec.h
|
||||
SRCS= exec_aout.c exec_elf.c
|
||||
|
||||
.if (${NBSD_LIBC} != "no")
|
||||
INCSDIR= /usr/netbsd/include
|
||||
.else
|
||||
INCSDIR= /usr/include
|
||||
.endif
|
||||
.include <bsd.lib.mk>
|
||||
|
||||
18
lib/libexec/libexec.h
Normal file
18
lib/libexec/libexec.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#ifndef _LIBEXEC_H_
|
||||
#define _LIBEXEC_H_ 1
|
||||
|
||||
#include <machine/elf.h>
|
||||
|
||||
/* a.out routines */
|
||||
int read_header_aout(const char *exec_hdr, size_t exec_len, int *sep_id,
|
||||
vir_bytes *text_bytes, vir_bytes *data_bytes,
|
||||
vir_bytes *bss_bytes, phys_bytes *tot_bytes, vir_bytes *pc,
|
||||
int *hdrlenp);
|
||||
|
||||
/* ELF routines */
|
||||
int read_header_elf(const char *exec_hdr,
|
||||
vir_bytes *text_addr, vir_bytes *text_filebytes, vir_bytes *text_membytes,
|
||||
vir_bytes *data_addr, vir_bytes *data_filebytes, vir_bytes *data_membytes,
|
||||
phys_bytes *tot_bytes, vir_bytes *pc, off_t *text_offset, off_t *data_offset);
|
||||
|
||||
#endif /* !_LIBEXEC_H_ */
|
||||
Reference in New Issue
Block a user