diff options
author | Ian Lance Taylor <ian@airs.com> | 1996-07-30 17:39:33 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1996-07-30 17:39:33 +0000 |
commit | fb4dc1eb5f0156abb68c6bf35bd111bae15da970 (patch) | |
tree | f11700a22cc189b3782a07dbb0a268a2135dc0e9 /bfd | |
parent | 368f1e773beb4798f81c563c55b81b0d1cd98130 (diff) | |
download | fsf-binutils-gdb-fb4dc1eb5f0156abb68c6bf35bd111bae15da970.zip fsf-binutils-gdb-fb4dc1eb5f0156abb68c6bf35bd111bae15da970.tar.gz fsf-binutils-gdb-fb4dc1eb5f0156abb68c6bf35bd111bae15da970.tar.bz2 |
* xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Do the regular
archive search before looking for stripped dynamic objects.
PR 10187.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/xcofflink.c | 28 |
2 files changed, 21 insertions, 12 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 056c529..7820db9 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +Tue Jul 30 13:31:27 1996 Ian Lance Taylor <ian@cygnus.com> + + * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Do the regular + archive search before looking for stripped dynamic objects. + Fri Jul 26 17:51:39 1996 Ian Lance Taylor <ian@cygnus.com> * xcofflink.c (xcoff_build_ldsyms): Make exporting an undefined diff --git a/bfd/xcofflink.c b/bfd/xcofflink.c index 9a52a9c..a568043 100644 --- a/bfd/xcofflink.c +++ b/bfd/xcofflink.c @@ -1061,12 +1061,21 @@ _bfd_xcoff_bfd_link_add_symbols (abfd, info) { case bfd_object: return xcoff_link_add_object_symbols (abfd, info); + case bfd_archive: - /* We need to look through the archive for stripped dynamic - objects, because they will not appear in the archive map even - though they should, perhaps, be included. Also, if the - linker has no map, we just consider each object file in turn, - since that apparently is what the AIX native linker does. */ + /* If the archive has a map, do the usual search. We then need + to check the archive for stripped dynamic objects, because + they will not appear in the archive map even though they + should, perhaps, be included. If the archive has no map, we + just consider each object file in turn, since that apparently + is what the AIX native linker does. */ + if (bfd_has_map (abfd)) + { + if (! (_bfd_generic_link_add_archive_symbols + (abfd, info, xcoff_link_check_archive_element))) + return false; + } + { bfd *member; @@ -1087,15 +1096,10 @@ _bfd_xcoff_bfd_link_add_symbols (abfd, info) } member = bfd_openr_next_archived_file (abfd, member); } - - if (! bfd_has_map (abfd)) - return true; - - /* Now do the usual search. */ - return (_bfd_generic_link_add_archive_symbols - (abfd, info, xcoff_link_check_archive_element)); } + return true; + default: bfd_set_error (bfd_error_wrong_format); return false; |