diff options
author | Nick Clifton <nickc@redhat.com> | 2003-04-02 17:39:24 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2003-04-02 17:39:24 +0000 |
commit | 2b817be1364754beb86513fe48f77e6604da2d4b (patch) | |
tree | a8f9380d3986fd9474125331e1de1e8da3507d1a /ld/pe-dll.c | |
parent | f6c8b716bd00631b7b6b51235a220127b712f9b2 (diff) | |
download | gdb-2b817be1364754beb86513fe48f77e6604da2d4b.zip gdb-2b817be1364754beb86513fe48f77e6604da2d4b.tar.gz gdb-2b817be1364754beb86513fe48f77e6604da2d4b.tar.bz2 |
pe-dll.c (pe_detail_list): arm-pe targets use underscores.
(process_def_file): Don't create an export section if there are no exports and
we're building an exe.
(pe_dll_build_sections): Ditto
(pe_dll_fill_sections): Conditionalize setting abfd->dll true on info->shared
emultempl/pe.em (gld_${EMULATION_NAME}_after_open): If i386pe or armpe, call
pe_dll_build_section() for both exe's and dll's, not just dll's. Don't call
pe_dll_build_section() if link_info.relocateable.
(gld_${EMULATION_NAME}_finish): For all targets except shpe and mipspe, call
pe_dll_fill_sections() for both exe's and dll's, not just dll's. Don't call
pe_dll_fill_sections() if link_info.relocateable.
Diffstat (limited to 'ld/pe-dll.c')
-rw-r--r-- | ld/pe-dll.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/ld/pe-dll.c b/ld/pe-dll.c index 95cdd7e..1430754 100644 --- a/ld/pe-dll.c +++ b/ld/pe-dll.c @@ -199,7 +199,7 @@ static pe_details_type pe_detail_list[] = 11 /* ARM_RVA32 */, PE_ARCH_arm, bfd_arch_arm, - 0 + 1 }, { "epoc-pei-arm-little", @@ -564,6 +564,12 @@ process_def_file (abfd, info) } } + /* If we are not building a DLL, when there are no exports + we do not build an export table at all. */ + if (!pe_dll_export_everything && pe_def_file->num_exports == 0 + && !(info->shared)) + return; + /* Now, maybe export everything else the default way. */ if (pe_dll_export_everything || pe_def_file->num_exports == 0) { @@ -2666,6 +2672,9 @@ pe_dll_build_sections (abfd, info) pe_dll_id_target (bfd_get_target (abfd)); process_def_file (abfd, info); + if (pe_def_file->num_exports == 0 && !(info->shared)) + return; + generate_edata (abfd, info); build_filler_bfd (1); } @@ -2707,7 +2716,8 @@ pe_dll_fill_sections (abfd, info) fill_edata (abfd, info); - pe_data (abfd)->dll = 1; + if (info->shared) + pe_data (abfd)->dll = 1; edata_s->contents = edata_d; reloc_s->contents = reloc_d; |