From c4b7819565e41809d80f66febb0c89a6204e1ad8 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Thu, 21 Jan 2010 10:31:32 +0000 Subject: PR 4437 * ldfile.c: (ldfile_open_file): Do not stop link upon encountering a missing file or library. Instead mark the entry as missing and set the global flag to indicate that missing files were encountered. * ldlang.c (missing_files): New exported variable. (load_symbols): Skip loading if the file is missing. (open_input_bfds): Terminate link if any input files were missing. * ldlang.h (struct lang_input_statement_struct): Add missing_file field. Add export of missing_file variable. --- ld/ldlang.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'ld/ldlang.h') diff --git a/ld/ldlang.h b/ld/ldlang.h index 897ef56..58d03f0 100644 --- a/ld/ldlang.h +++ b/ld/ldlang.h @@ -1,6 +1,6 @@ /* ldlang.h - linker command language support Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, - 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 + 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU Binutils. @@ -279,9 +279,13 @@ typedef struct lang_input_statement_struct /* Whether to include the entire contents of an archive. */ unsigned int whole_archive : 1; + /* Set when bfd opening is successful. */ unsigned int loaded : 1; unsigned int real : 1; + + /* Set if the file does not exist. */ + unsigned int missing_file : 1; } lang_input_statement_type; typedef struct @@ -462,6 +466,7 @@ extern lang_statement_list_type file_chain; extern lang_statement_list_type input_file_chain; extern int lang_statement_iteration; +extern bfd_boolean missing_file; extern void lang_init (void); -- cgit v1.1