summaryrefslogtreecommitdiffstats
path: root/binutils-2.25/ld/pe-dll.c
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2014-12-09 17:57:18 +0800
committerAndrew Hsieh <andrewhsieh@google.com>2014-12-09 19:50:14 +0800
commit5e8c1cf25beccac1d22d10dc866912394f42771b (patch)
treeee16b70f804484dc8e434e647e699ab50da2620f /binutils-2.25/ld/pe-dll.c
parent8eebd7953384e6662ca926b003f2cdda8ccd3ee5 (diff)
downloadtoolchain_binutils-5e8c1cf25beccac1d22d10dc866912394f42771b.tar.gz
toolchain_binutils-5e8c1cf25beccac1d22d10dc866912394f42771b.tar.bz2
toolchain_binutils-5e8c1cf25beccac1d22d10dc866912394f42771b.zip
[2.25] sync to a30720e3e633f275250e26f85ccae5dbdddfb6c6
local patches will be re-applied later commit a30720e3e633f275250e26f85ccae5dbdddfb6c6 Author: Alan Modra <amodra@gmail.com> Date: Wed Nov 19 10:30:16 2014 +1030 daily update Change-Id: Ieb2a3f4dd2ecb289ac5305ff08d428b2847494ab
Diffstat (limited to 'binutils-2.25/ld/pe-dll.c')
-rw-r--r--binutils-2.25/ld/pe-dll.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/binutils-2.25/ld/pe-dll.c b/binutils-2.25/ld/pe-dll.c
index bd3195f4..61d8fa5c 100644
--- a/binutils-2.25/ld/pe-dll.c
+++ b/binutils-2.25/ld/pe-dll.c
@@ -1,6 +1,5 @@
/* Routines to help build PEI-format DLLs (Win32 etc)
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
- 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+ Copyright (C) 1998-2014 Free Software Foundation, Inc.
Written by DJ Delorie <dj@cygnus.com>
This file is part of the GNU Binutils.
@@ -236,6 +235,7 @@ static const autofilter_entry_type autofilter_symbollist_i386[] =
{ STRING_COMMA_LEN ("_impure_ptr") },
{ STRING_COMMA_LEN ("_fmode") },
{ STRING_COMMA_LEN ("environ") },
+ { STRING_COMMA_LEN ("__dso_handle") },
{ NULL, 0 }
};
@@ -655,7 +655,7 @@ process_def_file_and_drectve (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *
/* First, run around to all the objects looking for the .drectve
sections, and push those into the def file too. */
- for (b = info->input_bfds; b; b = b->link_next)
+ for (b = info->input_bfds; b; b = b->link.next)
{
s = bfd_get_section_by_name (b, ".drectve");
if (s)
@@ -701,7 +701,7 @@ process_def_file_and_drectve (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *
if ((pe_dll_export_everything || pe_def_file->num_exports == 0)
&& !pe_dll_exclude_all_symbols)
{
- for (b = info->input_bfds; b; b = b->link_next)
+ for (b = info->input_bfds; b; b = b->link.next)
{
asymbol **symbols;
int nsyms;
@@ -1170,9 +1170,6 @@ fill_edata (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED)
unsigned char *enameptrs;
unsigned char *eordinals;
char *enamestr;
- time_t now;
-
- time (&now);
edata_d = xmalloc (edata_sz);
@@ -1187,7 +1184,10 @@ fill_edata (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED)
+ edata_s->output_section->vma - image_base)
memset (edata_d, 0, edata_sz);
- bfd_put_32 (abfd, now, edata_d + 4);
+
+ if (pe_data (abfd)->insert_timestamp)
+ H_PUT_32 (abfd, time (0), edata_d + 4);
+
if (pe_def_file->version_major != -1)
{
bfd_put_16 (abfd, pe_def_file->version_major, edata_d + 8);
@@ -1268,7 +1268,7 @@ pe_walk_relocs_of_symbol (struct bfd_link_info *info,
bfd *b;
asection *s;
- for (b = info->input_bfds; b; b = b->link_next)
+ for (b = info->input_bfds; b; b = b->link.next)
{
asymbol **symbols;
@@ -1331,7 +1331,7 @@ generate_reloc (bfd *abfd, struct bfd_link_info *info)
struct bfd_section *s;
total_relocs = 0;
- for (b = info->input_bfds; b; b = b->link_next)
+ for (b = info->input_bfds; b; b = b->link.next)
for (s = b->sections; s; s = s->next)
total_relocs += s->reloc_count;
@@ -1339,7 +1339,7 @@ generate_reloc (bfd *abfd, struct bfd_link_info *info)
total_relocs = 0;
bi = 0;
- for (bi = 0, b = info->input_bfds; b; bi++, b = b->link_next)
+ for (bi = 0, b = info->input_bfds; b; bi++, b = b->link.next)
{
arelent **relocs;
int relsize, nrelocs;
@@ -2591,7 +2591,7 @@ pe_create_runtime_relocator_reference (bfd *parent)
BSF_NO_FLAGS, 0);
bfd_set_section_size (abfd, extern_rt_rel, PE_IDATA5_SIZE);
- extern_rt_rel_d = xmalloc (PE_IDATA5_SIZE);
+ extern_rt_rel_d = xcalloc (1, PE_IDATA5_SIZE);
extern_rt_rel->contents = extern_rt_rel_d;
quick_reloc (abfd, 0, BFD_RELOC_RVA, 1);
@@ -2727,7 +2727,7 @@ pe_dll_generate_implib (def_file *def, const char *impfilename, struct bfd_link_
ar_head = make_head (outarch);
/* Iterate the input BFDs, looking for exclude-modules-for-implib. */
- for (ibfd = info->input_bfds; ibfd; ibfd = ibfd->link_next)
+ for (ibfd = info->input_bfds; ibfd; ibfd = ibfd->link.next)
{
/* Iterate the exclude list. */
struct exclude_list_struct *ex;