Resolve warning symbols like indirect symbols.

This commit is contained in:
Ian Lance Taylor 1994-01-19 04:48:37 +00:00
parent 77918505b5
commit 3a5b50f457
2 changed files with 8 additions and 6 deletions

View File

@ -3,8 +3,8 @@ Tue Jan 18 16:43:19 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
* aoutx.h (aout_link_add_symbols): Increment sym_hash as well as p * aoutx.h (aout_link_add_symbols): Increment sym_hash as well as p
for an indirect or warning symbol. for an indirect or warning symbol.
(aout_link_write_symbols): Update sym_hash with the target of an (aout_link_write_symbols): Update sym_hash with the target of an
indirect symbol. If an indirect symbol is defined, output the indirect or warning symbol. If an indirect symbol is defined,
calculated value and don't output the target symbol. output the calculated value and don't output the target symbol.
Tue Jan 18 03:54:59 1994 David J. Mackenzie (djm@thepub.cygnus.com) Tue Jan 18 03:54:59 1994 David J. Mackenzie (djm@thepub.cygnus.com)

View File

@ -3484,12 +3484,14 @@ aout_link_write_symbols (finfo, input_bfd, symbol_map)
external symbol. */ external symbol. */
h = *sym_hash; h = *sym_hash;
/* If this is an indirect symbol, then change hresolve to /* If this is an indirect or warning symbol, then change
the base symbol. We also change sym_hash so that the hresolve to the base symbol. We also change *sym_hash so
relocation routines relocate against the real symbol. */ that the relocation routines relocate against the real
symbol. */
hresolve = h; hresolve = h;
if (h != (struct aout_link_hash_entry *) NULL if (h != (struct aout_link_hash_entry *) NULL
&& h->root.type == bfd_link_hash_indirect) && (h->root.type == bfd_link_hash_indirect
|| h->root.type == bfd_link_hash_warning))
{ {
hresolve = (struct aout_link_hash_entry *) h->root.u.i.link; hresolve = (struct aout_link_hash_entry *) h->root.u.i.link;
while (hresolve->root.type == bfd_link_hash_indirect) while (hresolve->root.type == bfd_link_hash_indirect)