Lines Matching defs:to

1 /* objcopy.c -- copy object file from input to output, optionally massaging it.
17 along with this program; if not, write to the Free Software
57 /* A list to support redefine_sym. */
84 /* List of sections to be renamed. */
92 static int interleave = 0; /* Initialised to 4 in copy_main(). */
112 /* Which symbols to remove. */
122 /* Which local symbols to remove. Overrides STRIP_ALL. */
125 /* Structure used to hold lists of sections and actions to take. */
128 struct section_list * next; /* Next section to change. */
132 unsigned int context; /* What to do with matching sections. */
144 bfd_vma vma_val; /* Amount to change by or set to. */
145 bfd_vma lma_val; /* Amount to change by or set to. */
146 flagword flags; /* What to set the section flags to. */
151 /* TRUE if some sections are to be removed. */
154 /* TRUE if only some sections are to be copied. */
157 /* Changes to the start address. */
162 /* Changes to section addresses. */
169 /* Pad to a given address. */
176 /* Output BFD flags user wants to set or clear */
180 /* List of sections to add. */
183 /* Next section to add. */
185 /* Name of section to add. */
197 /* List of sections to add to the output BFD. */
200 /* List of sections to update in the output BFD. */
203 /* List of sections to dump from the output BFD. */
206 /* If non-NULL the argument to --add-gnu-debuglink.
207 This should be the filename to store in the .gnu_debuglink section. */
210 /* Whether to convert debugging information. */
213 /* Whether to compress/decompress DWARF debug sections. */
224 /* Whether to generate ELF common symbols with the STT_COMMON type. */
227 /* Whether to change the leading character in symbol names. */
230 /* Whether to remove the leading character from global symbol names. */
233 /* Whether to permit wildcard in symbol comparison. */
239 /* List of symbols to strip, keep, localize, keep-global, weaken,
270 /* For Coff objects, we may want to allow or disallow long section names,
279 /* The default long section handling mode is to preserve them.
351 /* Options to handle if running as "strip". */
385 /* Options to handle if running as "objcopy". */
446 {"pad-to", required_argument, 0, OPTION_PAD_TO},
492 -1 means if we should use argv[0] to decide. */
499 /* Restrict the generation of Srecords to type S3 only.
527 -F --target <bfdname> Set both input and output format to <bfdname>\n\
529 -p --preserve-dates Copy modified/access timestamps to the output\n"));
544 --add-gnu-debuglink=<file> Add section .gnu_debuglink linking to <file>\n\
561 -L --localize-symbol <name> Force symbol <name> to be marked as a local\n\
562 --globalize-symbol <name> Force symbol <name> to be marked as a global\n\
564 -W --weaken-symbol <name> Force symbol <name> to be marked as a weak\n\
565 --weaken Force all global symbols to be marked as weak\n\
573 --pad-to <addr> Pad the last section up to address <addr>\n\
574 --set-start <addr> Set the start address to <addr>\n\
576 Add <incr> to the start address\n\
578 Add <incr> to LMA, VMA and start addresses\n\
588 Set section <name>'s properties to <flags>\n\
589 --add-section <name>=<file> Add section <name> found in <file> to output\n\
594 --rename-section <old>=<new>[,<flags>] Rename section <old> to <new>\n\
600 --redefine-sym <old>=<new> Redefine symbol name <old> to <new>\n\
604 --srec-forceS3 Restrict the type of generated Srecords to S3\n\
620 --prefix-symbols <prefix> Add <prefix> to start of every symbol name\n\
621 --prefix-sections <prefix> Add <prefix> to start of every section name\n\
623 Add <prefix> to start of every allocatable\n\
625 --file-alignment <num> Set PE file alignment to <num>\n\
626 --heap <reserve>[,<commit>] Set PE reserve/commit heap to <reserve>/\n\
628 --image-base <address> Set PE image base to <address>\n\
629 --section-alignment <num> Set PE section alignment to <num>\n\
630 --stack <reserve>[,<commit>] Set PE reserve/commit stack to <reserve>/\n\
633 Set PE subsystem to <name> [& <version>]\n\
647 fprintf (stream, _("Report bugs to %s\n"), REPORT_BUGS_TO);
660 -F --target=<bfdname> Set both input and output format to <bfdname>\n\
661 -p --preserve-dates Copy modified/access timestamps to the output\n\
698 fprintf (stream, _("Report bugs to %s\n"), REPORT_BUGS_TO);
836 We need to be careful in how we match section names because of the support
846 .debug_ranges and .debug_aranges sections will have their address set to
849 When adding the section name patterns to the section list we need to make
854 When matching real section names to the section list we make use of the
970 /* Add a symbol to strip_specific_list. */
978 /* Add symbols listed in `filename' to strip_specific_list. */
1047 loop to find the real end of the line. */
1061 then add it to the list. */
1087 /* Advance line pointer to end of line. The 'eol ++' in the for
1088 loop above will then advance us to the start of the next line. */
1145 /* Return a pointer to the symbol used as a signature for GROUP. */
1242 /* By default we don't want to strip .reloc section.
1277 If we are going to strip the group signature symbol, then
1317 tools, which it is not sensible to keep. */
1385 /* Choose which symbol entries to copy; put the result in OSYMS.
1387 Return the number of symbols to print. */
1393 asymbol **from = isyms, **to = osyms;
1415 to[dst_count++] = create_new_symbol (ptr, obfd);
1495 /* Global symbols in $idata sections need to be retained
1521 /* There are multiple ways to set 'keep' above, but if it
1573 to[dst_count++] = sym;
1588 to[dst_count++] = create_new_symbol (ptr, obfd);
1594 to[dst_count] = NULL;
1613 /* Add a node to a symbol redefine list. */
1643 from the file, and add them to the symbol redefine list. */
1722 /* Append the redefinition to the list. */
1786 printf (_("copy from `%s' [unknown] to `%s' [unknown]\n"),
1816 /* We should at least to be able to read it back when copying an
1845 /* PR 17636: Call non-fatal so that we return to our parent who
1846 may need to tidy temporary files. */
1847 non_fatal (_("Unable to change endianness of input file(s)"));
1883 printf (_("copy from `%s' [%s] to `%s' [%s]\n"),
1899 need to be set for a core file. */
1920 /* Copy architecture of input file to output file. */
1940 non_fatal (_("Unable to recognise the format of the input file `%s'"),
2196 non_fatal (_("error writing section contents to %s (error: %s)"),
2215 allow the rest of the copy to complete. */
2236 have no way to distinguish PE from COFF here. */
2264 /* FIXME: We ought to be using
2269 it is easier just to hard code it. */
2272 /* Umm, not sure what to do in this case. */
2287 the last section to a specified address. We do this by
2289 increasing the section sizes as required to fill the gaps.
2418 /* This has to happen before section positions are set. */
2421 /* This has to happen after the symbol table has been set. */
2515 /* Allow the BFD backend to copy any private data it understands
2516 from the input BFD to the output BFD. This is done last to
2517 permit the routine to look at the filtered symbol table, which is
2526 /* Switch to the alternate machine code. We have to do this at the
2549 contents to temp file, and keep the temp file handle.
2570 /* Make a temp directory to hold the contents. */
2659 _("Unable to recognise the format of file"));
2711 /* Open the newly output file and attach to our list. */
2761 /* This is only relevant to Coff targets. */
2792 /* To allow us to do "strip *" without dying on the first
2886 state. So use bfd_close_all_done to avoid the possibility of
2916 /* Report the object error in preference to the core error. */
2937 /* Add a name to the section renaming list. */
2969 RETURNED_FLAGS if non-NULL to the flags to be used for this section. */
2988 /* Once each of the sections is copied, we may still need to do some
2994 /* Allow the BFD backend to copy any private data it understands
2995 from the input section to the output section. */
3066 /* Twiddle the input section flags so that it seems to
3078 err = _("failed to create output section");
3093 err = _("failed to set size");
3112 err = _("failed to set vma");
3132 may have to recompute the header for the file as well. */
3137 err = _("failed to set alignment");
3147 /* This used to be mangle_section; we do here to avoid using
3165 /* Allow the BFD backend to copy any private data it understands
3166 from the input section to the output section. */
3169 err = _("failed to copy private data");
3217 /* Add section SECTION_PATTERN to the list of sections that will have their
3239 A special case is detected here, if the user asks to remove a relocation
3257 /* Copy relocations in input section ISECTION of IBFD to an output
3275 /* Core files and DWO files do not need to be relocated. */
3349 to an output section with the same name in OBFD. */
3388 must be a multiple of the number of bytes to swap. */
3405 /* User must pad the section up in order to do this. */
3414 char *to = (char *) memhunk;
3423 *to++ = from[i];
3445 /* We don't permit the user to turn off the SEC_HAS_CONTENTS
3447 back again. However, we do permit them to turn on the
3448 SEC_HAS_CONTENTS flag, and take it to mean that the section
3463 /* Get all the sections. This is used when --gap-fill or --pad-to is
3476 --gap-fill or --pad-to is used. We force non loadable or empty
3477 sections to the front, where they are easier to ignore. */
3486 /* Sort non loadable sections to the front. */
3608 the next thing the caller is going to do is copy over the
3609 real sections. We may someday have to split the contents
3624 _("don't know how to write debugging information for %s"),
3747 /* Default is to strip all symbols. */
3774 /* No need to check the return value of stat().
3787 _("could not create temporary file to hold stripped copy"));
3904 /* Convert EFI target to PEI target. */
3915 /* Change ia32 to i386. */
3922 /* Change x86_64 to x86-64. */
3927 /* Allocate and return a pointer to a struct section_add, initializing the
3929 The returned structure will have its next pointer set to NEXT. The
3931 parsed, and is only used if an error needs to be reported. */
3955 /* Load the file specified in PA, allocating memory to hold the file
3956 contents, and store a pointer to the allocated memory in the contents
4388 non_fatal (_("Warning: truncating gap-fill from 0x%s to 0x%x"),
4400 pad_to = parse_vma (optarg, "--pad-to");
4567 fatal (_("unable to parse alternative machine code"));
4616 fatal (_("number of bytes to reverse must be positive and even"));
4706 fatal (_("interleave width must be less than or equal to interleave - byte`"));
4717 /* Default is to strip no symbols. */
4724 /* Convert input EFI target to PEI target. */
4741 /* Convert output EFI target to PEI target. */