summaryrefslogtreecommitdiff
path: root/ld/pe-dll.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2008-02-15 03:35:53 +0000
committerAlan Modra <amodra@bigpond.net.au>2008-02-15 03:35:53 +0000
commitd7dde66c50543d891eb2dcdde9e439b9b033e799 (patch)
treea9305a7a80c31972a5ed5f54b5bb53d9c40b8ee2 /ld/pe-dll.c
parent63665287fc1495b903f61346158c7fd9bff11cc6 (diff)
downloadbinutils-redhat-d7dde66c50543d891eb2dcdde9e439b9b033e799.tar.gz
include/
* bfdlink.h (struct bfd_link_hash_table): Delete creator field. (struct bfd_link_info): Add output_bfd. bfd/ * elflink.c: Replace all accesses to hash->creator field with output_bfd->xvec. * cofflink.c: Likewise. * coff-h8300.c: Likewise. * ecoff.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-ppc.c: Likewise. * elf64-alpha.c: Likewise. * elf64-ppc.c: Likewise. * elf64-sparc.c: Likewise. * elfxx-mips.c: Likewise. * i386linux.c: Likewise. * m68klinux.c: Likewise. * sparclinux.c: Likewise. * sunos.c: Likewise. * xcofflink.c: Likewise. * linker.c: Likewise. (_bfd_link_hash_table_init): Don't store creator. ld/ * ldmain.h (output_bfd): Delete. * ldmain.c (output_bfd): Delete. Replace all occurrences of output_bfd with link_info.output_bfd. * ldcref.c: Likewise. * ldctor.c: Likewise. * ldemul.c: Likewise. * ldexp.c: Likewise. * ldfile.c: Likewise. * ldlang.c: Likewise. * ldmisc.c: Likewise. * ldwrite.c: Likewise. * pe-dll.c: Likewise. * emultempl/aix.em: Likewise. * emultempl/alphaelf.em: Likewise. * emultempl/armcoff.em: Likewise. * emultempl/armelf.em: Likewise. * emultempl/avrelf.em: Likewise. * emultempl/beos.em: Likewise. * emultempl/elf-generic.em: Likewise. * emultempl/elf32.em: Likewise. * emultempl/gld960.em: Likewise. * emultempl/hppaelf.em: Likewise. * emultempl/irix.em: Likewise. * emultempl/linux.em: Likewise. * emultempl/lnk960.em: Likewise. * emultempl/m68hc1xelf.em: Likewise. * emultempl/mmix-elfnmmo.em: Likewise. * emultempl/mmo.em: Likewise. * emultempl/pe.em: Likewise. * emultempl/pep.em: Likewise. * emultempl/ppc32elf.em: Likewise. * emultempl/ppc64elf.em: Likewise. * emultempl/scoreelf.em: Likewise. * emultempl/sh64elf.em: Likewise. * emultempl/spuelf.em: Likewise. * emultempl/sunos.em: Likewise. * emultempl/vanilla.em: Likewise. * emultempl/vxworks.em: Likewise. * emultempl/xtensaelf.em: Likewise. * emultempl/z80.em: Likewise. * ldlang.c (open_output): Don't return output, instead write link_info_output_bfd directly. * emultempl/alphaelf.em: Replace occurrences of link_info.hash->creator with link_info.output_bfd->xvec. * emultempl/hppaelf.em: Likewise. * emultempl/ppc32elf.em: Likewise. * emultempl/ppc64elf.em: Likewise. * emultempl/spuelf.em: Likewise.
Diffstat (limited to 'ld/pe-dll.c')
-rw-r--r--ld/pe-dll.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/ld/pe-dll.c b/ld/pe-dll.c
index d754747700..c0cf63de5c 100644
--- a/ld/pe-dll.c
+++ b/ld/pe-dll.c
@@ -1,6 +1,6 @@
/* Routines to help build PEI-format DLLs (Win32 etc)
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
- Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+ 2008 Free Software Foundation, Inc.
Written by DJ Delorie <dj@cygnus.com>
This file is part of the GNU Binutils.
@@ -858,11 +858,12 @@ build_filler_bfd (int include_edata)
filler_file = lang_add_input_file ("dll stuff",
lang_input_file_is_fake_enum,
NULL);
- filler_file->the_bfd = filler_bfd = bfd_create ("dll stuff", output_bfd);
+ filler_file->the_bfd = filler_bfd = bfd_create ("dll stuff",
+ link_info.output_bfd);
if (filler_bfd == NULL
|| !bfd_set_arch_mach (filler_bfd,
- bfd_get_arch (output_bfd),
- bfd_get_mach (output_bfd)))
+ bfd_get_arch (link_info.output_bfd),
+ bfd_get_mach (link_info.output_bfd)))
{
einfo ("%X%P: can not create BFD: %E\n");
return;
@@ -1445,9 +1446,10 @@ pe_dll_generate_def_file (const char *pe_out_def_filename)
quoteput (pe_def_file->name, out, 1);
- if (pe_data (output_bfd)->pe_opthdr.ImageBase)
+ if (pe_data (link_info.output_bfd)->pe_opthdr.ImageBase)
fprintf (out, " BASE=0x%lx",
- (unsigned long) pe_data (output_bfd)->pe_opthdr.ImageBase);
+ (unsigned long)
+ pe_data (link_info.output_bfd)->pe_opthdr.ImageBase);
fprintf (out, "\n");
}
@@ -2334,12 +2336,12 @@ pe_create_import_fixup (arelent *rel, asection *s, int addend)
if (!name_thunk_sym || name_thunk_sym->type != bfd_link_hash_defined)
{
- bfd *b = make_singleton_name_thunk (name, output_bfd);
+ bfd *b = make_singleton_name_thunk (name, link_info.output_bfd);
add_bfd_to_link (b, b->filename, &link_info);
/* If we ever use autoimport, we have to cast text section writable. */
config.text_read_only = FALSE;
- output_bfd->flags &= ~WP_TEXT;
+ link_info.output_bfd->flags &= ~WP_TEXT;
}
if (addend == 0 || link_info.pei386_runtime_pseudo_reloc)
@@ -2347,7 +2349,8 @@ pe_create_import_fixup (arelent *rel, asection *s, int addend)
extern char * pe_data_import_dll;
char * dll_symname = pe_data_import_dll ? pe_data_import_dll : "unknown";
- b = make_import_fixup_entry (name, fixup_name, dll_symname, output_bfd);
+ b = make_import_fixup_entry (name, fixup_name, dll_symname,
+ link_info.output_bfd);
add_bfd_to_link (b, b->filename, &link_info);
}
@@ -2358,12 +2361,13 @@ pe_create_import_fixup (arelent *rel, asection *s, int addend)
if (pe_dll_extra_pe_debug)
printf ("creating runtime pseudo-reloc entry for %s (addend=%d)\n",
fixup_name, addend);
- b = make_runtime_pseudo_reloc (name, fixup_name, addend, output_bfd);
+ b = make_runtime_pseudo_reloc (name, fixup_name, addend,
+ link_info.output_bfd);
add_bfd_to_link (b, b->filename, &link_info);
if (runtime_pseudo_relocs_created == 0)
{
- b = pe_create_runtime_relocator_reference (output_bfd);
+ b = pe_create_runtime_relocator_reference (link_info.output_bfd);
add_bfd_to_link (b, b->filename, &link_info);
}
runtime_pseudo_relocs_created++;