summaryrefslogtreecommitdiff
path: root/ld/ldcref.c
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
commitda29bf2cf1471bb570738505402fc009842b852e (patch)
tree1f29e2b875e6f92893a2b9c868d265ebd3ff9763 /ld/ldcref.c
parent994d57833818eee01d98ddf1744b085af0a87414 (diff)
downloadbinutils-redhat-da29bf2cf1471bb570738505402fc009842b852e.tar.gz
* ldcref.c (output_one_cref): Place common definitions after
ordinary definitions but before references.
Diffstat (limited to 'ld/ldcref.c')
-rw-r--r--ld/ldcref.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/ld/ldcref.c b/ld/ldcref.c
index 2f6a46caea..56b917d4bf 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)
{