This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 2/8] PR ld/17878: Use bfd_maybe_object_p in linker.c


	PR ld/17878
	* linker.c (_bfd_generic_link_add_archive_symbols): Replace
	bfd_check_format with bfd_maybe_object_p.
---
 bfd/linker.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/bfd/linker.c b/bfd/linker.c
index c1a2e82..aa34d6a 100644
--- a/bfd/linker.c
+++ b/bfd/linker.c
@@ -1003,7 +1003,8 @@ _bfd_generic_link_add_archive_symbols
 	      last_ar_offset = arsym->file_offset;
 	      element = _bfd_get_elt_at_filepos (abfd, last_ar_offset);
 	      if (element == NULL
-		  || !bfd_check_format (element, bfd_object))
+		  || !bfd_maybe_object_p (element,
+					  info->lto_plugin_active))
 		goto error_return;
 	    }
 
-- 
2.1.0


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]