Home
last modified time | relevance | path

Searched full:pe (Results 1 – 25 of 565) sorted by relevance

12345678910>>...23

/freebsd/contrib/elftoolchain/libpe/
H A Dlibpe_dos.c40 libpe_parse_msdos_header(PE *pe, char *hdr) in libpe_parse_msdos_header() argument
47 if ((pe->pe_stub = malloc(sizeof(PE_DosHdr))) == NULL) { in libpe_parse_msdos_header()
51 memcpy(pe->pe_stub, hdr, sizeof(PE_DosHdr)); in libpe_parse_msdos_header()
57 pe->pe_dh = dh; in libpe_parse_msdos_header()
76 /* Do not continue if the EXE is not a PE/NE/... (new executable) */ in libpe_parse_msdos_header()
78 pe->pe_flags |= LIBPE_F_BAD_DOS_HEADER; in libpe_parse_msdos_header()
91 if (dh->dh_lfanew > pe->pe_fsize - 4) { in libpe_parse_msdos_header()
92 pe->pe_flags |= LIBPE_F_BAD_DOS_HEADER; in libpe_parse_msdos_header()
97 (pe->pe_flags & LIBPE_F_SPECIAL_FILE)) { in libpe_parse_msdos_header()
98 pe->pe_flags |= LIBPE_F_BAD_DOS_HEADER; in libpe_parse_msdos_header()
[all …]
H A Dpe_coff.c36 pe_coff_header(PE *pe) in pe_coff_header() argument
39 if (pe->pe_ch == NULL) { in pe_coff_header()
44 return (pe->pe_ch); in pe_coff_header()
48 pe_opt_header(PE *pe) in pe_opt_header() argument
51 if (pe->pe_oh == NULL) { in pe_opt_header()
56 return (pe->pe_oh); in pe_opt_header()
60 pe_data_dir(PE *pe) in pe_data_dir() argument
63 if (pe->pe_dd == NULL) { in pe_data_dir()
68 return (pe->pe_dd); in pe_data_dir()
72 pe_update_coff_header(PE *pe, PE_CoffHdr *ch) in pe_update_coff_header() argument
[all …]
H A Dlibpe_section.c39 libpe_alloc_scn(PE *pe) in libpe_alloc_scn() argument
48 ps->ps_pe = pe; in libpe_alloc_scn()
56 PE *pe; in libpe_release_scn() local
61 pe = ps->ps_pe; in libpe_release_scn()
63 STAILQ_REMOVE(&pe->pe_scn, ps, _PE_Scn, ps_next); in libpe_release_scn()
84 sort_sections(PE *pe) in sort_sections() argument
87 if (STAILQ_EMPTY(&pe->pe_scn)) in sort_sections()
91 STAILQ_SORT(&pe->pe_scn, _PE_Scn, ps_next, cmp_scn); in sort_sections()
95 libpe_parse_section_headers(PE *pe) in libpe_parse_section_headers() argument
104 assert(pe->pe_ch != NULL); in libpe_parse_section_headers()
[all …]
H A Dpe_dos.c37 pe_msdos_header(PE *pe) in pe_msdos_header() argument
40 if (pe == NULL) { in pe_msdos_header()
45 if (pe->pe_dh == NULL) { in pe_msdos_header()
50 return (pe->pe_dh); in pe_msdos_header()
54 pe_msdos_stub(PE *pe, size_t *len) in pe_msdos_stub() argument
57 if (pe == NULL || len == NULL) { in pe_msdos_stub()
62 if (pe->pe_stub_ex > 0 && in pe_msdos_stub()
63 (pe->pe_flags & LIBPE_F_LOAD_DOS_STUB) == 0) { in pe_msdos_stub()
64 assert((pe->pe_flags & LIBPE_F_SPECIAL_FILE) == 0); in pe_msdos_stub()
65 (void) libpe_read_msdos_stub(pe); in pe_msdos_stub()
[all …]
H A Dpe_section.c35 pe_getscn(PE *pe, size_t ndx) in pe_getscn() argument
39 if (pe == NULL || ndx < 1 || ndx > 0xFFFFU) { in pe_getscn()
44 STAILQ_FOREACH(ps, &pe->pe_scn, ps_next) { in pe_getscn()
67 pe_nextscn(PE *pe, PE_Scn *ps) in pe_nextscn() argument
70 if (pe == NULL) { in pe_nextscn()
76 ps = STAILQ_FIRST(&pe->pe_scn); in pe_nextscn()
90 pe_newscn(PE *pe) in pe_newscn() argument
94 if (pe == NULL) { in pe_newscn()
99 if (pe->pe_cmd == PE_C_READ || pe->pe_flags & LIBPE_F_FD_DONE) { in pe_newscn()
104 if ((ps = libpe_alloc_scn(pe)) == NULL) in pe_newscn()
[all …]
H A Dlibpe_init.c38 libpe_open_object(PE *pe) in libpe_open_object() argument
44 if (fstat(pe->pe_fd, &sb) < 0) in libpe_open_object()
48 pe->pe_fsize = (size_t) sb.st_size; in libpe_open_object()
58 if (pe->pe_cmd == PE_C_RDWR && !S_ISREG(mode)) { in libpe_open_object()
64 if (S_ISREG(mode) && pe->pe_fsize < sizeof(PE_CoffHdr)) { in libpe_open_object()
73 if (read(pe->pe_fd, magic, 2) != 2) { in libpe_open_object()
79 pe->pe_obj = PE_O_PE32; in libpe_open_object()
80 if (read(pe->pe_fd, &magic[2], sizeof(PE_DosHdr) - 2) != in libpe_open_object()
85 return (libpe_parse_msdos_header(pe, magic)); in libpe_open_object()
88 if (read(pe->pe_fd, magic, 2) != 2) { in libpe_open_object()
[all …]
H A Dlibpe_coff.c40 libpe_parse_coff_header(PE *pe, char *hdr) in libpe_parse_coff_header() argument
62 pe->pe_ch = ch; in libpe_parse_coff_header()
68 return (libpe_parse_section_headers(pe)); in libpe_parse_coff_header()
74 pe->pe_oh = oh; in libpe_parse_coff_header()
86 if (read(pe->pe_fd, tmp, r) != (ssize_t) r) { \ in libpe_parse_coff_header()
87 pe->pe_flags |= LIBPE_F_BAD_SEC_HEADER;\ in libpe_parse_coff_header()
90 return (libpe_parse_section_headers(pe)); \ in libpe_parse_coff_header()
92 if (read(pe->pe_fd, tmp, (n)) != (ssize_t) (n)) { \ in libpe_parse_coff_header()
93 pe->pe_flags |= LIBPE_F_BAD_OPT_HEADER; \ in libpe_parse_coff_header()
105 * on the PE format specified by the oh_magic field. (PE32 or PE32+) in libpe_parse_coff_header()
[all …]
H A Dlibpe.h34 #include "pe.h"
37 typedef struct _PE PE; typedef
81 PE_CoffHdr *pe_coff_header(PE *);
82 int pe_cntl(PE *, PE_Cmd);
83 PE_DataDir *pe_data_dir(PE *);
84 void pe_finish(PE *);
85 int pe_flag(PE *, PE_Cmd, unsigned int);
87 int pe_flag_coff_header(PE *, PE_Cmd, unsigned int);
88 int pe_flag_data_dir(PE *, PE_Cmd, unsigned int);
89 int pe_flag_dos_header(PE *, PE_Cmd, unsigned int);
[all …]
H A Dpe_flag.c34 pe_flag(PE *pe, PE_Cmd c, unsigned int flags) in pe_flag() argument
37 if (pe == NULL || (c != PE_C_SET && c != PE_C_CLR)) { in pe_flag()
49 pe->pe_flags |= flags; in pe_flag()
51 pe->pe_flags &= ~flags; in pe_flag()
57 pe_flag_dos_header(PE *pe, PE_Cmd c, unsigned int flags) in pe_flag_dos_header() argument
60 if (pe == NULL || (c != PE_C_SET && c != PE_C_CLR) || in pe_flag_dos_header()
67 pe->pe_flags |= LIBPE_F_DIRTY_DOS_HEADER; in pe_flag_dos_header()
69 pe->pe_flags &= ~LIBPE_F_DIRTY_DOS_HEADER; in pe_flag_dos_header()
75 pe_flag_coff_header(PE *pe, PE_Cmd c, unsigned int flags) in pe_flag_coff_header() argument
78 if (pe == NULL || (c != PE_C_SET && c != PE_C_CLR) || in pe_flag_coff_header()
[all …]
H A Dpe_init.c35 PE *
38 PE *pe; in pe_init() local
40 if ((pe = calloc(1, sizeof(*pe))) == NULL) { in pe_init()
44 pe->pe_fd = fd; in pe_init()
45 pe->pe_cmd = c; in pe_init()
46 pe->pe_obj = o; in pe_init()
47 STAILQ_INIT(&pe->pe_scn); in pe_init()
52 if (libpe_open_object(pe) < 0) in pe_init()
68 return (pe); in pe_init()
71 pe_finish(pe); in pe_init()
[all …]
H A Dpe_rich.c35 pe_rich_header(PE *pe) in pe_rich_header() argument
38 if (pe == NULL) { in pe_rich_header()
43 if (pe->pe_rh == NULL && pe->pe_stub_ex > 0 && in pe_rich_header()
44 (pe->pe_flags & LIBPE_F_LOAD_DOS_STUB) == 0) { in pe_rich_header()
45 assert((pe->pe_flags & LIBPE_F_SPECIAL_FILE) == 0); in pe_rich_header()
46 (void) libpe_read_msdos_stub(pe); in pe_rich_header()
49 if (pe->pe_rh == NULL) { in pe_rich_header()
54 return (pe->pe_rh); in pe_rich_header()
67 pe_rich_header_validate(PE *pe) in pe_rich_header_validate() argument
74 if (pe_rich_header(pe) == NULL) in pe_rich_header_validate()
[all …]
H A Dpe_update.c36 pe_update(PE *pe) in pe_update() argument
40 if (pe == NULL) { in pe_update()
45 if (pe->pe_cmd == PE_C_READ || pe->pe_flags & LIBPE_F_FD_DONE) { in pe_update()
50 if (pe->pe_cmd == PE_C_RDWR || (pe->pe_cmd == PE_C_WRITE && in pe_update()
51 (pe->pe_flags & LIBPE_F_SPECIAL_FILE) == 0)) { in pe_update()
52 if (lseek(pe->pe_fd, 0, SEEK_SET) < 0) { in pe_update()
60 if (pe->pe_obj == PE_O_PE32 || pe->pe_obj == PE_O_PE32P) { in pe_update()
61 if ((off = libpe_write_msdos_stub(pe, off)) < 0) in pe_update()
64 if ((off = libpe_write_pe_header(pe, off)) < 0) in pe_update()
68 if (libpe_resync_sections(pe, off) < 0) in pe_update()
[all …]
H A D_libpe.h47 PE *ps_pe; /* PE descriptor */
106 #define PE_SIGNATURE 0x4550U /* PE\0\0 */
189 off_t libpe_align(PE *, off_t, size_t);
191 PE_Scn *libpe_alloc_scn(PE *);
192 int libpe_load_all_sections(PE *);
193 int libpe_load_section(PE *, PE_Scn *);
194 int libpe_open_object(PE *);
195 int libpe_pad(PE *, size_t);
196 int libpe_parse_msdos_header(PE *, char *);
197 int libpe_parse_coff_header(PE *, char *);
[all …]
H A Dpe_buffer.c36 PE *pe; in pe_getbuffer() local
44 pe = ps->ps_pe; in pe_getbuffer()
47 if (pe->pe_flags & LIBPE_F_FD_DONE) { in pe_getbuffer()
51 if (pe->pe_flags & LIBPE_F_SPECIAL_FILE) { in pe_getbuffer()
52 if (libpe_load_all_sections(pe) < 0) in pe_getbuffer()
55 if (libpe_load_section(pe, ps) < 0) in pe_getbuffer()
73 PE *pe; in pe_newbuffer() local
81 pe = ps->ps_pe; in pe_newbuffer()
83 if (pe->pe_flags & LIBPE_F_FD_DONE) { in pe_newbuffer()
89 if (libpe_load_section(pe, ps) < 0) in pe_newbuffer()
/freebsd/contrib/tcsh/
H A Dma.setp.c235 struct pelem *pe, *pathend; in initpaths() local
248 pe = xmalloc(sizeof(struct pelem)); in initpaths()
249 setzero(pe, sizeof(struct pelem)); in initpaths()
251 pathhead = pathend = pe; in initpaths()
253 pathend->pnext = pe; in initpaths()
254 pathend = pe; in initpaths()
257 pe->pname = p; in initpaths()
258 pe->psuf = ""; in initpaths()
259 pe->pdef = ""; in initpaths()
261 if (strcmp(pe->pname, syspath[i].name) == 0) { in initpaths()
[all …]
/freebsd/tools/tools/ath/athradar/
H A Dathradar.c81 HAL_PHYERR_PARAM pe; in radarset() local
83 pe.pe_firpwr = HAL_PHYERR_PARAM_NOVAL; in radarset()
84 pe.pe_rrssi = HAL_PHYERR_PARAM_NOVAL; in radarset()
85 pe.pe_height = HAL_PHYERR_PARAM_NOVAL; in radarset()
86 pe.pe_prssi = HAL_PHYERR_PARAM_NOVAL; in radarset()
87 pe.pe_inband = HAL_PHYERR_PARAM_NOVAL; in radarset()
88 pe.pe_enabled = HAL_PHYERR_PARAM_NOVAL; in radarset()
90 pe.pe_relpwr = HAL_PHYERR_PARAM_NOVAL; in radarset()
91 pe.pe_relstep = HAL_PHYERR_PARAM_NOVAL; in radarset()
92 pe.pe_maxlen = HAL_PHYERR_PARAM_NOVAL; in radarset()
[all …]
/freebsd/sys/dev/ath/ath_hal/ar5416/
H A Dar5416_radar.c54 ar5416GetDfsDefaultThresh(struct ath_hal *ah, HAL_PHYERR_PARAM *pe) in ar5416GetDfsDefaultThresh() argument
64 pe->pe_firpwr = AR5416_DFS_FIRPWR; in ar5416GetDfsDefaultThresh()
65 pe->pe_rrssi = AR5416_DFS_RRSSI; in ar5416GetDfsDefaultThresh()
66 pe->pe_height = AR5416_DFS_HEIGHT; in ar5416GetDfsDefaultThresh()
67 pe->pe_prssi = AR5416_DFS_PRSSI; in ar5416GetDfsDefaultThresh()
68 pe->pe_inband = AR5416_DFS_INBAND; in ar5416GetDfsDefaultThresh()
69 pe->pe_relpwr = AR5416_DFS_RELPWR; in ar5416GetDfsDefaultThresh()
70 pe->pe_relstep = AR5416_DFS_RELSTEP; in ar5416GetDfsDefaultThresh()
71 pe->pe_maxlen = AR5416_DFS_MAXLEN; in ar5416GetDfsDefaultThresh()
77 * Get the radar parameter values and return them in the pe
[all …]
/freebsd/lib/libc/tests/nss/
H A Dgetproto_test.c110 free_protoent(struct protoent *pe) in free_protoent() argument
114 assert(pe != NULL); in free_protoent()
116 free(pe->p_name); in free_protoent()
118 for (cp = pe->p_aliases; *cp; ++cp) in free_protoent()
120 free(pe->p_aliases); in free_protoent()
164 sdump_protoent(struct protoent *pe, char *buffer, size_t buflen) in sdump_protoent() argument
170 pe->p_name, pe->p_proto); in sdump_protoent()
176 if (pe->p_aliases != NULL) { in sdump_protoent()
177 if (*(pe->p_aliases) != NULL) { in sdump_protoent()
178 for (cp = pe->p_aliases; *cp; ++cp) { in sdump_protoent()
[all …]
/freebsd/lib/libcuse/
H A Dcuse_lib.c457 struct cuse_dev_entered *pe; in cuse_wait_and_process() local
503 TAILQ_FOREACH(pe, &h_cuse_entered, entry) { in cuse_wait_and_process()
504 if (pe->cdev != cdev) in cuse_wait_and_process()
506 if (pe->thread == curr) in cuse_wait_and_process()
508 if (pe->per_file_handle != in cuse_wait_and_process()
511 pe->got_signal = 1; in cuse_wait_and_process()
512 pthread_kill(pe->thread, SIGHUP); in cuse_wait_and_process()
567 TAILQ_FOREACH(pe, &h_cuse_entered, entry) { in cuse_wait_and_process()
568 if (pe->cdev != cdev) in cuse_wait_and_process()
570 if (pe->thread == curr) in cuse_wait_and_process()
[all …]
/freebsd/tools/tools/ath/athspectral/
H A Dathspectral.c81 HAL_SPECTRAL_PARAM pe; in spectralset() local
83 pe.ss_fft_period = HAL_SPECTRAL_PARAM_NOVAL; in spectralset()
84 pe.ss_period = HAL_SPECTRAL_PARAM_NOVAL; in spectralset()
85 pe.ss_count = HAL_SPECTRAL_PARAM_NOVAL; in spectralset()
86 pe.ss_short_report = HAL_SPECTRAL_PARAM_NOVAL; in spectralset()
87 pe.ss_spectral_pri = HAL_SPECTRAL_PARAM_NOVAL; in spectralset()
88 pe.ss_fft_period = HAL_SPECTRAL_PARAM_NOVAL; in spectralset()
89 pe.ss_enabled = HAL_SPECTRAL_PARAM_NOVAL; in spectralset()
90 pe.ss_active = HAL_SPECTRAL_PARAM_NOVAL; in spectralset()
94 pe.ss_fft_period = param; in spectralset()
[all …]
/freebsd/sys/contrib/dev/ath/ath_hal/ar9300/
H A Dar9300_radar.c226 * values in pe
229 ar9300_enable_dfs(struct ath_hal *ah, HAL_PHYERR_PARAM *pe) argument
241 if (pe->pe_enabled != HAL_PHYERR_PARAM_NOVAL) {
243 val |= SM(pe->pe_enabled, AR_PHY_RADAR_0_ENA);
246 if (pe->pe_firpwr != HAL_PHYERR_PARAM_NOVAL) {
248 val |= SM(pe->pe_firpwr, AR_PHY_RADAR_0_FIRPWR);
250 if (pe->pe_rrssi != HAL_PHYERR_PARAM_NOVAL) {
252 val |= SM(pe->pe_rrssi, AR_PHY_RADAR_0_RRSSI);
254 if (pe->pe_height != HAL_PHYERR_PARAM_NOVAL) {
256 val |= SM(pe->pe_height, AR_PHY_RADAR_0_HEIGHT);
[all …]
/freebsd/contrib/llvm-project/llvm/utils/TableGen/
H A DMacroFusionPredicatorEmitter.cpp58 void emitMacroFusionDecl(ArrayRef<Record *> Fusions, PredicateExpander &PE,
60 void emitMacroFusionImpl(ArrayRef<Record *> Fusions, PredicateExpander &PE,
63 PredicateExpander &PE, raw_ostream &OS);
65 PredicateExpander &PE, raw_ostream &OS);
67 PredicateExpander &PE, raw_ostream &OS);
69 PredicateExpander &PE, raw_ostream &OS);
79 ArrayRef<Record *> Fusions, PredicateExpander &PE, raw_ostream &OS) { in emitMacroFusionDecl() argument
96 ArrayRef<Record *> Fusions, PredicateExpander &PE, raw_ostream &OS) { in emitMacroFusionImpl() argument
114 emitPredicates(Predicates, IsCommutable, PE, OS); in emitMacroFusionImpl()
126 PredicateExpander &PE, in emitPredicates() argument
[all …]
/freebsd/sys/dev/ath/ath_hal/ar5212/
H A Dar5212_misc.c1164 ar5212EnableDfs(struct ath_hal *ah, HAL_PHYERR_PARAM *pe) in ar5212EnableDfs() argument
1169 if (pe->pe_firpwr != HAL_PHYERR_PARAM_NOVAL) { in ar5212EnableDfs()
1171 val |= SM(pe->pe_firpwr, AR_PHY_RADAR_0_FIRPWR); in ar5212EnableDfs()
1173 if (pe->pe_rrssi != HAL_PHYERR_PARAM_NOVAL) { in ar5212EnableDfs()
1175 val |= SM(pe->pe_rrssi, AR_PHY_RADAR_0_RRSSI); in ar5212EnableDfs()
1177 if (pe->pe_height != HAL_PHYERR_PARAM_NOVAL) { in ar5212EnableDfs()
1179 val |= SM(pe->pe_height, AR_PHY_RADAR_0_HEIGHT); in ar5212EnableDfs()
1181 if (pe->pe_prssi != HAL_PHYERR_PARAM_NOVAL) { in ar5212EnableDfs()
1183 val |= SM(pe->pe_prssi, AR_PHY_RADAR_0_PRSSI); in ar5212EnableDfs()
1185 if (pe->pe_inband != HAL_PHYERR_PARAM_NOVAL) { in ar5212EnableDfs()
[all …]
/freebsd/contrib/elftoolchain/elfcopy/
H A Dpe.c37 ELFTC_VCSID("$Id: pe.c 3508 2016-12-27 06:19:39Z kaiwang27 $");
39 /* Convert ELF object to Portable Executable (PE). */
48 PE *pe; in create_pe() local
77 if ((pe = pe_init(ofd, PE_C_WRITE, po)) == NULL) in create_pe()
80 /* Setup PE COFF header. */ in create_pe()
96 if (pe_update_coff_header(pe, &pch) < 0) in create_pe()
99 /* Setup PE optional header. */ in create_pe()
162 * Create PE/COFF section. in create_pe()
165 if ((ps = pe_newscn(pe)) == NULL) { in create_pe()
171 * Setup PE/COFF section header. The section name is not in create_pe()
[all …]
/freebsd/sbin/kldconfig/
H A Dkldconfig.c142 struct pathentry *pe, *pskip; in addpath() local
161 TAILQ_FOREACH(pe, pathq, next) in addpath()
162 if (!strcmp(pe->path, pathbuf)) in addpath()
164 if (pe != NULL) { in addpath()
171 if (((pe = malloc(sizeof(*pe))) == NULL) || in addpath()
172 ((pe->path = strdup(pathbuf)) == NULL)) { in addpath()
177 TAILQ_INSERT_TAIL(pathq, pe, next); in addpath()
182 TAILQ_INSERT_BEFORE(pskip, pe, next); in addpath()
184 TAILQ_INSERT_TAIL(pathq, pe, next); in addpath()
195 struct pathentry *pe; in rempath() local
[all …]

12345678910>>...23