diff options
author | H.J. Lu <hjl@lucon.org> | 2001-05-10 22:59:29 +0000 |
---|---|---|
committer | H.J. Lu <hjl@lucon.org> | 2001-05-10 22:59:29 +0000 |
commit | faed90dd6ffdcacb9e66b58f32b9ad76ef534375 (patch) | |
tree | 7211b75939f62430a610fa53eb8b3da89147cbec /bfd/linker.c | |
parent | b2f2c8582b245afb25fd6abb5c5f46c8fb576ad6 (diff) | |
download | gdb-faed90dd6ffdcacb9e66b58f32b9ad76ef534375.tar.gz |
2001-05-10 H.J. Lu <hjl@gnu.org>
* linker.c (_bfd_generic_link_add_one_symbol): Check loop on
indirect symbols.
Diffstat (limited to 'bfd/linker.c')
-rw-r--r-- | bfd/linker.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/bfd/linker.c b/bfd/linker.c index 3efaf665d7f..08772894890 100644 --- a/bfd/linker.c +++ b/bfd/linker.c @@ -1801,6 +1801,15 @@ _bfd_generic_link_add_one_symbol (info, abfd, name, flags, section, value, copy, false); if (inh == (struct bfd_link_hash_entry *) NULL) return false; + if (inh->type == bfd_link_hash_indirect + && inh->u.i.link == h) + { + (*_bfd_error_handler) + (_("%s: indirect symbol `%s' to `%s' is a loop"), + bfd_get_filename (abfd), name, string); + bfd_set_error (bfd_error_invalid_operation); + return false; + } if (inh->type == bfd_link_hash_new) { inh->type = bfd_link_hash_undefined; |