aboutsummaryrefslogtreecommitdiff
path: root/ld/ldlang.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2022-08-03 13:31:57 +0100
committerNick Clifton <nickc@redhat.com>2022-08-03 13:31:57 +0100
commita6ad7914429a22d3d835bd998b032212b776a08a (patch)
treed81caa6275932745dedefa9f17d391454a84a19f /ld/ldlang.h
parent8b8da1a9f31941fa167c9f2bd2a80cdd1dccb452 (diff)
downloadgdb-a6ad7914429a22d3d835bd998b032212b776a08a.zip
gdb-a6ad7914429a22d3d835bd998b032212b776a08a.tar.gz
gdb-a6ad7914429a22d3d835bd998b032212b776a08a.tar.bz2
Fix a conflict between the linker's need to rename some PE format input libraries and the BFD library's file caching mechanism.
PR 29389 bfd * bfd.c (BFD_CLOSED_BY_CACHE): New bfd flag. * cache.c (bfd_cache_delete): Set BFD_CLOSED_BY_DELETE on the closed bfd. (bfd_cache_lookup_worker): Clear BFD_CLOSED_BY_DELETE on the newly reopened bfd. * opncls.c (bfd_set_filename): Refuse to change the name of a bfd that has been closed by bfd_cache_delete. Mark changed bfds as uncacheable. * bfd-in2.h: Regenerate. ld * ldlang.h (lang_input_statement_struct): Add sort_key field. * emultempl/pe.em (after_open): If multiple import libraries refer to the same bfd, store their names in the sort_key field. * emultempl/pep.em (after_open): Likewise. * ldlang.c (sort_filename): New function. Returns the filename to be used when sorting input files. (wild_sort): Use the sort_filename function.
Diffstat (limited to 'ld/ldlang.h')
-rw-r--r--ld/ldlang.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/ld/ldlang.h b/ld/ldlang.h
index 95f6e46..b853cdb 100644
--- a/ld/ldlang.h
+++ b/ld/ldlang.h
@@ -305,6 +305,8 @@ typedef struct lang_input_statement_struct
Usually the same as filename, but for a file spec'd with
-l this is the -l switch itself rather than the filename. */
const char *local_sym_name;
+ /* Name to use when sorting. */
+ const char *sort_key;
/* Extra search path. Used to find a file relative to the
directory of the current linker script. */
const char *extra_search_path;