aboutsummaryrefslogtreecommitdiff
path: root/gas/as.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2016-06-27 13:49:09 +0100
committerNick Clifton <nickc@redhat.com>2016-06-27 13:51:06 +0100
commit2edb36e77f3ff468eac2b2c8954e9c031148e724 (patch)
treef408bcf2dfebe45d565e12499f25b7dcc3c0f2f2 /gas/as.c
parentc9301e31817019c38ab52da0e72fa1e3bf75332c (diff)
downloadgdb-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/as.c')
-rw-r--r--gas/as.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gas/as.c b/gas/as.c
index badeac9..8784fb4 100644
--- a/gas/as.c
+++ b/gas/as.c
@@ -342,6 +342,8 @@ Options:\n\
fprintf (stream, _("\
-nocpp ignored\n"));
fprintf (stream, _("\
+ -no-pad-sections do not pad the end of sections to alignment boundaries\n"));
+ fprintf (stream, _("\
-o OBJFILE name the object-file output OBJFILE (default a.out)\n"));
fprintf (stream, _("\
-R fold data section into text section\n"));
@@ -479,7 +481,8 @@ parse_args (int * pargc, char *** pargv)
OPTION_REDUCE_MEMORY_OVERHEADS,
OPTION_WARN_FATAL,
OPTION_COMPRESS_DEBUG,
- OPTION_NOCOMPRESS_DEBUG
+ OPTION_NOCOMPRESS_DEBUG,
+ OPTION_NO_PAD_SECTIONS /* = STD_BASE + 40 */
/* When you add options here, check that they do
not collide with OPTION_MD_BASE. See as.h. */
};
@@ -542,6 +545,7 @@ parse_args (int * pargc, char *** pargv)
,{"MD", required_argument, NULL, OPTION_DEPFILE}
,{"mri", no_argument, NULL, 'M'}
,{"nocpp", no_argument, NULL, OPTION_NOCPP}
+ ,{"no-pad-sections", no_argument, NULL, OPTION_NO_PAD_SECTIONS}
,{"no-warn", no_argument, NULL, 'W'}
,{"reduce-memory-overheads", no_argument, NULL, OPTION_REDUCE_MEMORY_OVERHEADS}
,{"statistics", no_argument, NULL, OPTION_STATISTICS}
@@ -637,6 +641,10 @@ parse_args (int * pargc, char *** pargv)
case OPTION_NOCPP:
break;
+ case OPTION_NO_PAD_SECTIONS:
+ do_not_pad_sections_to_alignment = 1;
+ break;
+
case OPTION_STATISTICS:
flag_print_statistics = 1;
break;