diff options
author | Martin Storsjö <martin@martin.st> | 2022-09-02 12:22:29 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2022-09-12 11:07:35 +0300 |
commit | a33a94cf432e449461b7ddcc22b6f5a886cd3315 (patch) | |
tree | 8bb88e797733fc5803784465d455f397a2d85d3d /ld/deffile.h | |
parent | 3d36a6396fbfacd7b1941527d84ff6c0f40ff121 (diff) | |
download | gdb-a33a94cf432e449461b7ddcc22b6f5a886cd3315.zip gdb-a33a94cf432e449461b7ddcc22b6f5a886cd3315.tar.gz gdb-a33a94cf432e449461b7ddcc22b6f5a886cd3315.tar.bz2 |
ld: pe: Improve performance of object file exclude symbol directives
Store the list of excluded symbols in a sorted list, speeding up
checking for duplicates when inserting new entries.
This is done in the same way as is done for exports and imports
(while the previous implementation was done with a linked list,
based on the implementation for aligncomm).
When linking object files with excluded symbols, there can potentially
be very large numbers of excluded symbols (just like builds with
exports can have a large number of exported symbols).
This improves the link performance somewhat, when linking with large
numbers of excluded symbols.
The later actual use of the excluded symbols within pe-dll.c
handles them via an unordered linked list still, though.
Diffstat (limited to 'ld/deffile.h')
-rw-r--r-- | ld/deffile.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ld/deffile.h b/ld/deffile.h index a247639..89ffe9f 100644 --- a/ld/deffile.h +++ b/ld/deffile.h @@ -62,7 +62,6 @@ typedef struct def_file_aligncomm { } def_file_aligncomm; typedef struct def_file_exclude_symbol { - struct def_file_exclude_symbol *next; /* Chain pointer. */ char *symbol_name; /* Name of excluded symbol. */ } def_file_exclude_symbol; @@ -101,6 +100,7 @@ typedef struct def_file { def_file_aligncomm *aligncomms; /* From EXCLUDE_SYMBOLS or embedded directives. */ + unsigned int num_exclude_symbols, max_exclude_symbols; def_file_exclude_symbol *exclude_symbols; } def_file; |