diff options
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/obj-coff.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gas/config/obj-coff.c b/gas/config/obj-coff.c index aa621b9..59fe032 100644 --- a/gas/config/obj-coff.c +++ b/gas/config/obj-coff.c @@ -23,6 +23,7 @@ #define OBJ_HEADER "obj-coff.h" #include "as.h" +#include "safe-ctype.h" #include "obstack.h" #include "subsegs.h" @@ -1540,6 +1541,7 @@ coff_frob_file_after_relocs (void) 'r' for read-only data 's' for shared data (PE) 'y' for noread + '0' - '9' for power-of-two alignment (GNU extension). But if the argument is not a quoted string, treat it as a subsegment number. @@ -1552,6 +1554,7 @@ obj_coff_section (int ignore ATTRIBUTE_UNUSED) /* Strip out the section name. */ char *section_name; char c; + int alignment = -1; char *name; unsigned int exp; flagword flags, oldflags; @@ -1594,6 +1597,11 @@ obj_coff_section (int ignore ATTRIBUTE_UNUSED) attr != '"' && ! is_end_of_line[attr]) { + if (ISDIGIT (attr)) + { + alignment = attr - '0'; + continue; + } switch (attr) { case 'b': @@ -1670,6 +1678,8 @@ obj_coff_section (int ignore ATTRIBUTE_UNUSED) } sec = subseg_new (name, (subsegT) exp); + if (alignment >= 0) + sec->alignment_power = alignment; oldflags = bfd_get_section_flags (stdoutput, sec); if (oldflags == SEC_NO_FLAGS) |