summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2003-04-02 17:39:24 +0000
committerNick Clifton <nickc@redhat.com>2003-04-02 17:39:24 +0000
commit82cc02fb0c0b648393104bd6934be9007e5981cc (patch)
tree73fe4b760ec018c0b670fd9d1cf3d85a9e9fc73b
parent46a10b9bf26b606e4a4005850d9294e557251480 (diff)
downloadbinutils-redhat-82cc02fb0c0b648393104bd6934be9007e5981cc.tar.gz
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.
-rw-r--r--ld/ChangeLog25
-rw-r--r--ld/emultempl/pe.em10
-rw-r--r--ld/pe-dll.c14
3 files changed, 46 insertions, 3 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 918fae7970..4f68300599 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,28 @@
+2003-04-02 Nick Clifton <nickc@redhat.com>
+
+ * pe-dll.c (pe_detail_list): arm-pe targets use underscores.
+
+2003-04-01 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * emultempl/pe.em (gld_${EMULATION_NAME}_after_open):
+ Don't call pe_dll_build_section() if link_info.relocateable.
+ (gld_${EMULATION_NAME}_finish): Don't call pe_dll_fill_sections()
+ if link_info.relocateable.
+
+2003-04-01 Fabrizio Gennari <fabrizio.ge@tiscalinet.it>
+
+ * pe-dll.c (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.
+ (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.
+
2003-04-02 Bob Wilson <bob.wilson@acm.org>
* emulparams/xtensa-config.sh: Remove comment indicating that this is
diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em
index 1bcd0e6e5d..10522d7575 100644
--- a/ld/emultempl/pe.em
+++ b/ld/emultempl/pe.em
@@ -1019,7 +1019,11 @@ gld_${EMULATION_NAME}_after_open ()
pe_find_data_imports ();
+#if ! (defined (TARGET_IS_i386pe) || defined (TARGET_IS_armpe))
if (link_info.shared)
+#else
+ if (!link_info.relocateable)
+#endif
pe_dll_build_sections (output_bfd, &link_info);
#ifndef TARGET_IS_i386pe
@@ -1456,7 +1460,11 @@ gld_${EMULATION_NAME}_finish ()
#endif /* defined(TARGET_IS_armpe) || defined(TARGET_IS_arm_epoc_pe) */
#ifdef DLL_SUPPORT
- if (link_info.shared)
+ if (link_info.shared
+#if !defined(TARGET_IS_shpe) && !defined(TARGET_IS_mipspe)
+ || (!link_info.relocateable && pe_def_file->num_exports != 0)
+#endif
+ )
{
pe_dll_fill_sections (output_bfd, &link_info);
if (pe_implib_filename)
diff --git a/ld/pe-dll.c b/ld/pe-dll.c
index 95cdd7e36c..1430754842 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;