This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH COMMITTED: Let -frepo look for symbol name in single quotes

gold outputs undefined symbol names in single quotes:

ld: hello.o: in function main:hello.c:5: undefined reference to 'puts'

This differs from GNU ld, which use mismatched quotes:

hello.c:5: undefined reference to `puts'

Currently collect2 when using -frepo looks at linker error messages
for mismatched quotes, and looks for double quotes, but does not look
for single quotes.  I think single quotes are an appropriate choice,
especially since that is what gcc itself uses.

So, I committed this patch to let -frepo look for single quotes.
Tested with a bootstrap and testsuite run on i686-pc-linux-gnu, both
with and without gold.


2008-03-31  Ian Lance Taylor  <>

	* tlink.c (scan_linker_output): Look for symbol name in single

Index: tlink.c
--- tlink.c	(revision 133761)
+++ tlink.c	(working copy)
@@ -683,6 +683,9 @@ scan_linker_output (const char *fname)
 	  /* Then try "double quotes".  */
 	  else if (p = strchr (oldq, '"'), p)
 	    p++, q = strchr (p, '"');
+	  /* Then try "single quotes".  */
+	  else if (p = strchr (oldq, '\''), p)
+	    p++, q = strchr (p, '\'');
 	  else {
 	    /* Then try entire line.  */
 	    q = strchr (oldq, 0);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]