aboutsummaryrefslogtreecommitdiff
path: root/ld/pe-dll.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2022-07-19 22:48:06 +0300
committerMartin Storsjö <martin@martin.st>2022-08-01 23:17:56 +0300
commit37513c1efbe5e8e1863f8ddf078cd395aa663388 (patch)
tree75bb5a657dc86a8e22cc6d08e6da8962089833b8 /ld/pe-dll.c
parent75337cbc1476b7eb403fe0e73c52bf080b5996c8 (diff)
downloadgdb-37513c1efbe5e8e1863f8ddf078cd395aa663388.zip
gdb-37513c1efbe5e8e1863f8ddf078cd395aa663388.tar.gz
gdb-37513c1efbe5e8e1863f8ddf078cd395aa663388.tar.bz2
ld: Add support for a new option, -exclude-symbols, in COFF object file directives
This maps to the same as ld's --exclude-symbols command line option, but allowing specifying the option via directives embedded in the object files instead of passed manually on the command line.
Diffstat (limited to 'ld/pe-dll.c')
-rw-r--r--ld/pe-dll.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/ld/pe-dll.c b/ld/pe-dll.c
index 24a5118..fbf180e 100644
--- a/ld/pe-dll.c
+++ b/ld/pe-dll.c
@@ -718,6 +718,16 @@ process_def_file_and_drectve (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *
}
}
+ if (pe_def_file->exclude_symbols)
+ {
+ def_file_exclude_symbol *ac = pe_def_file->exclude_symbols;
+ while (ac)
+ {
+ pe_dll_add_excludes (ac->symbol_name, EXCLUDESYMS);
+ ac = ac->next;
+ }
+ }
+
/* If we are building an executable and there is nothing
to export, we do not build an export table at all. */
if (bfd_link_executable (info) && pe_def_file->num_exports == 0