aboutsummaryrefslogtreecommitdiff
path: root/bfd/linker.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2014-08-07 09:49:32 +0930
committerAlan Modra <amodra@gmail.com>2014-08-07 09:49:32 +0930
commita42e82976aac3aed9b966e611b3cfa98974c4978 (patch)
tree7ff62a8f433799c930c372d6763a25886590db41 /bfd/linker.c
parent44714a840a6cd1cdf555809dc6211adb48f0842b (diff)
downloadgdb-a42e82976aac3aed9b966e611b3cfa98974c4978.zip
gdb-a42e82976aac3aed9b966e611b3cfa98974c4978.tar.gz
gdb-a42e82976aac3aed9b966e611b3cfa98974c4978.tar.bz2
Merge WARN and CWARN cases in _bfd_generic_link_add_one_symbol
WARN has always been able to be handled by the CWARN case (WARN was used when the previous symbols was undef, undefweak or common and thus must be on the undefs list, so the CWARN test passes). So let's merge those two cases. * linker.c (WARN, CWARN): Collapse these states to WARN. (_bfd_generic_link_add_one_symbol): Use old CWARN case for new WARN.
Diffstat (limited to 'bfd/linker.c')
-rw-r--r--bfd/linker.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/bfd/linker.c b/bfd/linker.c
index 1877e67..93c5465 100644
--- a/bfd/linker.c
+++ b/bfd/linker.c
@@ -1342,8 +1342,7 @@ enum link_action
CIND, /* Make indirect symbol from existing common symbol. */
SET, /* Add value to set. */
MWARN, /* Make warning symbol. */
- WARN, /* Issue warning. */
- CWARN, /* Warn if referenced, else MWARN. */
+ WARN, /* Warn if referenced, else MWARN. */
CYCLE, /* Repeat with symbol pointed to. */
REFC, /* Mark indirect symbol referenced and then CYCLE. */
WARNC /* Issue warning and then CYCLE. */
@@ -1361,7 +1360,7 @@ static const enum link_action link_action[8][8] =
/* DEFW_ROW */ {DEFW, DEFW, DEFW, NOACT, NOACT, NOACT, NOACT, CYCLE },
/* COMMON_ROW */ {COM, COM, COM, CREF, COM, BIG, REFC, WARNC },
/* INDR_ROW */ {IND, IND, IND, MDEF, IND, CIND, MIND, CYCLE },
- /* WARN_ROW */ {MWARN, WARN, WARN, CWARN, CWARN, WARN, CWARN, NOACT },
+ /* WARN_ROW */ {MWARN, WARN, WARN, WARN, WARN, WARN, WARN, NOACT },
/* SET_ROW */ {SET, SET, SET, SET, SET, SET, CYCLE, CYCLE }
};
@@ -1803,13 +1802,6 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info,
break;
case WARN:
- /* Issue a warning. */
- if (! (*info->callbacks->warning) (info, string, h->root.string,
- hash_entry_bfd (h), NULL, 0))
- return FALSE;
- break;
-
- case CWARN:
/* Warn if this symbol has been referenced already,
otherwise add a warning. A symbol has been referenced if
the u.undef.next field is not NULL, or it is the tail of the