/* Routines to help build PEI-format DLLs (Win32 etc)
- Copyright (C) 1998-2019 Free Software Foundation, Inc.
+ Copyright (C) 1998-2020 Free Software Foundation, Inc.
Written by DJ Delorie <dj@cygnus.com>
This file is part of the GNU Binutils.
int pe_use_nul_prefixed_import_tables = 0;
int pe_use_coff_long_section_names = -1;
int pe_leading_underscore = -1;
+int pe_dll_enable_reloc_section = 0;
/* Static variables and types. */
process_def_file_and_drectve (abfd, info);
if (pe_def_file->num_exports == 0 && !bfd_link_pic (info))
- return;
+ {
+ if (pe_dll_enable_reloc_section)
+ {
+ build_filler_bfd (0);
+ pe_output_file_set_long_section_names (filler_bfd);
+ }
+ return;
+ }
generate_edata (abfd, info);
build_filler_bfd (1);
void
pe_dll_fill_sections (bfd *abfd, struct bfd_link_info *info)
{
- pe_dll_id_target (bfd_get_target (abfd));
- pe_output_file_set_long_section_names (abfd);
- image_base = pe_data (abfd)->pe_opthdr.ImageBase;
+ pe_exe_fill_sections (abfd, info);
- generate_reloc (abfd, info);
- if (reloc_sz > 0)
+ if (edata_s)
{
- bfd_set_section_size (reloc_s, reloc_sz);
-
- /* Resize the sections. */
- lang_reset_memory_regions ();
- lang_size_sections (NULL, TRUE);
-
- /* Redo special stuff. */
- ldemul_after_allocation ();
-
- /* Do the assignments again. */
- lang_do_assignments (lang_final_phase_enum);
+ fill_edata (abfd, info);
+ edata_s->contents = edata_d;
}
- fill_edata (abfd, info);
-
if (bfd_link_dll (info))
pe_data (abfd)->dll = 1;
-
- edata_s->contents = edata_d;
- reloc_s->contents = reloc_d;
}
void