diff options
author | Mike Stump <mrs@apple.com> | 2007-02-24 00:30:30 +0000 |
---|---|---|
committer | Mike Stump <mrs@gcc.gnu.org> | 2007-02-24 00:30:30 +0000 |
commit | 196bea21f198f7d98534718aecd01fc005795db4 (patch) | |
tree | f3679841125cab5af3bdbc9139f3a661d05b6cd1 /gcc | |
parent | a2266ea92b5348fc2dc4455ebe286f07f464dd45 (diff) | |
download | gcc-196bea21f198f7d98534718aecd01fc005795db4.zip gcc-196bea21f198f7d98534718aecd01fc005795db4.tar.gz gcc-196bea21f198f7d98534718aecd01fc005795db4.tar.bz2 |
tlink.c (scan_linker_output): Parse linker messages from darwin9's linker better.
* tlink.c (scan_linker_output): Parse linker messages from
darwin9's linker better.
From-SVN: r122283
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/tlink.c | 21 |
2 files changed, 25 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cb4e098..bdec047 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2007-02-23 Mike Stump <mrs@apple.com> + + * tlink.c (scan_linker_output): Parse linker messages from + darwin9's linker better. + 2007-02-23 Steve Ellcey <sje@cup.hp.com> PR debug/29614 diff --git a/gcc/tlink.c b/gcc/tlink.c index 1689ddb..8e10eeb 100644 --- a/gcc/tlink.c +++ b/gcc/tlink.c @@ -607,12 +607,17 @@ scan_linker_output (const char *fname) { FILE *stream = fopen (fname, "r"); char *line; + int skip_next_line = 0; while ((line = tfgets (stream)) != NULL) { char *p = line, *q; symbol *sym; int end; + int ok = 0; + + if (skip_next_line) + continue; while (*p && ISSPACE ((unsigned char) *p)) ++p; @@ -654,6 +659,19 @@ scan_linker_output (const char *fname) demangled *dem = 0; q = 0; + /* On darwin9, we look for "foo" referenced from:\n.*\n */ + if (strcmp (oldq, "referenced from:") == 0) + { + /* We have to remember that we found a symbol to tweak. */ + ok = 1; + + /* We actually want to start from the first word on the line. */ + oldq = p; + + /* Since the format is multiline, we have to skip the next line. */ + skip_next_line = 1; + } + /* First try `GNU style'. */ p = strchr (oldq, '`'); if (p) @@ -681,7 +699,8 @@ scan_linker_output (const char *fname) /* We need to check for certain error keywords here, or we would mistakenly use GNU ld's "In function `foo':" message. */ - if (q && (strstr (oldq, "ndefined") + if (q && (ok + || strstr (oldq, "ndefined") || strstr (oldq, "nresolved") || strstr (oldq, "nsatisfied") || strstr (oldq, "ultiple"))) |