From: Ian Lance Taylor Date: Tue, 25 Oct 1994 20:22:32 +0000 (+0000) Subject: * objcopy.c (gap_fill): Explicitly initialize, for clarity. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=33e0a06df82a6048ebbebed36e7f17f09f1742b4;p=binutils-gdb.git * objcopy.c (gap_fill): Explicitly initialize, for clarity. (pad_to_set, pad_to): New static variables. (copy_options): Accept --pad-to. (copy_usage): Mention --pad-to. (copy_object): Support --pad-to. (compare_section_vma): Sort non loadable sections to the front. Sort sections with the same VMA by size. (copy_main): Handle --pad-to. * binutils.texi, objcopy.1: Document --pad-to. --- diff --git a/binutils/ChangeLog b/binutils/ChangeLog index fcb01fab9a0..c76f5c1461c 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,15 @@ +Tue Oct 25 16:19:25 1994 Ian Lance Taylor + + * objcopy.c (gap_fill): Explicitly initialize, for clarity. + (pad_to_set, pad_to): New static variables. + (copy_options): Accept --pad-to. + (copy_usage): Mention --pad-to. + (copy_object): Support --pad-to. + (compare_section_vma): Sort non loadable sections to the front. + Sort sections with the same VMA by size. + (copy_main): Handle --pad-to. + * binutils.texi, objcopy.1: Document --pad-to. + Thu Oct 20 13:51:31 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) * objcopy.c (gap_fill_set, gap_fill): New static variables. diff --git a/binutils/binutils.texi b/binutils/binutils.texi index 6776520e507..30ea18bf350 100644 --- a/binutils/binutils.texi +++ b/binutils/binutils.texi @@ -747,8 +747,9 @@ objcopy [ -F @var{bfdname} | --target=@var{bfdname} ] [ -b @var{byte} | --byte=@var{byte} ] [ -i @var{interleave} | --interleave=@var{interleave} ] [ -R @var{sectionname} | --remove-section=@var{sectionname} ] - [ --gap-fill=@var{val} ] [ --set-start=@var{val} ] - [ --adjust-start=@var{incr} ] [ --adjust-vma=@var{incr} ] + [ --gap-fill=@var{val} ] [ --pad-to=@var{address} ] + [ --set-start=@var{val} ] [ --adjust-start=@var{incr} ] + [ --adjust-vma=@var{incr} ] [ --adjust-section-vma=@var{section}@{=,+,-@}@var{val} ] [ --adjust-warnings ] [ --no-adjust-warnings ] [ -v | --verbose ] [ -V | --version ] [ --help ] @@ -851,6 +852,11 @@ Fill gaps between sections with @var{val}. This is done by increasing the size of the section with the lower address, and filling in the extra space created with @var{val}. +@item --pad-to @var{address} +Pad the output file up to the virtual address @var{address}. This is +done by increasing the size of the last section. The extra space is +filled in with the value specified by @samp{--gap-fill} (default zero). + @item --set-start @var{val} Set the address of the new file to @var{val}. Not all object file formats support setting the start address. diff --git a/binutils/objcopy.1 b/binutils/objcopy.1 index 652a9d82f6f..0bf5727be64 100644 --- a/binutils/objcopy.1 +++ b/binutils/objcopy.1 @@ -23,15 +23,16 @@ objcopy \- copy and translate object files .RB "[\|" \-g\ |\ \-\-strip\-debug\fR "\|]" .RB "[\|" \-x\ |\ \-\-discard\-all\fR "\|]" .RB "[\|" \-X\ |\ \-\-discard\-locals\fR "\|]" -.RB "[\|" \-b\ \fIbyte\fP |\ \-\-byte=\fIbyte\fP "\|]" -.RB "[\|" \-i\ \fIinterleave\fP |\ \-\-interleave=\fIinterleave\fP "\|]" -.RB "[\|" \-\-gap\-fill=\fIval\fP "\|]" -.RB "[\|" \-\-set\-start=\fIval\fP "\|]" -.RB "[\|" \-\-adjust\-start=\fIincr\fP "\|]" -.RB "[\|" \-\-adjust\-vma=\fIincr\fP "\|]" -.RB "[\|" \-\-adjust\-section\-vma=\fIsection{=,+,-}val\fP "\|]" -.RB "[\|" \-\-adjust\-warnings "\|]" -.RB "[\|" \-\-no\-adjust\-warnings "\|]" +.RB "[\|" \-b\ \fIbyte\fR\ |\ \fB\-\-byte=\fIbyte\fR "\|]" +.RB "[\|" \-i\ \fIinterleave\fR\ |\ \fB\-\-interleave=\fIinterleave\fR "\|]" +.RB "[\|" \-\-gap\-fill=\fIval\fR "\|]" +.RB "[\|" \-\-pad\-to=\fIaddress\fR "\|]" +.RB "[\|" \-\-set\-start=\fIval\fR "\|]" +.RB "[\|" \-\-adjust\-start=\fIincr\fR "\|]" +.RB "[\|" \-\-adjust\-vma=\fIincr\fR "\|]" +.RB "[\|" \-\-adjust\-section\-vma=\fIsection{=,+,-}val\fR "\|]" +.RB "[\|" \-\-adjust\-warnings\fR "\|]" +.RB "[\|" \-\-no\-adjust\-warnings\fR "\|]" .RB "[\|" \-v\ |\ \-\-verbose\fR "\|]" .RB "[\|" \-V\ |\ \-\-version\fR "\|]" .RB "[\|" \-\-help\fR "\|]" @@ -142,6 +143,12 @@ Fill gaps between sections with \fIval\fP. This is done by increasing the size of the section with the lower address, and filling in the extra space created with \fIval\fP. .TP +.B \-\-pad\-to=\fIaddress +Pad the output file up to the virtual address \fIaddress\fP. This is +done by increasing the size of the last section. The extra space is +filled in with the value specified by \fB\-\-gap\-fill\fP (default +zero). +.TP .B \fB\-\-set\-start=\fIval Set the start address of the new file to \fIval\fP. Not all object file formats support setting the start address.