Lines Matching refs:FILE
3 This file is part of Red Hat elfutils.
57 static void print_version (FILE *stream, struct argp_state *state);
58 void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version;
73 { "output", 'o', "FILE", 0, N_("Place stripped output into FILE"), 0 },
74 { NULL, 'f', "FILE", 0, N_("Extract the removed sections into FILE"), 0 },
75 { NULL, 'F', "FILE", 0, N_("Embed name FILE instead of -f argument"), 0 },
96 static const char args_doc[] = N_("[FILE...]");
108 /* Print symbols in file named FNAME. */
111 /* Handle one ELF file. */
124 /* Name of the output file. */
127 /* Name of the debug output file. */
130 /* Name to pretend the debug output file has. */
133 /* If true output files shall have same date as the input file. */
182 input file. */
186 Only one input file allowed together with '-o' and '-f'"));
200 print_version (FILE *stream, struct argp_state *state __attribute__ ((unused)))
288 now. We cannot use fstat() after opening the file since the open
297 error (0, errno, gettext ("cannot stat input file '%s'"), fname);
307 /* Open the file. */
317 same file. */
321 error (0, errno, gettext ("cannot stat input file '%s'"), fname);
346 the output to a specific file. */
358 error (0, 0, gettext ("%s: File format not recognized"), fname);
395 Elf32_Word idx; /* Index in new file. */
418 /* Create the full name of the file. */
426 /* If we are not replacing the input file open a new file here. */
453 /* Open the additional file the debug information will be stored in. */
456 /* Create a temporary file name. We do not want to overwrite
457 the debug file if the file would not contain any
473 /* Get the information from the old file. */
484 /* We now create a new ELF descriptor for the same file. We
497 error (0, 0, gettext ("cannot create new file '%s': %s"),
515 /* Also create an ELF descriptor for the debug file */
521 error (0, 0, gettext ("cannot create new file '%s': %s"),
549 table. Maybe some weird tool created an ELF file without one.
581 error (0, 0, gettext ("illformed file '%s'"), fname);
787 original table in the debug file. */
828 /* This section is being preserved in the debug file.
833 file's .data pointer. Below, we'll copy the section
858 /* Copy the removed sections to the debug output file.
859 The ones that are not removed in the stripped file are SHT_NOBITS. */
867 gettext ("while generating output file: %s"),
875 /* Set the section header in the new file. */
884 /* Get the data from the old file if necessary. */
892 /* Set the data. This is done by copying from the old file. */
898 before we write out the file. */
912 libelf from the old file. */
954 error (EXIT_FAILURE, 0, gettext ("while generating output file: %s"),
968 /* Create the reference to the file with the debug info. */
983 /* We set the offset to zero here. Before we write the ELF file the
1014 We'll fill this in when we have written the debug file. */
1038 /* We set the offset to zero here. Before we write the ELF file the
1077 /* Update the section header from the input file. Some fields
1099 /* Get the data from the old file if necessary. We already
1110 /* Set the data. This is done by copying from the old file. */
1278 /* Set the section header in the new file. */
1297 file so that the section headers match in sh_size. */
1315 relocation section in a separate debug file, we must fix up
1330 duplicated in the separate debug file and this section
1396 /* The hash section in the new file. */
1523 /* The symbol version section in the new file. */
1576 we can actually write out the debug file. */
1588 /* Finally write the file. */
1597 /* Create the real output file. First rename, then change the
1607 /* The temporary file does not exist anymore. */
1628 libelf from the old file. */
1671 /* We have everything from the old file. */
1674 error (0, 0, gettext ("%s: error while reading the file: %s"),
1680 relocatable object file. */
1685 /* Finally write the file. */
1737 /* Close debug file descriptor, if opened */
1757 /* Close the file descriptor if we created a new file. */
1774 /* Create the full name of the file. */