Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Unified Diff: binutils/gas/config/obj-coff.c

Issue 3018030: [binutils] Bump binutils to 2.20.1 (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/nacl-toolchain.git
Patch Set: Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « binutils/gas/as.h ('k') | binutils/gas/config/tc-arm.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: binutils/gas/config/obj-coff.c
diff --git a/binutils/gas/config/obj-coff.c b/binutils/gas/config/obj-coff.c
index 271b01ef3dc3ff3163f4b791ee135de5a169a6f0..8e22279f8be217c0cefbf241f87313f81612bdaa 100644
--- a/binutils/gas/config/obj-coff.c
+++ b/binutils/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"
@@ -1543,6 +1544,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.
@@ -1555,6 +1557,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;
@@ -1597,6 +1600,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':
@@ -1673,6 +1681,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)
« no previous file with comments | « binutils/gas/as.h ('k') | binutils/gas/config/tc-arm.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698