From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2124) id 2FE753858D1E; Mon, 20 Feb 2023 11:33:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2FE753858D1E Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Nick Clifton To: bfd-cvs@sourceware.org Subject: [binutils-gdb] So the linker from producing an export data table when run with --exclude-all-symbols. X-Act-Checkin: binutils-gdb X-Git-Author: Nick Clifton X-Git-Refname: refs/heads/master X-Git-Oldrev: 868014341a7befe77468a87ef9d9da109cbf3c3c X-Git-Newrev: c9802aca6d152c4a47252f69ad81556dbc24e312 Message-Id: <20230220113339.2FE753858D1E@sourceware.org> Date: Mon, 20 Feb 2023 11:33:39 +0000 (GMT) X-BeenThere: binutils-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Feb 2023 11:33:39 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Dc9802aca6d15= 2c4a47252f69ad81556dbc24e312 commit c9802aca6d152c4a47252f69ad81556dbc24e312 Author: Nick Clifton Date: Mon Feb 20 11:32:52 2023 +0000 So the linker from producing an export data table when run with --exclu= de-all-symbols. =20 PR 30004 * pe-dll.c (pe_dll_build_sections): Do not build an edata sec= tion if all symbols are being excluded. Diff: --- ld/ChangeLog | 6 ++++++ ld/pe-dll.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index 0fa00a95525..de9ed2753bc 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,9 @@ +2023-02-20 Nick Clifton + + PR 30004 + * pe-dll.c (pe_dll_build_sections): Do not build an edata section + if all symbols are being excluded. + 2023-02-16 Ulf Samuelsson Nick Clifton =20 diff --git a/ld/pe-dll.c b/ld/pe-dll.c index 2956eef1ca9..7e0d886cfb9 100644 --- a/ld/pe-dll.c +++ b/ld/pe-dll.c @@ -3659,7 +3659,8 @@ pe_dll_build_sections (bfd *abfd, struct bfd_link_inf= o *info) pe_output_file_set_long_section_names (abfd); process_def_file_and_drectve (abfd, info); =20 - if (pe_def_file->num_exports =3D=3D 0 && !bfd_link_pic (info)) + if (pe_def_file->num_exports =3D=3D 0 + && (!bfd_link_pic (info) || pe_dll_exclude_all_symbols)) { if (pe_dll_enable_reloc_section) {