aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2013-06-12 07:48:32 +0000
committerNick Clifton <nickc@redhat.com>2013-06-12 07:48:32 +0000
commit316b4980f030148c94ed0bce9f3a10b46cad44f0 (patch)
tree5216ceb66d1304dc3ac60486c071b98d4ce783ec /ld
parent5e1f7017e7b541dec109dee5cc4b4ce9873b7cc4 (diff)
downloadgdb-316b4980f030148c94ed0bce9f3a10b46cad44f0.zip
gdb-316b4980f030148c94ed0bce9f3a10b46cad44f0.tar.gz
gdb-316b4980f030148c94ed0bce9f3a10b46cad44f0.tar.bz2
* ldcref.c (output_one_cref): Place common definitions after
ordinary definitions but before references.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog5
-rw-r--r--ld/ldcref.c19
2 files changed, 21 insertions, 3 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 4736e6b..e58945b 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@
+2013-06-12 Nick Clifton <nickc@redhat.com>
+
+ * ldcref.c (output_one_cref): Place common definitions after
+ ordinary definitions but before references.
+
2013-06-10 Dilyan Palauzov <dilyan.palauzov@aegee.org>
PR ld/15598
diff --git a/ld/ldcref.c b/ld/ldcref.c
index 2f6a46c..56b917d 100644
--- a/ld/ldcref.c
+++ b/ld/ldcref.c
@@ -1,6 +1,5 @@
/* ldcref.c -- output a cross reference table
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Free Software Foundation, Inc.
+ Copyright 1996-2013 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>
This file is part of the GNU Binutils.
@@ -446,7 +445,21 @@ output_one_cref (FILE *fp, struct cref_hash_entry *h)
for (r = h->refs; r != NULL; r = r->next)
{
- if (! r->def)
+ if (r->common)
+ {
+ while (len < FILECOL)
+ {
+ putc (' ', fp);
+ ++len;
+ }
+ lfinfo (fp, "%B\n", r->abfd);
+ len = 0;
+ }
+ }
+
+ for (r = h->refs; r != NULL; r = r->next)
+ {
+ if (! r->def && ! r->common)
{
while (len < FILECOL)
{