aboutsummaryrefslogtreecommitdiff
path: root/ld/pe-dll.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2023-02-20 11:32:52 +0000
committerNick Clifton <nickc@redhat.com>2023-02-20 11:32:52 +0000
commitc9802aca6d152c4a47252f69ad81556dbc24e312 (patch)
tree1d49ae6d446ecced96c944b4ecb42172162b3dcd /ld/pe-dll.c
parent868014341a7befe77468a87ef9d9da109cbf3c3c (diff)
downloadbinutils-c9802aca6d152c4a47252f69ad81556dbc24e312.zip
binutils-c9802aca6d152c4a47252f69ad81556dbc24e312.tar.gz
binutils-c9802aca6d152c4a47252f69ad81556dbc24e312.tar.bz2
So the linker from producing an export data table when run with --exclude-all-symbols.
PR 30004 * pe-dll.c (pe_dll_build_sections): Do not build an edata section if all symbols are being excluded.
Diffstat (limited to 'ld/pe-dll.c')
-rw-r--r--ld/pe-dll.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ld/pe-dll.c b/ld/pe-dll.c
index 2956eef..7e0d886 100644
--- a/ld/pe-dll.c
+++ b/ld/pe-dll.c
@@ -3659,7 +3659,8 @@ pe_dll_build_sections (bfd *abfd, struct bfd_link_info *info)
pe_output_file_set_long_section_names (abfd);
process_def_file_and_drectve (abfd, info);
- if (pe_def_file->num_exports == 0 && !bfd_link_pic (info))
+ if (pe_def_file->num_exports == 0
+ && (!bfd_link_pic (info) || pe_dll_exclude_all_symbols))
{
if (pe_dll_enable_reloc_section)
{