diff options
author | Dave Korn <dave.korn@artimi.com> | 2010-01-27 22:01:38 +0000 |
---|---|---|
committer | Dave Korn <dave.korn@artimi.com> | 2010-01-27 22:01:38 +0000 |
commit | 31907d5e90e584f98b90092bf85e66e7b4b4b721 (patch) | |
tree | 5f84803b0f6ae3acab3e95bda0150dae01d00164 /gas/config | |
parent | 40b27cdc5906e0836e8791dce39c8608ee5f858d (diff) | |
download | ppe42-binutils-31907d5e90e584f98b90092bf85e66e7b4b4b721.tar.gz ppe42-binutils-31907d5e90e584f98b90092bf85e66e7b4b4b721.zip |
gas/ChangeLog:
* NEWS: Mention new feature.
* config/obj-coff.c (obj_coff_section): Accept digits and use
to override default section alignment power if specified.
* doc/as.texinfo (.section directive): Update documentation.
gas/testsuite/ChangeLog:
* gas/pe/section-align-1.s: New test source file.
* gas/pe/section-align-1.d: Likewise control script.
* gas/pe/section-align-2.s: Likewise ...
* gas/pe/section-align-2.d: ... and likewise.
* gas/pe/pe.exp: Invoke new testcases.
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 aa621b96d5..59fe032e10 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) |