Red Hat ENTERPRISE LINUX 4 - USING BINUTILS Manuale Utente Pagina 26

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 80
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 25
20 Chapter 4. objcopy
-add-gnu-debuglink=path-to-file
Creates a .gnu_debuglink section which contains a reference to path-to-file and adds it to
the output file.
-only-keep-debug
Strip a file, removing any sections that would be stripped by -strip-debug and leaving the
debugging sections.
The intention is that this option will be used in conjunction with -add-gnu-debuglink to
create a two part executable. One a stripped binary which will occupy less space in RAM and
in a distribution and the second a debugging information file which is only needed if debugging
abilities are required. The suggested procedure to create these files is as follows:
1. Link the executable as normal. Assuming that is is called foo then...
2. Run objcopy -only-keep-debug foo foo.d/jointfilesconvert/411015/bg to create a file containing the debug-
ging info.
3. Run objcopy -strip-debug foo to create a stripped executable.
4. Run objcopy -add-gnu-debuglink=foo.d/jointfilesconvert/411015/bg foo to add a link to the debugging info
into the stripped executable.
Note - the choice of .d/jointfilesconvert/411015/bg as an extension for the debug info file is arbitrary. Also the
-only-keep-debug step is optional. You could instead do this:
1. Link the executable as normal.
2. Copy foo to foo.full
3. Run objcopy -strip-debug foo
4. Run objcopy -add-gnu-debuglink=foo.full foo
ie the file pointed to by the -add-gnu-debuglink can be the full executable. It does not have
to be a file created by the -only-keep-debug switch.
-V
-version
Show the version number of objcopy.
-v
-verbose
Verbose output: list all object files modified. In the case of archives, objcopy -V lists all mem-
bers of the archive.
-help
Show a summary of the options to objcopy.
-info
Display a list showing all architectures and object formats available.
Vedere la pagina 25
1 2 ... 21 22 23 24 25 26 27 28 29 30 31 ... 79 80

Commenti su questo manuale

Nessun commento