diff options
author | Dave Korn <dave.korn@artimi.com> | 2009-05-19 16:08:08 +0000 |
---|---|---|
committer | Dave Korn <dave.korn@artimi.com> | 2009-05-19 16:08:08 +0000 |
commit | c1711530e652a14bc0df9b603c73e350b5dfe5ec (patch) | |
tree | f0e82c9c384277dc508547d786bbc912eac7edf8 /ld/deffilep.y | |
parent | fbdebf465713844d23625ae09e0ae4995418328b (diff) | |
download | gdb-c1711530e652a14bc0df9b603c73e350b5dfe5ec.zip gdb-c1711530e652a14bc0df9b603c73e350b5dfe5ec.tar.gz gdb-c1711530e652a14bc0df9b603c73e350b5dfe5ec.tar.bz2 |
==> bfd/ChangeLog <==
2009-05-19 Dave Korn <dave.korn.cygwin@gmail.com>
* cofflink.c (process_embedded_commands): Ignore "-aligncomm".
==> gas/ChangeLog <==
2009-05-19 Dave Korn <dave.korn.cygwin@gmail.com>
* NEWS: Mention new feature.
* config/obj-coff.c (obj_coff_common_parse): New function.
(obj_coff_comm): Likewise.
(coff_pseudo_table): Override default ".comm" definition on PE.
* doc/as.texinfo: Document new feature.
==> gas/testsuite/ChangeLog <==
2009-05-19 Dave Korn <dave.korn.cygwin@gmail.com>
* gas/pe/: New directory for PE format-specific tests.
* gas/pe/aligncomm-a.d: New test pattern file.
* gas/pe/aligncomm-a.s: New test source file.
* gas/pe/aligncomm-b.d: New test pattern file.
* gas/pe/aligncomm-b.s: New test source file.
* gas/pe/aligncomm-c.d: New test pattern file.
* gas/pe/aligncomm-c.s: New test source file.
* gas/pe/aligncomm-d.d: New test pattern file.
* gas/pe/aligncomm-d.s: New test source file.
* gas/pe/pe.exp: New test control script.
* lib/gas-defs.exp (is_pecoff_format): New function.
==> ld/ChangeLog <==
2009-05-19 Dave Korn <dave.korn.cygwin@gmail.com>
* NEWS: Mention new feature.
* deffile.h (def_file_aligncomm): Add new struct definition.
(def_file): Add new def_file_aligncomm member.
* deffilep.y (%token): Add new ALIGNCOMM token.
(command): Add production rule for ALIGNCOMM.
(def_file_free): Free any chained def_file_aligncomm structs.
(diropts[]): Add entry for '-aligncomm' .drectve command.
(def_aligncomm): New grammar function.
* ld.texinfo: Document new feature.
* pe-dll.c (process_def_file): Rename from this ...
(process_def_file_and_drectve): ... to this, updating all callers,
and process any aligncomms chained to the def file after scanning
all .drectve sections.
(generate_edata): Updated to match.
(pe_dll_build_sections): Likewise.
==> ld/testsuite/ChangeLog <==
2009-05-19 Dave Korn <dave.korn.cygwin@gmail.com>
* ld-pe/aligncomm-1.c: New test source file.
* ld-pe/aligncomm-2.c: Likewise.
* ld-pe/aligncomm-3.c: Likewise.
* ld-pe/aligncomm-4.c: Likewise.
* ld-pe/aligncomm.d: New test pattern file.
* ld-pe/direct.exp: Deleted, and content moved into ...
* ld-pe/pe-run.exp: ... New common file for all PE run tests.
* ld-pe/vers-script.exp: Deleted, and content merged into ...
* ld-pe/pe-compile.exp: ... New common file for PE tests needing
a compiler, adding aligned common tests.
* ld-pe/pe.exp: Update header comment.
Diffstat (limited to 'ld/deffilep.y')
-rw-r--r-- | ld/deffilep.y | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/ld/deffilep.y b/ld/deffilep.y index 11c075d..5f02727 100644 --- a/ld/deffilep.y +++ b/ld/deffilep.y @@ -89,6 +89,7 @@ static void def_section_alt (const char *, const char *); static void def_stacksize (int, int); static void def_version (int, int); static void def_directive (char *); +static void def_aligncomm (char *str, int align); static int def_parse (void); static int def_error (const char *); static int def_lex (void); @@ -106,7 +107,7 @@ static const char *lex_parse_string_end = 0; %token NAME LIBRARY DESCRIPTION STACKSIZE_K HEAPSIZE CODE DATAU DATAL %token SECTIONS EXPORTS IMPORTS VERSIONK BASE CONSTANTU CONSTANTL -%token PRIVATEU PRIVATEL +%token PRIVATEU PRIVATEL ALIGNCOMM %token READ WRITE EXECUTE SHARED NONAMEU NONAMEL DIRECTIVE %token <id> ID %token <number> NUMBER @@ -134,6 +135,7 @@ command: | VERSIONK NUMBER { def_version ($2, 0);} | VERSIONK NUMBER '.' NUMBER { def_version ($2, $4);} | DIRECTIVE ID { def_directive ($2);} + | ALIGNCOMM ID ',' NUMBER { def_aligncomm ($2, $4);} ; @@ -379,6 +381,14 @@ def_file_free (def_file *def) free (m); } + while (def->aligncomms) + { + def_file_aligncomm *c = def->aligncomms; + def->aligncomms = def->aligncomms->next; + free (c->symbol_name); + free (c); + } + free (def); } @@ -573,6 +583,7 @@ diropts[] = { "-stack", STACKSIZE_K }, { "-attr", SECTIONS }, { "-export", EXPORTS }, + { "-aligncomm", ALIGNCOMM }, { 0, 0 } }; @@ -831,6 +842,18 @@ def_directive (char *str) d->len = strlen (str); } +static void +def_aligncomm (char *str, int align) +{ + def_file_aligncomm *c = xmalloc (sizeof (def_file_aligncomm)); + + c->symbol_name = xstrdup (str); + c->alignment = (unsigned int) align; + + c->next = def->aligncomms; + def->aligncomms = c; +} + static int def_error (const char *err) { |