From 770c040b7ea961f5fa87658361a8384308204fa0 Mon Sep 17 00:00:00 2001 From: Kai Tietz Date: Tue, 25 May 2010 10:05:16 +0000 Subject: [PATCH] 2010-05-25 Kai Tietz * deffilep.y (opt_name): Allow leading dot. (dot_name): Likewise. (anylang_id): Likewise. --- ld/ChangeLog | 4 ++++ ld/deffilep.y | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/ld/ChangeLog b/ld/ChangeLog index 51248e7c7d2..b166e4a0331 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,5 +1,9 @@ 2010-05-25 Kai Tietz + + * deffilep.y (opt_name): Allow leading dot. + (dot_name): Likewise. + (anylang_id): Likewise. * emultempl/pep.em (gld_${EMULATION_NAME}_before_parse): Enable by default auto_import. (gld${EMULATION_NAME}_handle_option): Warn about v1. diff --git a/ld/deffilep.y b/ld/deffilep.y index 1104c49cc80..36214d9fc08 100644 --- a/ld/deffilep.y +++ b/ld/deffilep.y @@ -224,6 +224,12 @@ attr: ; opt_name: ID { $$ = $1; } + | '.' ID + { + char *name = xmalloc (strlen ($2) + 2); + sprintf (name, ".%s", $2); + $$ = name; + } | ID '.' ID { char *name = xmalloc (strlen ($1) + 1 + strlen ($3) + 1); @@ -252,6 +258,12 @@ opt_base: BASE '=' NUMBER { $$ = $3;} ; dot_name: ID { $$ = $1; } + | '.' ID + { + char *name = xmalloc (strlen ($2) + 2); + sprintf (name, ".%s", $2); + $$ = name; + } | dot_name '.' ID { char *name = xmalloc (strlen ($1) + 1 + strlen ($3) + 1); @@ -261,6 +273,12 @@ dot_name: ID { $$ = $1; } ; anylang_id: ID { $$ = $1; } + | '.' ID + { + char *id = xmalloc (strlen ($2) + 2); + sprintf (id, ".%s", $2); + $$ = id; + } | anylang_id '.' opt_digits opt_id { char *id = xmalloc (strlen ($1) + 1 + strlen ($3) + strlen ($4) + 1); -- 2.30.2