diff options
author | Nick Clifton <nickc@redhat.com> | 2016-06-27 13:49:09 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2016-06-27 13:51:06 +0100 |
commit | 2edb36e77f3ff468eac2b2c8954e9c031148e724 (patch) | |
tree | f408bcf2dfebe45d565e12499f25b7dcc3c0f2f2 /gas/doc | |
parent | c9301e31817019c38ab52da0e72fa1e3bf75332c (diff) | |
download | gdb-2edb36e77f3ff468eac2b2c8954e9c031148e724.zip gdb-2edb36e77f3ff468eac2b2c8954e9c031148e724.tar.gz gdb-2edb36e77f3ff468eac2b2c8954e9c031148e724.tar.bz2 |
Add command line option to stop the assembler from padding the end of sections to their alignment boundary.
PR gas/20247
* as.h (do_not_pad_sections_to_alignment): New global variable.
* as.c (show_usage): Add --no-pad-sections.
(parse_args): Likewise.
* write.c (size_seg): Skip padding the end of the section if
requested from the command line.
(SUB_SEGMENT_ALIGN): Likewise.
* doc/as.texinfo: Document the new option.
* NEWS: Mention the new feature.
* testsuite/gas/elf/section11.s: New test.
* testsuite/gas/elf/section11.d: New test driver.
* testsuite/gas/elf/elf.exp: Run the new test.
Diffstat (limited to 'gas/doc')
-rw-r--r-- | gas/doc/as.texinfo | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/gas/doc/as.texinfo b/gas/doc/as.texinfo index 6d2c325..9ebfda0 100644 --- a/gas/doc/as.texinfo +++ b/gas/doc/as.texinfo @@ -235,6 +235,7 @@ gcc(1), ld(1), and the Info entries for @file{binutils} and @file{ld}. [@b{-K}] [@b{-L}] [@b{--listing-lhs-width}=@var{NUM}] [@b{--listing-lhs-width2}=@var{NUM}] [@b{--listing-rhs-width}=@var{NUM}] [@b{--listing-cont-lines}=@var{NUM}] [@b{--keep-locals}] + [@b{--no-pad-sections}] [@b{-o} @var{objfile}] [@b{-R}] [@b{--hash-size}=@var{NUM}] [@b{--reduce-memory-overheads}] [@b{--statistics}] @@ -773,6 +774,11 @@ Set the maximum width of an input source line, as displayed in a listing, to Set the maximum number of lines printed in a listing for a single line of input to @var{number} + 1. +@item --no-pad-sections +Stop the assembler for padding the ends of output sections to the alignment +of that section. The default is to pad the sections, but this can waste space +which might be needed on targets which have tight memory constraints. + @item -o @var{objfile} Name the object-file output from @command{@value{AS}} @var{objfile}. @@ -2158,6 +2164,7 @@ assembler.) * listing:: --listing-XXX to configure listing output * M:: -M or --mri to assemble in MRI compatibility mode * MD:: --MD for dependency tracking +* no-pad-sections:: --no-pad-sections to stop section padding * o:: -o to name the object file * R:: -R to join data and text sections * statistics:: --statistics to see statistics about assembly @@ -2494,6 +2501,15 @@ The rule is written to the file named in its argument. This feature is used in the automatic updating of makefiles. +@node no-pad-sections +@section Output Section Padding +@kindex --no-pad-sections +@cindex output section padding +Normally the assembler will pad the end of each output section up to its +alignment boundary. But this can waste space, which can be significant on +memory constrained targets. So the @option{--no-pad-sections} option will +disable this behaviour. + @node o @section Name the Object File: @option{-o} @@ -2680,7 +2696,7 @@ do include file processing with the @code{.include} directive (@pxref{Include,,@code{.include}}). You can use the @sc{gnu} C compiler driver to get other ``CPP'' style preprocessing by giving the input file a @samp{.S} suffix. @xref{Overall Options, ,Options Controlling the Kind of -Output, gcc.info, Using GNU CC} . +Output, gcc info, Using GNU CC}. Excess whitespace, comments, and character constants cannot be used in the portions of the input text that are not |