public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [patch ld]: deffilep.y needs support for leading dots for symbol  names
@ 2010-05-19 20:43 Kai Tietz
  2010-05-25  9:33 ` Nick Clifton
  0 siblings, 1 reply; 3+ messages in thread
From: Kai Tietz @ 2010-05-19 20:43 UTC (permalink / raw)
  To: Binutils

[-- Attachment #1: Type: text/plain, Size: 665 bytes --]

Hello,

this patch addresses the case that for x64 (without leading
underscores and I assume the same can happen for arm), that a symbol
gets prefixed by a dot. At the moment our deffilep parser doesn't
supported this. See also for this
http://sourceware.org/bugzilla/show_bug.cgi?id=11612.

ChangeLog

2010-05-19  Kai Tietz

        * deffilep.y (opt_name): Allow leading dot.
        (dot_name): Likewise.
        (anylang_id): Likewise.

Patch tested for x86_64-pc-mingw32, i686-pc-mingw32, and
i686-pc-cygwin. Ok for apply?

Regards,
Kai
-- 
|  (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination

[-- Attachment #2: aligncomm.diff --]
[-- Type: application/octet-stream, Size: 1029 bytes --]

Index: src/ld/deffilep.y
===================================================================
--- src.orig/ld/deffilep.y	2009-12-17 20:33:59.000000000 +0100
+++ src/ld/deffilep.y	2010-05-19 22:33:24.985755000 +0200
@@ -224,6 +224,12 @@
 	;
 
 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 @@
 	;
 
 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 @@
 	;
 
 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);

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch ld]: deffilep.y needs support for leading dots for symbol  names
  2010-05-19 20:43 [patch ld]: deffilep.y needs support for leading dots for symbol names Kai Tietz
@ 2010-05-25  9:33 ` Nick Clifton
  2010-05-25 10:05   ` Kai Tietz
  0 siblings, 1 reply; 3+ messages in thread
From: Nick Clifton @ 2010-05-25  9:33 UTC (permalink / raw)
  To: Kai Tietz; +Cc: Binutils

Hi Kai,

> 2010-05-19  Kai Tietz
>
>          * deffilep.y (opt_name): Allow leading dot.
>          (dot_name): Likewise.
>          (anylang_id): Likewise.

Approved - please apply.

Cheers
   Nick


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch ld]: deffilep.y needs support for leading dots for symbol  names
  2010-05-25  9:33 ` Nick Clifton
@ 2010-05-25 10:05   ` Kai Tietz
  0 siblings, 0 replies; 3+ messages in thread
From: Kai Tietz @ 2010-05-25 10:05 UTC (permalink / raw)
  To: Nick Clifton; +Cc: Binutils

2010/5/25 Nick Clifton <nickc@redhat.com>:
> Hi Kai,
>
>> 2010-05-19  Kai Tietz
>>
>>         * deffilep.y (opt_name): Allow leading dot.
>>         (dot_name): Likewise.
>>         (anylang_id): Likewise.
>
> Approved - please apply.
>
> Cheers
>  Nick
>
>
>

Applied.

Thanks,
Kai

-- 
|  (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-05-25 10:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-19 20:43 [patch ld]: deffilep.y needs support for leading dots for symbol names Kai Tietz
2010-05-25  9:33 ` Nick Clifton
2010-05-25 10:05   ` Kai Tietz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).