aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl/pe.em
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1999-09-12 15:27:48 +0000
committerIan Lance Taylor <ian@airs.com>1999-09-12 15:27:48 +0000
commit1069dd8da73d903c6d53719ae8bdb63c1791a9aa (patch)
tree84eec29828271069c4fb9e569a512a0124de7ec6 /ld/emultempl/pe.em
parent2be9b2c7eec52f046c05d25ebb6f537d686000fc (diff)
downloadfsf-binutils-gdb-1069dd8da73d903c6d53719ae8bdb63c1791a9aa.zip
fsf-binutils-gdb-1069dd8da73d903c6d53719ae8bdb63c1791a9aa.tar.gz
fsf-binutils-gdb-1069dd8da73d903c6d53719ae8bdb63c1791a9aa.tar.bz2
* pe-dll.h: New file.
* pe-dll.c: Include "pe-dll.h". Mark unused arguments as needed to avoid warnings. (edata_sz, reloc_sz): Change from int to size_t. (pe_details_type): Change type of imagebase_reloc from int to unsigned int. (pe_detail_list): Fully initialize last entry. (pe_dll_id_target): Change parameter to const. (pe_dll_generate_def_file): Likewise. (pe_dll_generate_implib): Likewise. (pe_implied_import_dll): Likewise. Change dll_name to const. * emultempl/pe.em: Include "pe-dll.h". Remove declarations now in pe-dll.h. (init): Fully initialize __dll__ entry. (gld_${EMULATION_NAME}_after_open): Remove unused variables sequence, elt, and i. * deffile.h: Add preprocessor guard. * deffilep.y (def_debug): Remove. * Makefile.am: Rebuild dependencies. (HFILES): Add pe-dll.h.
Diffstat (limited to 'ld/emultempl/pe.em')
-rw-r--r--ld/emultempl/pe.em16
1 files changed, 7 insertions, 9 deletions
diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em
index 019c41d..db2a5ee 100644
--- a/ld/emultempl/pe.em
+++ b/ld/emultempl/pe.em
@@ -45,6 +45,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "../bfd/libcoff.h"
#include "../bfd/libbfd.h"
#include "deffile.h"
+#include "pe-dll.h"
#define TARGET_IS_${EMULATION_NAME}
@@ -89,13 +90,9 @@ static struct internal_extra_pe_aouthdr pe;
static int dll;
static int support_old_code = 0;
static char * thumb_entry_symbol = NULL;
-extern def_file *pe_def_file;
static lang_assignment_statement_type *image_base_statement = 0;
static char *pe_out_def_filename = 0;
-extern int pe_dll_export_everything;
-extern int pe_dll_kill_ats;
-extern int pe_dll_stdcall_aliases;
static int pe_enable_stdcall_fixup = -1; /* 0=disable 1=enable */
static char *pe_implib_filename = 0;
@@ -195,7 +192,7 @@ static definfo init[] =
#define IMAGEBASEOFF 0
D(ImageBase,"__image_base__", NT_EXE_IMAGE_BASE),
#define DLLOFF 1
- {&dll, sizeof(dll), 0, "__dll__"},
+ {&dll, sizeof(dll), 0, "__dll__", 0},
D(SectionAlignment,"__section_alignment__", PE_DEF_SECTION_ALIGNMENT),
D(FileAlignment,"__file_alignment__", PE_DEF_FILE_ALIGNMENT),
D(MajorOperatingSystemVersion,"__major_os_version__", 4),
@@ -701,10 +698,10 @@ gld_${EMULATION_NAME}_after_open ()
#endif
{
- static int sequence = 0;
int is_ms_arch;
- bfd *cur_arch = 0, *elt;
+ bfd *cur_arch = 0;
lang_input_statement_type *is2;
+
/* Careful - this is a shell script. Watch those dollar signs! */
/* Microsoft import libraries have every member named the same,
and not in the right order for us to link them correctly. We
@@ -713,7 +710,7 @@ gld_${EMULATION_NAME}_after_open ()
thunks, and the sentinel(s). The head is easy; it's the one
with idata2. We assume that the sentinels won't have relocs,
and the thunks will. It's easier than checking the symbol
- table for external references. */
+ table for external references. */
LANG_FOR_EACH_INPUT_STATEMENT (is)
{
if (is->the_bfd->my_archive)
@@ -734,9 +731,10 @@ gld_${EMULATION_NAME}_after_open ()
if (is_ms_arch)
{
- int idata2 = 0, i, reloc_count=0;
+ int idata2 = 0, reloc_count=0;
asection *sec;
char *new_name, seq;
+
for (sec = is->the_bfd->sections; sec; sec = sec->next)
{
if (strcmp (sec->name, ".idata\$2") == 0)