Home | History | Annotate | Download | only in perf

Lines Matching refs:FILE

71 /* This file defines standard ELF types, structures, and macros.
73 This file is part of the GNU C Library.
87 License along with the GNU C Library; see the file COPYING.LIB. If not,
133 /* Type of file offsets. */
146 /* The ELF file header. This appears at the start of every ELF file. */
153 Elf32_Half e_type; /* Object file type */
155 Elf32_Word e_version; /* Object file version */
157 Elf32_Off e_phoff; /* Program header table file offset */
158 Elf32_Off e_shoff; /* Section header table file offset */
171 Elf64_Half e_type; /* Object file type */
173 Elf64_Word e_version; /* Object file version */
175 Elf64_Off e_phoff; /* Program header table file offset */
176 Elf64_Off e_shoff; /* Section header table file offset */
190 #define EI_MAG0 0 /* File identification byte 0 index */
193 #define EI_MAG1 1 /* File identification byte 1 index */
196 #define EI_MAG2 2 /* File identification byte 2 index */
199 #define EI_MAG3 3 /* File identification byte 3 index */
206 #define EI_CLASS 4 /* File class byte index */
218 #define EI_VERSION 6 /* File version byte index */
232 /* Legal values for e_type (object file type). */
234 #define ET_NONE 0 /* No file type */
235 #define ET_REL 1 /* Relocatable file */
236 #define ET_EXEC 2 /* Executable file */
237 #define ET_DYN 3 /* Shared object file */
238 #define ET_CORE 4 /* Core file */
306 Elf32_Off sh_offset; /* Section file offset */
320 Elf64_Off sh_offset; /* Section file offset */
460 #define STT_FILE 4 /* Symbol's name is file name */
539 Elf32_Off p_offset; /* Segment file offset */
542 Elf32_Word p_filesz; /* Segment size in file */
552 Elf64_Off p_offset; /* Segment file offset */
555 Elf64_Xword p_filesz; /* Segment size in file */
747 #define VER_FLG_BASE 0x1 /* Version definition of file itself */
828 vector is not usually defined in a standard <elf.h> file, but it
859 #define AT_EXECFD 2 /* File descriptor of program */
1719 This file is part of the GNU C Library.
1732 License along with the GNU C Library; see the file COPYING.LIB. If not,
1799 Supposedly the field is "path to associated .cb file". THIS VALUE
1804 of the definition file. Other is non-zero if it is imported with the
1826 /* Name of main source file.
1834 /* Beginning of an include file. Only Sun uses this.
1835 In an object file, only the name is significant.
1839 /* Name of sub-source file (#include file).
1847 /* End of an include file. No name.
1848 This and N_BINCL act as brackets around the file's output.
1849 In an object file, there is no significant data in this entry.
1862 /* Place holder for deleted include file. Replaces a N_BINCL and everything
1864 it finds multiple identical copies of the symbols from an include file.
2014 /* add a file (either a C file, dll, an object, a library or an ld
2027 output file) (default) */
2028 #define TCC_OUTPUT_EXE 1 /* executable file */
2030 #define TCC_OUTPUT_OBJ 3 /* object file */
2046 /* output an executable, library or object file. DO NOT call
2072 /* include file debug */
2271 int *ifdef_stack_ptr; /* ifdef_stack value at the start of the file */
2278 #define CH_EOB '\\' /* end of buffer or '\0' char in file */
2279 #define CH_EOF (-1) /* end of file */
2298 /* include file cache, used to find files faster and also to eliminate
2299 inclusion if the include file is protected by #ifndef ... #endif */
2310 static struct BufferedFile *file;
2317 #define TOK_FLAG_BOF 0x0002 /* beginning of file before */
2415 /* include file handling */
2634 #define TOK_EOF (-1) /* end of file */
5487 #define AFF_PRINT_ERROR 0x0001 /* print error if file not found */
5492 int tcc_output_coff(TCCState *s1, FILE *f);
5496 int pe_load_def_file(struct TCCState *s1, FILE *fp);
7038 if (file) {
7040 strcat_printf(buf, sizeof(buf), "In file included from %s:%d:\n",
7042 if (file->line_num > 0) {
7044 "%s:%d: ", file->filename, file->line_num);
7047 "%s: ", file->filename);
7569 return tcc_peekc_slow(file);
7572 /* read next char from current input file and handle end of input buffer */
7575 ch = *(++(file->buf_ptr));
7576 /* end of buffer/file handling */
7587 file->line_num++;
7593 file->line_num++;
7608 if (p >= file->buf_end) {
7609 file->buf_ptr = p;
7611 p = file->buf_ptr;
7616 file->buf_ptr = p;
7619 p = file->buf_ptr;
7631 file->buf_ptr = p;\
7633 p = file->buf_ptr;\
7644 p = file->buf_ptr;\
7671 file->buf_ptr = p;
7673 p = file->buf_ptr;
7677 file->line_num++;
7682 file->line_num++;
7716 file->line_num++;
7727 file->buf_ptr = p;
7729 p = file->buf_ptr;
7735 file->line_num++;
7740 file->line_num++;
7755 file->buf_ptr = p;
7757 p = file->buf_ptr;
7759 error("unexpected end of file in comment");
7795 file->buf_ptr = p;
7797 p = file->buf_ptr;
7806 file->line_num++;
7812 file->line_num++;
7825 file->line_num++;
7833 file->line_num++;
7854 p = file->buf_ptr;
7870 file->line_num++;
7874 file->buf_ptr = p;
7880 ch = file->buf_ptr[0];
7883 p = file->buf_ptr;
7892 file->buf_ptr = p;
7895 p = file->buf_ptr;
7906 file->buf_ptr = p;
7908 p = file->buf_ptr;
7925 file->buf_ptr = p;
7930 /* XXX: currently, no include file info is stored. Thus, we cannot display
7937 s->line_num = file->line_num;
7946 file->line_num = s->line_num;
8095 if (file->line_num != s->last_line_num) {
8096 s->last_line_num = file->line_num;
8281 tok_str_add(&str, -1); /* simulate end of file */
8322 c = file->buf_ptr[0];
8324 c = handle_stray1(file->buf_ptr);
8472 /* is_bof is true if first non space token at beginning of file */
8502 ch = file->buf_ptr[0];
8563 printf("%s: skipping %s\n", file->filename, buf);
8569 p = strrchr(file->filename, '/');
8571 size = p + 1 - file->filename;
8574 memcpy(buf1, file->filename, size);
8606 error("include file '%s' not found", buf);
8610 printf("%s: including %s\n", file->filename, buf1);
8614 /* push current file in stack */
8616 *s1->include_stack_ptr++ = file;
8617 file = f;
8618 /* add include file debug info */
8620 put_stabs(file->filename, N_BINCL, 0, 0, 0);
8623 ch = file->buf_ptr[0];
8644 file->ifndef_macro = tok;
8680 if (s1->ifdef_stack_ptr <= file->ifdef_stack_ptr)
8683 /* '#ifndef macro' was at the start of file. Now we check if
8684 an '#endif' is exactly at the end of file */
8685 if (file->ifndef_macro &&
8686 s1->ifdef_stack_ptr == file->ifdef_stack_ptr) {
8687 file->ifndef_macro_saved = file->ifndef_macro;
8689 #ifndef at middle of file */
8690 file->ifndef_macro = 0;
8701 file->line_num = tokc.i - 1; /* the line number will be incremented after */
8706 pstrcpy(file->filename, sizeof(file->filename),
8713 ch = file->buf_ptr[0];
9163 p = file->buf_ptr;
9177 if (p >= file->buf_end) {
9178 file->buf_ptr = p;
9180 p = file->buf_ptr;
9181 if (p >= file->buf_end)
9186 file->buf_ptr = p;
9189 p = file->buf_ptr;
9199 /* no include left : end of file. */
9202 /* pop include file */
9205 start of file */
9208 printf("#endif %s\n", get_tok_str(file->ifndef_macro_saved, NULL));
9210 add_cached_include(s1, file->inc_type, file->inc_filename,
9211 file->ifndef_macro_saved);
9214 /* add end of include file debug info */
9219 tcc_close(file);
9221 file = *s1->include_stack_ptr;
9222 p = file->buf_ptr;
9232 file->line_num++;
9244 file->buf_ptr = p;
9246 p = file->buf_ptr;
9567 file->buf_ptr = p;
9584 file->line_num = tokc.i;
9709 snprintf(buf, sizeof(buf), "%d", file->line_num);
9714 cstrval = file->filename;
9750 after in the file */
9763 ch = file->buf_ptr[0];
9995 file stream due to a macro function call */
13543 (last_line_num != file->line_num || last_ind != ind)) {
13544 put_stabn(N_SLINE, 0, file->line_num, ind - func_ind);
13546 last_line_num = file->line_num;
14309 error("unexpected end of file in initializer");
14495 put_stabs_r(buf, N_FUN, 0, file->line_num, 0,
14737 error("unexpected end of file");
14819 file->ifdef_stack_ptr ? */
14821 file->ifdef_stack_ptr = s1->ifdef_stack_ptr;
14829 /* compile the C file opened in 'file'. Return non zero if errors. */
14837 printf("%s: **** new file\n", file->filename);
14844 /* file info: full path + filename */
14854 put_stabs_r(file->filename, N_SO, 0, 0,
14861 SHN_ABS, file->filename);
14892 ch = file->buf_ptr[0];
14926 /* init file structure */
14939 file = bf;
14962 /* init file structure */
14969 file = bf;
14974 ch = file->buf_ptr[0];
14977 file = NULL;
17378 /* define symbol value in object file */
17664 /* assemble a file */
17703 ch = file->buf_ptr[0];
17764 /* Assemble the current file */
17804 /* same name as current file so that errors are correctly
17806 pstrcpy(bf->filename, sizeof(bf->filename), file->filename);
17807 bf->line_num = file->line_num;
17808 saved_file = file;
17809 file = bf;
17818 file = saved_file;
18121 * ELF file handling for TCC
18421 /* In an ELF file symbol table, the local symbols must appear below
19086 /* XXX: add an object file to do that */
19189 static void tcc_output_binary(TCCState *s1, FILE *f,
19211 /* output an ELF file */
19216 FILE *f;
19416 /* this array is used to reorder sections in the output file */
19455 /* we output all sections if debug or object file */
19731 /* write elf file */
19861 /* load an object file and merge it with current files */
19884 /* test if object file */
19891 error_noabort("invalid object file");
20101 char ar_date[12]; /* file mtime */
20104 char ar_mode[8]; /* file mode, printed as octal */
20105 char ar_size[10]; /* file size, printed as decimal */
20158 /* load a '.a' file */
20212 the generated ELF file) */
20351 file->buf_ptr = parse_comment(file->buf_ptr);
20352 ch = file->buf_ptr[0];
20407 ch = file->buf_ptr[0];
20423 error_noabort("unexpected end of file");
20446 error_noabort("unexpected end of file");
20468 /* print the position in the source file of PC value 'pc' by reading
20946 /* find source file type with extension */
20956 /* open the file */
20957 saved_file = file;
20958 file = tcc_open(s1, filename);
20959 if (!file) {
20961 error_noabort("file '%s' not found", filename);
20968 /* C file assumed */
20982 ret = pe_load_def_file(s1, fdopen(file->fd, "rb"));
20986 fd = file->fd;
20987 /* assume executable format: auto guess file type */
21001 file->line_num = 0; /* do not display line number if error */
21024 error_noabort("unrecognized ELF file");
21028 file->line_num = 0; /* do not display line number if error */
21041 error_noabort("unrecognized file type");
21047 tcc_close(file);
21049 file = saved_file;
21259 /* extract the basename of a file */
21297 " -c compile only - generate an object file\n"
21454 /* add a new file */
21458 /* argv[0] will be this file */
21692 /* check -c consistency : only single file handled. XXX: checks file type */
21694 /* accepts only a single input file */