diff options
author | Nick Clifton <nickc@redhat.com> | 2001-07-31 13:49:39 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2001-07-31 13:49:39 +0000 |
commit | 594ef5dbd24189c126adbce7f3ea91e0a5fa64d9 (patch) | |
tree | b409136d38024895b030d1ddbc083436139f4d6b /binutils/doc | |
parent | f18ee7ef71510e52feaa80864c226ec18e2214e0 (diff) | |
download | gdb-594ef5dbd24189c126adbce7f3ea91e0a5fa64d9.zip gdb-594ef5dbd24189c126adbce7f3ea91e0a5fa64d9.tar.gz gdb-594ef5dbd24189c126adbce7f3ea91e0a5fa64d9.tar.bz2 |
Implement new switch --rename-section
Diffstat (limited to 'binutils/doc')
-rw-r--r-- | binutils/doc/binutils.texi | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/binutils/doc/binutils.texi b/binutils/doc/binutils.texi index 33ec43f..6d0ae90 100644 --- a/binutils/doc/binutils.texi +++ b/binutils/doc/binutils.texi @@ -941,6 +941,7 @@ objcopy [ -F @var{bfdname} | --target=@var{bfdname} ] [ --change-warnings ] [ --no-change-warnings ] [ --set-section-flags @var{section}=@var{flags} ] [ --add-section @var{sectionname}=@var{filename} ] + [ --rename-section @var{oldname}=@var{newname}[,@var{flags}] ] [ --change-leading-char ] [ --remove-leading-char ] [ --srec-len=@var{ival} ] [ --srec-forceS3 ] [ --redefine-sym @var{old}=@var{new} ] [ --weaken ] @@ -1210,6 +1211,24 @@ contents of the new section are taken from the file @var{filename}. The size of the section will be the size of the file. This option only works on file formats which can support sections with arbitrary names. +@item --rename-section @var{oldname}=@var{newname}[,@var{flags}] +Rename a section from @var{oldname} to @var{newname}, optionally +changing the section's flags to @var{flags} in the process. This has +the advantage over usng a linker script to perform the rename in that +the output stays as an object file and does not become a linked +executable. + +This option is particularly helpful when the input format is binary, +since this will always create a section called .data. If for example, +you wanted instead to create a section called .rodata containing binary +data you could use the following command line to achieve it: + +@smallexample + objcopy -I binary -O <output_format> -B <architecture> \ + --rename-section .data=.rodata,alloc,load,readonly,data,contents \ + <input_binary_file> <output_object_file> +@end smallexample + @item --change-leading-char Some object file formats use special characters at the start of symbols. The most common such character is underscore, which compilers |