Subversion Repositories Kolibri OS

Rev

Rev 5199 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5199 Rev 6324
Line 1... Line 1...
1
/* Copyright 1995-2013 Free Software Foundation, Inc.
1
/* Copyright (C) 1995-2015 Free Software Foundation, Inc.
Line 2... Line 2...
2
 
2
 
Line 3... Line 3...
3
   This file is part of the GNU Binutils.
3
   This file is part of the GNU Binutils.
4
 
4
 
Line 54... Line 54...
54
#include "coff/internal.h"
54
#include "ldbuildid.h"
55
 
55
#include "coff/internal.h"
56
/* FIXME: See bfd/peXXigen.c for why we include an architecture specific
56
 
57
   header in generic PE code.  */
57
/* FIXME: See bfd/peXXigen.c for why we include an architecture specific
58
#include "coff/i386.h"
58
   header in generic PE code.  */
-
 
59
#include "coff/i386.h"
59
#include "coff/pe.h"
60
#include "coff/pe.h"
Line 60... Line 61...
60
 
61
 
61
/* FIXME: This is a BFD internal header file, and we should not be
62
/* FIXME: These are BFD internal header files, and we should not be
62
   using it here.  */
63
   using it here.  */
63
#include "../bfd/libcoff.h"
64
#include "../bfd/libcoff.h"
Line 64... Line 65...
64
 
65
#include "../bfd/libpei.h"
65
#include "deffile.h"
66
 
66
#include "pe-dll.h"
67
#include "deffile.h"
-
 
68
#include "pe-dll.h"
Line 67... Line 69...
67
#include "safe-ctype.h"
69
#include "safe-ctype.h"
68
 
70
 
69
/* Permit the emulation parameters to override the default section
71
/* Permit the emulation parameters to override the default section
Line 114... Line 116...
114
static bfd_boolean insert_timestamp = FALSE;
116
static bfd_boolean insert_timestamp = TRUE;
115
 
117
static const char *emit_build_id;
116
#ifdef DLL_SUPPORT
118
 
117
static int pe_enable_stdcall_fixup = -1; /* 0=disable 1=enable.  */
119
#ifdef DLL_SUPPORT
118
static char *pe_out_def_filename = NULL;
120
static int pe_enable_stdcall_fixup = -1; /* 0=disable 1=enable.  */
119
static char *pe_implib_filename = NULL;
121
static char *pe_out_def_filename = NULL;
-
 
122
static char *pe_implib_filename = NULL;
Line 120... Line 123...
120
static int pe_enable_auto_image_base = 0;
123
static int pe_enable_auto_image_base = 0;
121
static char *pe_dll_search_prefix = NULL;
124
static unsigned long pe_auto_image_base = 0x61500000;
122
#endif
125
static char *pe_dll_search_prefix = NULL;
123
 
126
#endif
124
extern const char *output_filename;
127
 
-
 
128
extern const char *output_filename;
125
 
129
 
126
static int is_underscoring (void)
130
static int is_underscoring (void)
Line 127... Line 131...
127
{
131
{
Line 220... Line 224...
220
 
224
#define OPTION_NO_INSERT_TIMESTAMP	(OPTION_INSERT_TIMESTAMP + 1)
221
static void
225
#define OPTION_BUILD_ID			(OPTION_NO_INSERT_TIMESTAMP + 1)
222
gldi386pe_add_options
226
 
223
  (int ns ATTRIBUTE_UNUSED,
227
static void
224
   char **shortopts ATTRIBUTE_UNUSED,
228
gldi386pe_add_options
-
 
229
  (int ns ATTRIBUTE_UNUSED,
-
 
230
   char **shortopts ATTRIBUTE_UNUSED,
Line 225... Line 231...
225
   int nl,
231
   int nl,
226
   struct option **longopts,
232
   struct option **longopts,
227
   int nrl ATTRIBUTE_UNUSED,
233
   int nrl ATTRIBUTE_UNUSED,
228
   struct option **really_longopts ATTRIBUTE_UNUSED)
234
   struct option **really_longopts ATTRIBUTE_UNUSED)
Line 254... Line 260...
254
#ifdef DLL_SUPPORT
260
    {"no-insert-timestamp", no_argument, NULL, OPTION_NO_INSERT_TIMESTAMP},
255
    /* getopt allows abbreviations, so we do this to stop it
261
#ifdef DLL_SUPPORT
256
       from treating -o as an abbreviation for this option.  */
262
    /* getopt allows abbreviations, so we do this to stop it
257
    {"output-def", required_argument, NULL, OPTION_OUT_DEF},
263
       from treating -o as an abbreviation for this option.  */
258
    {"output-def", required_argument, NULL, OPTION_OUT_DEF},
264
    {"output-def", required_argument, NULL, OPTION_OUT_DEF},
-
 
265
    {"output-def", required_argument, NULL, OPTION_OUT_DEF},
259
    {"export-all-symbols", no_argument, NULL, OPTION_EXPORT_ALL},
266
    {"export-all-symbols", no_argument, NULL, OPTION_EXPORT_ALL},
260
    {"exclude-symbols", required_argument, NULL, OPTION_EXCLUDE_SYMBOLS},
267
    {"exclude-symbols", required_argument, NULL, OPTION_EXCLUDE_SYMBOLS},
261
    {"exclude-all-symbols", no_argument, NULL, OPTION_EXCLUDE_ALL_SYMBOLS},
268
    {"exclude-all-symbols", no_argument, NULL, OPTION_EXCLUDE_ALL_SYMBOLS},
262
    {"exclude-libs", required_argument, NULL, OPTION_EXCLUDE_LIBS},
269
    {"exclude-libs", required_argument, NULL, OPTION_EXCLUDE_LIBS},
263
    {"exclude-modules-for-implib", required_argument, NULL, OPTION_EXCLUDE_MODULES_FOR_IMPLIB},
270
    {"exclude-modules-for-implib", required_argument, NULL, OPTION_EXCLUDE_MODULES_FOR_IMPLIB},
Line 274... Line 281...
274
    {"enable-auto-image-base", no_argument, NULL, OPTION_ENABLE_AUTO_IMAGE_BASE},
281
    {"enable-auto-image-base", optional_argument, NULL, OPTION_ENABLE_AUTO_IMAGE_BASE},
275
    {"disable-auto-image-base", no_argument, NULL, OPTION_DISABLE_AUTO_IMAGE_BASE},
282
    {"disable-auto-image-base", no_argument, NULL, OPTION_DISABLE_AUTO_IMAGE_BASE},
276
    {"dll-search-prefix", required_argument, NULL, OPTION_DLL_SEARCH_PREFIX},
283
    {"dll-search-prefix", required_argument, NULL, OPTION_DLL_SEARCH_PREFIX},
277
    {"no-default-excludes", no_argument, NULL, OPTION_NO_DEFAULT_EXCLUDES},
284
    {"no-default-excludes", no_argument, NULL, OPTION_NO_DEFAULT_EXCLUDES},
278
    {"enable-auto-import", no_argument, NULL, OPTION_DLL_ENABLE_AUTO_IMPORT},
285
    {"enable-auto-import", no_argument, NULL, OPTION_DLL_ENABLE_AUTO_IMPORT},
279
    {"disable-auto-import", no_argument, NULL, OPTION_DLL_DISABLE_AUTO_IMPORT},
286
    {"disable-auto-import", no_argument, NULL, OPTION_DLL_DISABLE_AUTO_IMPORT},
280
    {"enable-extra-pe-debug", no_argument, NULL, OPTION_ENABLE_EXTRA_PE_DEBUG},
287
    {"enable-extra-pe-debug", no_argument, NULL, OPTION_ENABLE_EXTRA_PE_DEBUG},
281
    {"enable-runtime-pseudo-reloc", no_argument, NULL, OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC},
288
    {"enable-runtime-pseudo-reloc", no_argument, NULL, OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC},
282
    {"disable-runtime-pseudo-reloc", no_argument, NULL, OPTION_DLL_DISABLE_RUNTIME_PSEUDO_RELOC},
289
    {"disable-runtime-pseudo-reloc", no_argument, NULL, OPTION_DLL_DISABLE_RUNTIME_PSEUDO_RELOC},
283
    {"enable-runtime-pseudo-reloc-v1", no_argument, NULL, OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC_V1},
290
    {"enable-runtime-pseudo-reloc-v1", no_argument, NULL, OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC_V1},
284
    {"enable-runtime-pseudo-reloc-v2", no_argument, NULL, OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC_V2},
291
    {"enable-runtime-pseudo-reloc-v2", no_argument, NULL, OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC_V2},
Line 298... Line 305...
298
    {NULL, no_argument, NULL, 0}
305
    {"build-id", optional_argument, NULL, OPTION_BUILD_ID},
299
  };
306
    {NULL, no_argument, NULL, 0}
300
 
307
  };
301
  *longopts
308
 
302
    = xrealloc (*longopts, nl * sizeof (struct option) + sizeof (xtra_long));
309
  *longopts
-
 
310
    = xrealloc (*longopts, nl * sizeof (struct option) + sizeof (xtra_long));
303
  memcpy (*longopts + nl, &xtra_long, sizeof (xtra_long));
311
  memcpy (*longopts + nl, &xtra_long, sizeof (xtra_long));
304
}
312
}
Line 305... Line 313...
305
 
313
 
306
/* PE/WIN32; added routines to get the subsystem type, heap and/or stack
314
/* PE/WIN32; added routines to get the subsystem type, heap and/or stack
Line 387... Line 395...
387
  fprintf (file, _("  --insert-timestamp                 Use a real timestamp rather than zero.\n"));
395
  fprintf (file, _("  --[no-]insert-timestamp            Use a real timestamp rather than zero (default).\n"));
388
  fprintf (file, _("                                     This makes binaries non-deterministic\n"));
396
  fprintf (file, _("                                     This makes binaries non-deterministic\n"));
389
#ifdef DLL_SUPPORT
397
#ifdef DLL_SUPPORT
390
  fprintf (file, _("  --add-stdcall-alias                Export symbols with and without @nn\n"));
398
  fprintf (file, _("  --add-stdcall-alias                Export symbols with and without @nn\n"));
391
  fprintf (file, _("  --disable-stdcall-fixup            Don't link _sym to _sym@nn\n"));
399
  fprintf (file, _("  --disable-stdcall-fixup            Don't link _sym to _sym@nn\n"));
392
  fprintf (file, _("  --enable-stdcall-fixup             Link _sym to _sym@nn without warnings\n"));
400
  fprintf (file, _("  --enable-stdcall-fixup             Link _sym to _sym@nn without warnings\n"));
393
  fprintf (file, _("  --exclude-symbols sym,sym,...      Exclude symbols from automatic export\n"));
401
  fprintf (file, _("  --exclude-symbols sym,sym,...      Exclude symbols from automatic export\n"));
394
  fprintf (file, _("  --exclude-all-symbols              Exclude all symbols from automatic export\n"));
402
  fprintf (file, _("  --exclude-all-symbols              Exclude all symbols from automatic export\n"));
395
  fprintf (file, _("  --exclude-libs lib,lib,...         Exclude libraries from automatic export\n"));
403
  fprintf (file, _("  --exclude-libs lib,lib,...         Exclude libraries from automatic export\n"));
396
  fprintf (file, _("  --exclude-modules-for-implib mod,mod,...\n"));
404
  fprintf (file, _("  --exclude-modules-for-implib mod,mod,...\n"));
397
  fprintf (file, _("                                     Exclude objects, archive members from auto\n"));
405
  fprintf (file, _("                                     Exclude objects, archive members from auto\n"));
Line 403... Line 411...
403
  fprintf (file, _("  --warn-duplicate-exports           Warn about duplicate exports.\n"));
411
  fprintf (file, _("  --warn-duplicate-exports           Warn about duplicate exports\n"));
404
  fprintf (file, _("  --compat-implib                    Create backward compatible import libs;\n                                       create __imp_ as well.\n"));
412
  fprintf (file, _("  --compat-implib                    Create backward compatible import libs;\n                                       create __imp_ as well.\n"));
405
  fprintf (file, _("  --enable-auto-image-base           Automatically choose image base for DLLs\n                                       unless user specifies one\n"));
413
  fprintf (file, _("  --enable-auto-image-base[=
] Automatically choose image base for DLLs\n (optionally starting with address) unless\n specifically set with --image-base\n"));
406
  fprintf (file, _("  --disable-auto-image-base          Do not auto-choose image base. (default)\n"));
414
  fprintf (file, _("  --disable-auto-image-base          Do not auto-choose image base. (default)\n"));
407
  fprintf (file, _("  --dll-search-prefix=       When linking dynamically to a dll without\n                                       an importlib, use .dll\n                                       in preference to lib.dll \n"));
415
  fprintf (file, _("  --dll-search-prefix=       When linking dynamically to a dll without\n                                       an importlib, use .dll\n                                       in preference to lib.dll \n"));
408
  fprintf (file, _("  --enable-auto-import               Do sophisticated linking of _sym to\n                                       __imp_sym for DATA references\n"));
416
  fprintf (file, _("  --enable-auto-import               Do sophisticated linking of _sym to\n                                       __imp_sym for DATA references\n"));
409
  fprintf (file, _("  --disable-auto-import              Do not auto-import DATA items from DLLs\n"));
417
  fprintf (file, _("  --disable-auto-import              Do not auto-import DATA items from DLLs\n"));
410
  fprintf (file, _("  --enable-runtime-pseudo-reloc      Work around auto-import limitations by\n                                       adding pseudo-relocations resolved at\n                                       runtime.\n"));
418
  fprintf (file, _("  --enable-runtime-pseudo-reloc      Work around auto-import limitations by\n                                       adding pseudo-relocations resolved at\n                                       runtime.\n"));
411
  fprintf (file, _("  --disable-runtime-pseudo-reloc     Do not add runtime pseudo-relocations for\n                                       auto-imported DATA.\n"));
419
  fprintf (file, _("  --disable-runtime-pseudo-reloc     Do not add runtime pseudo-relocations for\n                                       auto-imported DATA.\n"));
412
  fprintf (file, _("  --enable-extra-pe-debug            Enable verbose debug output when building\n                                       or linking to DLLs (esp. auto-import)\n"));
420
  fprintf (file, _("  --enable-extra-pe-debug            Enable verbose debug output when building\n                                       or linking to DLLs (esp. auto-import)\n"));
413
#endif
421
#endif
414
  fprintf (file, _("  --large-address-aware              Executable supports virtual addresses\n                                       greater than 2 gigabytes\n"));
422
  fprintf (file, _("  --large-address-aware              Executable supports virtual addresses\n                                       greater than 2 gigabytes\n"));
415
  fprintf (file, _("  --disable-large-address-aware      Executable does not support virtual\n                                       addresses greater than 2 gigabytes\n"));
423
  fprintf (file, _("  --disable-large-address-aware      Executable does not support virtual\n                                       addresses greater than 2 gigabytes\n"));
Line 426... Line 434...
426
}
434
  fprintf (file, _("  --build-id[=STYLE]         Generate build ID\n"));
427
 
435
}
428
 
436
 
429
static void
437
 
430
set_pe_name (char *name, long val)
438
static void
-
 
439
set_pe_name (char *name, long val)
431
{
440
{
Line 432... Line 441...
432
  int i;
441
  int i;
433
  is_underscoring ();
442
  is_underscoring ();
Line 476... Line 485...
476
  if (link_info.shared || dll)
485
  if (bfd_link_pic (&link_info) || dll)
Line 477... Line 486...
477
    {
486
    {
478
#if defined (TARGET_IS_i386pe)
487
#if defined (TARGET_IS_i386pe)
Line 479... Line 488...
479
      entry = "DllMainCRTStartup@12";
488
      entry = "DllMainCRTStartup@12";
480
#else
489
#else
481
      entry = "DllMainCRTStartup";
490
      entry = "DllMainCRTStartup";
482
#endif
491
#endif
483
    }
492
    }
484
  else
493
  else
Line 620... Line 629...
620
 
629
#define DEFAULT_BUILD_ID_STYLE	"md5"
621
static bfd_boolean
630
 
622
gldi386pe_handle_option (int optc)
631
static bfd_boolean
623
{
632
gldi386pe_handle_option (int optc)
Line -... Line 633...
-
 
633
{
Line 624... Line 634...
624
  switch (optc)
634
  switch (optc)
625
    {
635
    {
626
    default:
636
    default:
627
      return FALSE;
637
      return FALSE;
Line 693... Line 703...
693
#ifdef DLL_SUPPORT
703
    case OPTION_NO_INSERT_TIMESTAMP:
694
    case OPTION_OUT_DEF:
704
      insert_timestamp = FALSE;
695
      pe_out_def_filename = xstrdup (optarg);
705
      break;
696
      break;
706
#ifdef DLL_SUPPORT
697
    case OPTION_EXPORT_ALL:
707
    case OPTION_OUT_DEF:
-
 
708
      pe_out_def_filename = xstrdup (optarg);
-
 
709
      break;
-
 
710
    case OPTION_EXPORT_ALL:
698
      pe_dll_export_everything = 1;
711
      pe_dll_export_everything = 1;
699
      break;
712
      break;
700
    case OPTION_EXCLUDE_SYMBOLS:
713
    case OPTION_EXCLUDE_SYMBOLS:
701
      pe_dll_add_excludes (optarg, EXCLUDESYMS);
714
      pe_dll_add_excludes (optarg, EXCLUDESYMS);
702
      break;
715
      break;
Line 735... Line 748...
735
      break;
748
      if (optarg && *optarg)
736
    case OPTION_DISABLE_AUTO_IMAGE_BASE:
749
	{
737
      pe_enable_auto_image_base = 0;
750
	  char *end;
738
      break;
751
	  pe_auto_image_base = strtoul (optarg, &end, 0);
739
    case OPTION_DLL_SEARCH_PREFIX:
752
	  /* XXX should check that we actually parsed something */
-
 
753
	}
-
 
754
      break;
-
 
755
    case OPTION_DISABLE_AUTO_IMAGE_BASE:
-
 
756
      pe_enable_auto_image_base = 0;
-
 
757
      break;
-
 
758
    case OPTION_DLL_SEARCH_PREFIX:
740
      pe_dll_search_prefix = xstrdup (optarg);
759
      pe_dll_search_prefix = xstrdup (optarg);
741
      break;
760
      break;
742
    case OPTION_NO_DEFAULT_EXCLUDES:
761
    case OPTION_NO_DEFAULT_EXCLUDES:
743
      pe_dll_do_default_excludes = 0;
762
      pe_dll_do_default_excludes = 0;
744
      break;
763
      break;
Line 805... Line 824...
805
    }
824
    case OPTION_BUILD_ID:
806
 
825
      if (emit_build_id != NULL)
807
  /*  Set DLLCharacteristics bits  */
826
	{
808
  set_pe_name ("__dll_characteristics__", pe_dll_characteristics);
827
	  free ((char *) emit_build_id);
809
 
828
	  emit_build_id = NULL;
-
 
829
	}
-
 
830
      if (optarg == NULL)
-
 
831
	optarg = DEFAULT_BUILD_ID_STYLE;
-
 
832
      if (strcmp (optarg, "none"))
-
 
833
	emit_build_id = xstrdup (optarg);
-
 
834
      break;
-
 
835
    }
-
 
836
 
-
 
837
  /*  Set DLLCharacteristics bits  */
-
 
838
  set_pe_name ("__dll_characteristics__", pe_dll_characteristics);
-
 
839
 
810
  return TRUE;
840
  return TRUE;
Line 811... Line 841...
811
}
841
}
812

842

Line 844... Line 874...
844
  return 0x61300000 + ((hash << 16) & 0x0FFC0000);
874
  return pe_auto_image_base + ((hash << 16) & 0x0FFC0000);
845
}
875
}
846
#endif
876
#endif
847
 
877
 
848
/* Assign values to the special symbols before the linker script is
878
/* Assign values to the special symbols before the linker script is
849
   read.  */
879
   read.  */
850
 
880
 
Line 851... Line 881...
851
static void
881
static void
852
gld_i386pe_set_symbols (void)
882
gld_i386pe_set_symbols (void)
Line 862... Line 892...
862
      if (link_info.relocatable)
892
      if (bfd_link_relocatable (&link_info))
Line 863... Line 893...
863
	init[IMAGEBASEOFF].value = 0;
893
	init[IMAGEBASEOFF].value = 0;
864
      else if (init[DLLOFF].value || (link_info.shared && !link_info.pie))
894
      else if (init[DLLOFF].value || bfd_link_dll (&link_info))
865
	{
895
	{
866
#ifdef DLL_SUPPORT
896
#ifdef DLL_SUPPORT
867
	  init[IMAGEBASEOFF].value = (pe_enable_auto_image_base
897
	  init[IMAGEBASEOFF].value = (pe_enable_auto_image_base
868
				      ? compute_dll_image_base (output_filename)
898
				      ? compute_dll_image_base (output_filename)
869
				      : NT_DLL_IMAGE_BASE);
899
				      : NT_DLL_IMAGE_BASE);
870
#else
900
#else
871
	  init[IMAGEBASEOFF].value = NT_DLL_IMAGE_BASE;
901
	  init[IMAGEBASEOFF].value = NT_DLL_IMAGE_BASE;
872
#endif
902
#endif
Line 880... Line 910...
880
  if (link_info.relocatable)
910
  if (bfd_link_relocatable (&link_info))
881
    return;
911
    return;
882
 
912
 
Line 883... Line 913...
883
  /* Glue the assignments into the abs section.  */
913
  /* Glue the assignments into the abs section.  */
884
  push_stat_ptr (&abs_output_section->children);
914
  push_stat_ptr (&abs_output_section->children);
885
 
915
 
Line 886... Line 916...
886
  for (j = 0; init[j].ptr; j++)
916
  for (j = 0; init[j].ptr; j++)
887
    {
917
    {
Line 1073... Line 1103...
1073
	  char buf[4096];
1103
#define BUF_SIZE 4096
1074
 
1104
	  char buf[BUF_SIZE];
1075
	  if (pe_dll_extra_pe_debug)
1105
 
1076
	    printf ("%s:%s\n", __FUNCTION__, undef->root.string);
1106
	  if (pe_dll_extra_pe_debug)
1077
 
1107
	    printf ("%s:%s\n", __FUNCTION__, undef->root.string);
-
 
1108
 
1078
	  sprintf (buf, "__imp_%s", undef->root.string);
1109
	  if (strlen (undef->root.string) > (BUF_SIZE - 6))
Line 1079... Line 1110...
1079
 
1110
	    {
1080
	  sym = bfd_link_hash_lookup (link_info.hash, buf, 0, 0, 1);
1111
	      /* PR linker/18466.  */
Line -... Line 1112...
-
 
1112
	      einfo (_("%P: internal error: symbol too long: %s\n"),
-
 
1113
		     undef->root.string);
-
 
1114
	      return;
-
 
1115
	    }
-
 
1116
 
-
 
1117
	  sprintf (buf, "__imp_%s", undef->root.string);
-
 
1118
 
-
 
1119
	  sym = bfd_link_hash_lookup (link_info.hash, buf, 0, 0, 1);
1081
 
1120
 
Line 1082... Line 1121...
1082
	  if (sym && sym->type == bfd_link_hash_defined)
1121
	  if (sym && sym->type == bfd_link_hash_defined)
Line 1083... Line 1122...
1083
	    {
1122
	    {
Line 1159... Line 1198...
1159
static void
1198
static bfd_boolean
1160
gld_i386pe_after_open (void)
1199
pecoff_checksum_contents (bfd *abfd,
1161
{
1200
			  void (*process) (const void *, size_t, void *),
1162
  after_open_default ();
1201
			  void *arg)
Line -... Line 1202...
-
 
1202
{
-
 
1203
  file_ptr filepos = (file_ptr) 0;
-
 
1204
 
-
 
1205
  while (1)
-
 
1206
    {
-
 
1207
      unsigned char b;
-
 
1208
      int status;
-
 
1209
 
-
 
1210
      if (bfd_seek (abfd, filepos, SEEK_SET) != 0)
-
 
1211
	return 0;
-
 
1212
 
-
 
1213
      status = bfd_bread (&b, (bfd_size_type) 1, abfd);
-
 
1214
      if (status < 1)
-
 
1215
        {
-
 
1216
          break;
-
 
1217
        }
-
 
1218
 
-
 
1219
      (*process) (&b, 1, arg);
-
 
1220
      filepos += 1;
-
 
1221
    }
-
 
1222
 
-
 
1223
  return TRUE;
-
 
1224
}
-
 
1225
 
-
 
1226
static bfd_boolean
-
 
1227
write_build_id (bfd *abfd)
-
 
1228
{
-
 
1229
  struct pe_tdata *t = pe_data (abfd);
-
 
1230
  asection *asec;
-
 
1231
  struct bfd_link_order *link_order = NULL;
-
 
1232
  unsigned char *contents;
-
 
1233
  bfd_size_type size;
-
 
1234
  bfd_size_type build_id_size;
-
 
1235
  unsigned char *build_id;
-
 
1236
 
-
 
1237
  /* Find the section the .buildid output section has been merged info.  */
-
 
1238
  for (asec = abfd->sections; asec != NULL; asec = asec->next)
-
 
1239
    {
-
 
1240
      struct bfd_link_order *l = NULL;
-
 
1241
      for (l = asec->map_head.link_order; l != NULL; l = l->next)
-
 
1242
        {
-
 
1243
          if (l->type == bfd_indirect_link_order)
-
 
1244
            {
-
 
1245
              if (l->u.indirect.section == t->build_id.sec)
-
 
1246
                {
-
 
1247
                  link_order = l;
-
 
1248
                  break;
-
 
1249
                }
-
 
1250
            }
-
 
1251
        }
-
 
1252
 
-
 
1253
      if (link_order)
-
 
1254
        break;
-
 
1255
    }
-
 
1256
 
-
 
1257
  if (!link_order)
-
 
1258
    {
-
 
1259
      einfo (_("%P: warning: .buildid section discarded,"
-
 
1260
               " --build-id ignored.\n"));
-
 
1261
      return TRUE;
-
 
1262
    }
-
 
1263
 
-
 
1264
  if (t->build_id.sec->contents == NULL)
-
 
1265
    t->build_id.sec->contents = (unsigned char *) xmalloc (t->build_id.sec->size);
-
 
1266
  contents = t->build_id.sec->contents;
-
 
1267
  size = t->build_id.sec->size;
-
 
1268
 
-
 
1269
  build_id_size = compute_build_id_size (t->build_id.style);
-
 
1270
  build_id = xmalloc (build_id_size);
-
 
1271
  generate_build_id (abfd, t->build_id.style, pecoff_checksum_contents, build_id, build_id_size);
-
 
1272
 
-
 
1273
  bfd_vma ib = pe_data (link_info.output_bfd)->pe_opthdr.ImageBase;
-
 
1274
 
-
 
1275
  /* Construct a debug directory entry which points to an immediately following CodeView record.  */
-
 
1276
  struct internal_IMAGE_DEBUG_DIRECTORY idd;
-
 
1277
  idd.Characteristics = 0;
-
 
1278
  idd.TimeDateStamp = 0;
-
 
1279
  idd.MajorVersion = 0;
-
 
1280
  idd.MinorVersion = 0;
-
 
1281
  idd.Type = PE_IMAGE_DEBUG_TYPE_CODEVIEW;
-
 
1282
  idd.SizeOfData = sizeof (CV_INFO_PDB70) + 1;
-
 
1283
  idd.AddressOfRawData = asec->vma - ib + link_order->offset
-
 
1284
    + sizeof (struct external_IMAGE_DEBUG_DIRECTORY);
-
 
1285
  idd.PointerToRawData = asec->filepos + link_order->offset
-
 
1286
    + sizeof (struct external_IMAGE_DEBUG_DIRECTORY);
-
 
1287
 
-
 
1288
  struct external_IMAGE_DEBUG_DIRECTORY *ext = (struct external_IMAGE_DEBUG_DIRECTORY *)contents;
-
 
1289
  _bfd_XXi_swap_debugdir_out (abfd, &idd, ext);
-
 
1290
 
-
 
1291
  /* Write the debug directory entry.  */
-
 
1292
  if (bfd_seek (abfd, asec->filepos + link_order->offset, SEEK_SET) != 0)
-
 
1293
    return 0;
-
 
1294
 
-
 
1295
  if (bfd_bwrite (contents, size, abfd) != size)
-
 
1296
    return 0;
-
 
1297
 
-
 
1298
  /* Construct the CodeView record.  */
-
 
1299
  CODEVIEW_INFO cvinfo;
-
 
1300
  cvinfo.CVSignature = CVINFO_PDB70_CVSIGNATURE;
-
 
1301
  cvinfo.Age = 1;
-
 
1302
 
-
 
1303
  /* Zero pad or truncate the generated build_id to fit in the CodeView record.  */
-
 
1304
  memset (&(cvinfo.Signature), 0, CV_INFO_SIGNATURE_LENGTH);
-
 
1305
  memcpy (&(cvinfo.Signature), build_id, (build_id_size > CV_INFO_SIGNATURE_LENGTH)
-
 
1306
	  ? CV_INFO_SIGNATURE_LENGTH :  build_id_size);
-
 
1307
 
-
 
1308
  free (build_id);
-
 
1309
 
-
 
1310
  /* Write the codeview record.  */
-
 
1311
  if (_bfd_XXi_write_codeview_record (abfd, idd.PointerToRawData, &cvinfo) == 0)
-
 
1312
    return 0;
-
 
1313
 
-
 
1314
  /* Record the location of the debug directory in the data directory.  */
-
 
1315
  pe_data (link_info.output_bfd)->pe_opthdr.DataDirectory[PE_DEBUG_DATA].VirtualAddress
-
 
1316
    = asec->vma  - ib + link_order->offset;
-
 
1317
  pe_data (link_info.output_bfd)->pe_opthdr.DataDirectory[PE_DEBUG_DATA].Size
-
 
1318
    = sizeof (struct external_IMAGE_DEBUG_DIRECTORY);
-
 
1319
 
-
 
1320
  return TRUE;
-
 
1321
}
-
 
1322
 
-
 
1323
/* Make .buildid section, and set up coff_tdata->build_id. */
-
 
1324
static bfd_boolean
-
 
1325
setup_build_id (bfd *ibfd)
-
 
1326
{
-
 
1327
  asection *s;
-
 
1328
  flagword flags;
-
 
1329
 
-
 
1330
  if (!validate_build_id_style (emit_build_id))
-
 
1331
    {
-
 
1332
      einfo ("%P: warning: unrecognized --build-id style ignored.\n");
-
 
1333
      return FALSE;
-
 
1334
    }
-
 
1335
 
-
 
1336
  flags = (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_IN_MEMORY
-
 
1337
	   | SEC_LINKER_CREATED | SEC_READONLY | SEC_DATA);
-
 
1338
  s = bfd_make_section_anyway_with_flags (ibfd, ".buildid", flags);
-
 
1339
  if (s != NULL)
-
 
1340
    {
-
 
1341
      struct pe_tdata *t = pe_data (link_info.output_bfd);
-
 
1342
      t->build_id.after_write_object_contents = &write_build_id;
-
 
1343
      t->build_id.style = emit_build_id;
-
 
1344
      t->build_id.sec = s;
-
 
1345
 
-
 
1346
      /* Section is a fixed size:
-
 
1347
	 One IMAGE_DEBUG_DIRECTORY entry, of type IMAGE_DEBUG_TYPE_CODEVIEW,
-
 
1348
	 pointing at a CV_INFO_PDB70 record containing the build-id, with a
-
 
1349
	 null byte for PdbFileName.  */
-
 
1350
      s->size = sizeof (struct external_IMAGE_DEBUG_DIRECTORY)
-
 
1351
	+ sizeof (CV_INFO_PDB70) + 1;
-
 
1352
 
-
 
1353
      return TRUE;
-
 
1354
    }
-
 
1355
 
-
 
1356
  einfo ("%P: warning: Cannot create .buildid section,"
-
 
1357
	 " --build-id ignored.\n");
-
 
1358
  return FALSE;
-
 
1359
}
-
 
1360
 
-
 
1361
static void
-
 
1362
gld_i386pe_after_open (void)
-
 
1363
{
-
 
1364
  after_open_default ();
1163
 
1365
 
1164
#ifdef DLL_SUPPORT
1366
#ifdef DLL_SUPPORT
1165
  if (pe_dll_extra_pe_debug)
1367
  if (pe_dll_extra_pe_debug)
1166
    {
1368
    {
Line 1176... Line 1378...
1176
      for (a = link_info.input_bfds; a; a = a->link_next)
1378
      for (a = link_info.input_bfds; a; a = a->link.next)
1177
	printf ("*%s\n",a->filename);
1379
	printf ("*%s\n",a->filename);
1178
    }
1380
    }
Line 1179... Line 1381...
1179
#endif
1381
#endif
1180
 
1382
 
1181
  /* Pass the wacky PE command line options into the output bfd.
1383
  if (emit_build_id != NULL)
1182
     FIXME: This should be done via a function, rather than by
1384
    {
Line -... Line 1385...
-
 
1385
      bfd *abfd;
-
 
1386
 
-
 
1387
      /* Find a COFF input.  */
-
 
1388
      for (abfd = link_info.input_bfds;
-
 
1389
	   abfd != (bfd *) NULL; abfd = abfd->link.next)
-
 
1390
	if (bfd_get_flavour (abfd) == bfd_target_coff_flavour)
-
 
1391
	  break;
-
 
1392
 
-
 
1393
      /* If there are no COFF input files do not try to
-
 
1394
	 add a build-id section.  */
-
 
1395
      if (abfd == NULL
-
 
1396
	  || !setup_build_id (abfd))
-
 
1397
	{
-
 
1398
	  free ((char *) emit_build_id);
-
 
1399
	  emit_build_id = NULL;
-
 
1400
	}
-
 
1401
    }
-
 
1402
 
-
 
1403
  /* Pass the wacky PE command line options into the output bfd.
-
 
1404
     FIXME: This should be done via a function, rather than by
1183
     including an internal BFD header.  */
1405
     including an internal BFD header.  */
1184
 
1406
 
1185
  if (coff_data (link_info.output_bfd) == NULL
1407
  if (coff_data (link_info.output_bfd) == NULL
Line 1186... Line 1408...
1186
      || coff_data (link_info.output_bfd)->pe == 0)
1408
      || coff_data (link_info.output_bfd)->pe == 0)
Line 1203... Line 1425...
1203
      /* Iterate over all sections of all input BFDs, checking
1425
      if (bfd_link_relocatable (&link_info))
1204
         for any that begin 'debug_' and are long names.  */
1426
	pe_use_coff_long_section_names = 1;
1205
      LANG_FOR_EACH_INPUT_STATEMENT (is)
1427
      else
1206
	{
1428
	{
1207
	  int found_debug = 0;
1429
      /* Iterate over all sections of all input BFDs, checking
-
 
1430
         for any that begin 'debug_' and are long names.  */
-
 
1431
      LANG_FOR_EACH_INPUT_STATEMENT (is)
-
 
1432
	{
-
 
1433
	  int found_debug = 0;
1208
	  bfd_map_over_sections (is->the_bfd, debug_section_p, &found_debug);
1434
 
1209
	  if (found_debug)
1435
	  bfd_map_over_sections (is->the_bfd, debug_section_p, &found_debug);
1210
	    {
1436
	  if (found_debug)
1211
	      pe_use_coff_long_section_names = 1;
1437
	    {
1212
	      break;
1438
	      pe_use_coff_long_section_names = 1;
-
 
1439
	      break;
1213
	    }
1440
	    }
1214
	}
1441
	}
1215
    }
1442
    }
1216
 
1443
    }
1217
  pe_output_file_set_long_section_names (link_info.output_bfd);
1444
 
1218
 
1445
  pe_output_file_set_long_section_names (link_info.output_bfd);
1219
#ifdef DLL_SUPPORT
1446
 
1220
  if (pe_enable_stdcall_fixup) /* -1=warn or 1=disable */
1447
#ifdef DLL_SUPPORT
-
 
1448
  if (pe_enable_stdcall_fixup) /* -1=warn or 1=disable */
Line 1221... Line 1449...
1221
    pe_fixup_stdcalls ();
1449
    pe_fixup_stdcalls ();
Line 1222... Line 1450...
1222
 
1450
 
1223
  pe_process_import_defs (link_info.output_bfd, &link_info);
1451
  pe_process_import_defs (link_info.output_bfd, &link_info);
Line 1233... Line 1461...
1233
  if (!link_info.relocatable)
1461
  if (!bfd_link_relocatable (&link_info))
1234
    pe_dll_build_sections (link_info.output_bfd, &link_info);
1462
    pe_dll_build_sections (link_info.output_bfd, &link_info);
1235
#else
1463
#else
Line 1236... Line 1464...
1236
  if (link_info.shared)
1464
  if (bfd_link_pic (&link_info))
1237
    pe_dll_build_sections (link_info.output_bfd, &link_info);
1465
    pe_dll_build_sections (link_info.output_bfd, &link_info);
1238
  else
1466
  else
1239
    pe_exe_build_sections (link_info.output_bfd, &link_info);
1467
    pe_exe_build_sections (link_info.output_bfd, &link_info);
1240
#endif
1468
#endif
1241
#endif /* DLL_SUPPORT */
1469
#endif /* DLL_SUPPORT */
1242
 
1470
 
1243
#if defined(TARGET_IS_armpe) || defined(TARGET_IS_arm_epoc_pe) || defined(TARGET_IS_arm_wince_pe)
1471
#if defined(TARGET_IS_armpe) || defined(TARGET_IS_arm_epoc_pe) || defined(TARGET_IS_arm_wince_pe)
1244
  if (strstr (bfd_get_target (link_info.output_bfd), "arm") == NULL)
1472
  if (strstr (bfd_get_target (link_info.output_bfd), "arm") == NULL)
1245
    {
1473
    {
Line 1656... Line 1884...
1656
	    link_info.shared = 1;
1884
	    link_info.type = type_dll;
1657
 
1885
 
Line 1658... Line 1886...
1658
	  if (pe_def_file->base_address != (bfd_vma)(-1))
1886
	  if (pe_def_file->base_address != (bfd_vma)(-1))
1659
	    {
1887
	    {
1660
	      pe.ImageBase
1888
	      pe.ImageBase
Line 1661... Line 1889...
1661
		= pe_data (link_info.output_bfd)->pe_opthdr.ImageBase
1889
		= pe_data (link_info.output_bfd)->pe_opthdr.ImageBase
1662
		= init[IMAGEBASEOFF].value
1890
		= init[IMAGEBASEOFF].value
1663
		= pe_def_file->base_address;
1891
		= pe_def_file->base_address;
1664
	      init[IMAGEBASEOFF].inited = 1;
1892
	      init[IMAGEBASEOFF].inited = 1;
Line 1765... Line 1993...
1765
  if (link_info.shared
1993
  if (bfd_link_pic (&link_info)
Line 1766... Line 1994...
1766
#if !defined(TARGET_IS_shpe)
1994
#if !defined(TARGET_IS_shpe)
Line 1767... Line 1995...
1767
      || (!link_info.relocatable && pe_def_file->num_exports != 0)
1995
      || (!bfd_link_relocatable (&link_info)
1768
#endif
1996
	  && pe_def_file->num_exports != 0)
1769
    )
1997
#endif
-
 
1998
    )
1770
    {
1999
    {
1771
      pe_dll_fill_sections (link_info.output_bfd, &link_info);
2000
      pe_dll_fill_sections (link_info.output_bfd, &link_info);
1772
      if (pe_implib_filename)
2001
      if (pe_implib_filename)
1773
	pe_dll_generate_implib (pe_def_file, pe_implib_filename, &link_info);
2002
	pe_dll_generate_implib (pe_def_file, pe_implib_filename, &link_info);
1774
    }
2003
    }
1775
#if defined(TARGET_IS_shpe)
2004
#if defined(TARGET_IS_shpe)
Line 1826... Line 2055...
1826
  if (!link_info.relocatable
2055
  if (!bfd_link_relocatable (&link_info)
1827
      && (dollar = strchr (secname, '$')) != NULL)
2056
      && (dollar = strchr (secname, '$')) != NULL)
1828
    {
2057
    {
Line 1829... Line 2058...
1829
      size_t len = dollar - secname;
2058
      size_t len = dollar - secname;
1830
      char *newname = xmalloc (len + 1);
2059
      char *newname = xmalloc (len + 1);
1831
      memcpy (newname, secname, len);
2060
      memcpy (newname, secname, len);
1832
      newname[len] = '\0';
2061
      newname[len] = '\0';
1833
      secname = newname;
2062
      secname = newname;
1834
    }
2063
    }
1835
 
2064
 
Line 1908... Line 2137...
1908
 
2137
      flagword flags;
1909
      if (!orphan_init_done)
2138
      asection *nexts;
1910
	{
2139
 
1911
	  struct orphan_save *ho;
2140
      if (!orphan_init_done)
1912
	  for (ho = hold; ho < hold + sizeof (hold) / sizeof (hold[0]); ++ho)
2141
	{
-
 
2142
	  struct orphan_save *ho;
-
 
2143
	  for (ho = hold; ho < hold + sizeof (hold) / sizeof (hold[0]); ++ho)
Line 1913... Line 2144...
1913
	    if (ho->name != NULL)
2144
	    if (ho->name != NULL)
1914
	      {
2145
	      {
1915
		ho->os = lang_output_section_find (ho->name);
2146
		ho->os = lang_output_section_find (ho->name);
1916
		if (ho->os != NULL && ho->os->flags == 0)
2147
		if (ho->os != NULL && ho->os->flags == 0)
Line 1925... Line 2156...
1925
      place = NULL;
2156
      flags = s->flags;
Line 1926... Line 2157...
1926
      if ((s->flags & SEC_ALLOC) == 0)
2157
      nexts = s;
1927
	;
2158
      while ((nexts = bfd_get_next_section_by_name (nexts->owner, nexts)))
Line -... Line 2159...
-
 
2159
	if (nexts->output_section == NULL
-
 
2160
	    && (nexts->flags & SEC_EXCLUDE) == 0
-
 
2161
	    && ((nexts->flags ^ flags) & (SEC_LOAD | SEC_ALLOC)) == 0
-
 
2162
	    && (nexts->owner->flags & DYNAMIC) == 0
-
 
2163
	    && nexts->owner->usrdata != NULL
-
 
2164
	    && !(((lang_input_statement_type *) nexts->owner->usrdata)
-
 
2165
		 ->flags.just_syms))
-
 
2166
	  flags = (((flags ^ SEC_READONLY) | (nexts->flags ^ SEC_READONLY))
-
 
2167
		   ^ SEC_READONLY);
-
 
2168
      place = NULL;
-
 
2169
      if ((flags & SEC_ALLOC) == 0)
-
 
2170
	;
1928
      else if ((s->flags & (SEC_LOAD | SEC_HAS_CONTENTS)) == 0)
2171
      else if ((flags & (SEC_LOAD | SEC_HAS_CONTENTS)) == 0)
1929
	place = &hold[orphan_bss];
2172
	place = &hold[orphan_bss];
1930
      else if ((s->flags & SEC_READONLY) == 0)
2173
      else if ((flags & SEC_READONLY) == 0)
1931
	place = &hold[orphan_data];
2174
	place = &hold[orphan_data];
1932
      else if ((s->flags & SEC_CODE) == 0)
2175
      else if ((flags & SEC_CODE) == 0)
1933
	{
2176
	{
1934
	  place = (!strncmp (secname, ".idata$", 7) ? &hold[orphan_idata]
2177
	  place = (!strncmp (secname, ".idata$", 7) ? &hold[orphan_idata]
1935
						     : &hold[orphan_rodata]);
2178
						     : &hold[orphan_rodata]);
1936
	}
2179
	}
1937
      else
2180
      else
1938
	place = &hold[orphan_text];
2181
	place = &hold[orphan_text];
1939
 
2182
 
1940
      after = NULL;
2183
      after = NULL;
Line 1947... Line 2190...
1947
	    after = lang_output_section_find_by_flags (s, &place->os, NULL);
2190
	    after = lang_output_section_find_by_flags (s, flags, &place->os,
1948
	  if (after == NULL)
2191
						       NULL);
1949
	    /* *ABS* is always the first output section statement.  */
2192
	  if (after == NULL)
1950
	    after = (&lang_output_section_statement.head
2193
	    /* *ABS* is always the first output section statement.  */
1951
		     ->output_section_statement);
2194
	    after = (&lang_output_section_statement.head
1952
	}
2195
		     ->output_section_statement);
-
 
2196
	}
1953
 
2197
 
1954
      /* All sections in an executable must be aligned to a page boundary.
2198
      /* All sections in an executable must be aligned to a page boundary.
1955
	 In a relocatable link, just preserve the incoming alignment; the
2199
	 In a relocatable link, just preserve the incoming alignment; the
1956
	 address is discarded by lang_insert_orphan in that case, anyway.  */
2200
	 address is discarded by lang_insert_orphan in that case, anyway.  */
1957
      address = exp_unop (ALIGN_K, exp_nameop (NAME, "__section_alignment__"));
2201
      address = exp_unop (ALIGN_K, exp_nameop (NAME, "__section_alignment__"));
Line 1960... Line 2204...
1960
      if (link_info.relocatable)
2204
      if (bfd_link_relocatable (&link_info))
1961
	{
2205
	{
1962
	  os->section_alignment = s->alignment_power;
2206
	  os->section_alignment = s->alignment_power;
1963
	  os->bfd_section->alignment_power = s->alignment_power;
2207
	  os->bfd_section->alignment_power = s->alignment_power;
1964
	}
2208
	}
1965
    }
2209
    }
1966
 
2210
 
1967
  /* If the section name has a '$', sort it with the other '$'
2211
  /* If the section name has a '$', sort it with the other '$'
1968
     sections.  */
2212
     sections.  */
1969
  for (pl = &os->children.head; *pl != NULL; pl = &(*pl)->header.next)
2213
  for (pl = &os->children.head; *pl != NULL; pl = &(*pl)->header.next)
1970
    {
2214
    {
Line 2037... Line 2281...
2037
  if (! entry->flags.maybe_archive)
2281
  if (! entry->flags.maybe_archive || entry->flags.full_name_provided)
2038
    return FALSE;
2282
    return FALSE;
2039
 
2283
 
Line 2040... Line 2284...
2040
  filename = entry->filename;
2284
  filename = entry->filename;
2041
 
2285
 
Line 2042... Line 2286...
2042
  if (format_max_len == 0)
2286
  if (format_max_len == 0)
Line 2043... Line 2287...
2043
    /* We need to allow space in the memory that we are going to allocate
2287
    /* We need to allow space in the memory that we are going to allocate
Line 2110... Line 2354...
2110
  if (link_info.relocatable && config.build_constructors)
2354
  if (bfd_link_relocatable (&link_info) && config.build_constructors)
2111
    return
2355
    return
2112
"/* Script for ld -Ur: link w/out relocation, do create constructors */\n\
2356
"/* Script for ld -Ur: link w/out relocation, do create constructors */\n\
2113
OUTPUT_FORMAT(pe-i386)\n\
2357
/* Copyright (C) 2014-2015 Free Software Foundation, Inc.\n\
Line 2114... Line 2358...
2114
SEARCH_DIR(\"=/usr/local/lib\"); SEARCH_DIR(\"=/lib\"); SEARCH_DIR(\"=/usr/lib\");\n\
2358
   Copying and distribution of this script, with or without modification,\n\
2115
SECTIONS\n\
2359
   are permitted in any medium without royalty provided the copyright\n\
2116
{\n\
2360
   notice and this notice are preserved.  */\n\
-
 
2361
OUTPUT_FORMAT(pe-i386)\n\
-
 
2362
SEARCH_DIR(\"=/home/autobuild/tools/win32/mingw32/lib\"); SEARCH_DIR(\"=/home/autobuild/tools/win32/lib\"); SEARCH_DIR(\"=/usr/local/lib\"); SEARCH_DIR(\"=/lib\"); SEARCH_DIR(\"=/usr/lib\");\n\
-
 
2363
SECTIONS\n\
-
 
2364
{\n\
2117
  .text  :\n\
2365
  .text  :\n\
2118
  {\n\
2366
  {\n\
2119
    *(.text)\n\
2367
    *(.text)\n\
2120
    *(.glue_7t)\n\
2368
    *(.glue_7t)\n\
2121
    *(.glue_7)\n\
2369
    *(.glue_7)\n\
2122
     ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;\n\
2370
     ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;\n\
2123
			LONG (-1);*(.ctors); *(.ctor); *(SORT(.ctors.*));  LONG (0);\n\
2371
			LONG (-1);*(.ctors); *(.ctor); *(SORT(.ctors.*));  LONG (0);\n\
Line 2132... Line 2380...
2132
     \".data_cygwin_nocopy\" and explicitly include it after __data_end__. */\n\
2380
     \".data_cygwin_nocopy\" and explicitly include it after __data_end__. */\n"
2133
  .data  :\n\
2381
"  .data  :\n\
2134
  {\n\
2382
  {\n\
2135
    *(.data)\n\
2383
    *(.data)\n\
2136
    *(.data2)\n"
2384
    *(.data2)\n\
2137
"    *(.jcr)\n\
2385
    KEEP(*(.jcr))\n\
2138
  }\n\
2386
  }\n\
2139
  .rdata  :\n\
2387
  .rdata  :\n\
2140
  {\n\
2388
  {\n\
2141
    *(.rdata)\n\
2389
    *(.rdata)\n\
2142
    *(.rdata_runtime_pseudo_reloc)\n\
2390
    *(.rdata_runtime_pseudo_reloc)\n\
2143
  }\n\
2391
  }\n\
2144
  .eh_frame  :\n\
2392
  .eh_frame  :\n\
2145
  {\n\
2393
  {\n\
2146
    *(.eh_frame*)\n\
2394
    KEEP(*(.eh_frame*))\n\
2147
  }\n\
2395
  }\n\
2148
  .pdata  :\n\
2396
  .pdata  :\n\
2149
  {\n\
2397
  {\n\
2150
    *(.pdata)\n\
2398
    KEEP(*(.pdata))\n\
2151
  }\n\
2399
  }\n\
2152
  .bss  :\n\
2400
  .bss  :\n\
2153
  {\n\
2401
  {\n\
2154
    *(.bss)\n\
2402
    *(.bss)\n\
2155
    *(COMMON)\n\
2403
    *(COMMON)\n\
2156
  }\n\
2404
  }\n\
2157
  .edata  :\n\
2405
  .edata  :\n"
2158
  {\n\
2406
"  {\n\
2159
    *(.edata)\n\
2407
    *(.edata)\n\
2160
  }\n\
2408
  }\n\
2161
  /DISCARD/ :\n"
2409
  /DISCARD/ :\n\
2162
"  {\n\
2410
  {\n\
2163
    *(.debug$S)\n\
2411
    *(.debug$S)\n\
2164
    *(.debug$T)\n\
2412
    *(.debug$T)\n\
2165
    *(.debug$F)\n\
2413
    *(.debug$F)\n\
2166
    *(.drectve)\n\
2414
    *(.drectve)\n\
2167
  }\n\
2415
  }\n\
2168
  .idata  :\n\
2416
  .idata  :\n\
2169
  {\n\
2417
  {\n\
2170
    /* This cannot currently be handled with grouped sections.\n\
2418
    /* This cannot currently be handled with grouped sections.\n\
2171
	See pe.em:sort_sections.  */\n\
2419
	See pe.em:sort_sections.  */\n\
2172
  }\n\
2420
  }\n\
Line 2182... Line 2430...
2182
  {\n\
2430
  {\n"
2183
  }\n\
2431
"  }\n\
2184
  .endjunk  :\n\
2432
  .endjunk  :\n\
2185
  {\n\
2433
  {\n\
2186
    /* end is deprecated, don't use it */\n"
2434
    /* end is deprecated, don't use it */\n\
2187
"  }\n\
2435
  }\n\
2188
  .rsrc  :\n\
2436
  .rsrc  : SUBALIGN(4)\n\
2189
  {\n\
2437
  {\n\
2190
    *(.rsrc)\n\
2438
    *(.rsrc)\n\
2191
  }\n\
2439
  }\n\
2192
  .reloc  :\n\
2440
  .reloc  :\n\
2193
  {\n\
2441
  {\n\
2194
    *(.reloc)\n\
2442
    *(.reloc)\n\
2195
  }\n\
2443
  }\n\
2196
  .stab   :\n\
2444
  .stab   :\n\
2197
  {\n\
2445
  {\n\
2198
    *(.stab)\n\
2446
    *(.stab)\n\
Line 2207... Line 2455...
2207
     section VMA at 0, the PE format will not allow it.  */\n\
2455
     section VMA at 0, the PE format will not allow it.  */\n"
2208
  /* DWARF 1.1 and DWARF 2.  */\n\
2456
"  /* DWARF 1.1 and DWARF 2.  */\n\
2209
  .debug_aranges   :\n\
2457
  .debug_aranges   :\n\
2210
  {\n\
2458
  {\n\
2211
    *(.debug_aranges)\n"
2459
    *(.debug_aranges)\n\
2212
"  }\n\
2460
  }\n\
2213
  .zdebug_aranges   :\n\
2461
  .zdebug_aranges   :\n\
2214
  {\n\
2462
  {\n\
2215
    *(.zdebug_aranges)\n\
2463
    *(.zdebug_aranges)\n\
2216
  }\n\
2464
  }\n\
2217
  .debug_pubnames   :\n\
2465
  .debug_pubnames   :\n\
2218
  {\n\
2466
  {\n\
2219
    *(.debug_pubnames)\n\
2467
    *(.debug_pubnames)\n\
2220
  }\n\
2468
  }\n\
2221
  .zdebug_pubnames   :\n\
2469
  .zdebug_pubnames   :\n\
2222
  {\n\
2470
  {\n\
Line 2350... Line 2598...
2350
  ; else if (link_info.relocatable) return
2598
  ; else if (bfd_link_relocatable (&link_info)) return
2351
"/* Script for ld -r: link without relocation */\n\
2599
"/* Script for ld -r: link without relocation */\n\
2352
OUTPUT_FORMAT(pe-i386)\n\
2600
/* Copyright (C) 2014-2015 Free Software Foundation, Inc.\n\
2353
SEARCH_DIR(\"=/usr/local/lib\"); SEARCH_DIR(\"=/lib\"); SEARCH_DIR(\"=/usr/lib\");\n\
2601
   Copying and distribution of this script, with or without modification,\n\
2354
SECTIONS\n\
2602
   are permitted in any medium without royalty provided the copyright\n\
2355
{\n\
2603
   notice and this notice are preserved.  */\n\
2356
  .text  :\n\
2604
OUTPUT_FORMAT(pe-i386)\n\
-
 
2605
SEARCH_DIR(\"=/home/autobuild/tools/win32/mingw32/lib\"); SEARCH_DIR(\"=/home/autobuild/tools/win32/lib\"); SEARCH_DIR(\"=/usr/local/lib\"); SEARCH_DIR(\"=/lib\"); SEARCH_DIR(\"=/usr/lib\");\n\
-
 
2606
SECTIONS\n\
-
 
2607
{\n\
-
 
2608
  .text  :\n\
2357
  {\n\
2609
  {\n\
2358
    *(.text)\n\
2610
    *(.text)\n\
2359
    *(.glue_7t)\n\
2611
    *(.glue_7t)\n\
2360
    *(.glue_7)\n\
2612
    *(.glue_7)\n\
2361
    /* ??? Why is .gcc_exc here?  */\n\
2613
    /* ??? Why is .gcc_exc here?  */\n\
2362
  }\n\
2614
  }\n\
2363
  /* The Cygwin32 library uses a section to avoid copying certain data\n\
2615
  /* The Cygwin32 library uses a section to avoid copying certain data\n\
Line 2371... Line 2623...
2371
    *(.data2)\n\
2623
    *(.data2)\n"
2372
    *(.jcr)\n\
2624
"    KEEP(*(.jcr))\n\
2373
  }\n\
2625
  }\n\
2374
  .rdata  :\n\
2626
  .rdata  :\n\
2375
  {\n"
2627
  {\n\
2376
"    *(.rdata)\n\
2628
    *(.rdata)\n\
2377
    *(.rdata_runtime_pseudo_reloc)\n\
2629
    *(.rdata_runtime_pseudo_reloc)\n\
2378
  }\n\
2630
  }\n\
2379
  .eh_frame  :\n\
2631
  .eh_frame  :\n\
2380
  {\n\
2632
  {\n\
2381
    *(.eh_frame*)\n\
2633
    KEEP(*(.eh_frame*))\n\
2382
  }\n\
2634
  }\n\
2383
  .pdata  :\n\
2635
  .pdata  :\n\
2384
  {\n\
2636
  {\n\
2385
    *(.pdata)\n\
2637
    KEEP(*(.pdata))\n\
2386
  }\n\
2638
  }\n\
2387
  .bss  :\n\
2639
  .bss  :\n\
2388
  {\n\
2640
  {\n\
2389
    *(.bss)\n\
2641
    *(.bss)\n\
2390
    *(COMMON)\n\
2642
    *(COMMON)\n\
2391
  }\n\
2643
  }\n\
2392
  .edata  :\n\
2644
  .edata  :\n\
2393
  {\n\
2645
  {\n\
2394
    *(.edata)\n\
2646
    *(.edata)\n\
2395
  }\n\
2647
  }\n\
2396
  /DISCARD/ :\n\
2648
  /DISCARD/ :\n"
2397
  {\n\
2649
"  {\n\
2398
    *(.debug$S)\n\
2650
    *(.debug$S)\n\
2399
    *(.debug$T)\n\
2651
    *(.debug$T)\n\
2400
    *(.debug$F)\n"
2652
    *(.debug$F)\n\
2401
"    *(.drectve)\n\
2653
    *(.drectve)\n\
2402
  }\n\
2654
  }\n\
2403
  .idata  :\n\
2655
  .idata  :\n\
2404
  {\n\
2656
  {\n\
2405
    /* This cannot currently be handled with grouped sections.\n\
2657
    /* This cannot currently be handled with grouped sections.\n\
2406
	See pe.em:sort_sections.  */\n\
2658
	See pe.em:sort_sections.  */\n\
2407
  }\n\
2659
  }\n\
2408
  .CRT  :\n\
2660
  .CRT  :\n\
2409
  {\n\
2661
  {\n\
2410
    /* ___crt_xl_end__ is defined in the TLS Directory support code */\n\
2662
    /* ___crt_xl_end__ is defined in the TLS Directory support code */\n\
2411
  }\n\
2663
  }\n\
Line 2421... Line 2673...
2421
    /* end is deprecated, don't use it */\n\
2673
    /* end is deprecated, don't use it */\n"
2422
  }\n\
2674
"  }\n\
2423
  .rsrc  :\n\
2675
  .rsrc  : SUBALIGN(4)\n\
2424
  {\n\
2676
  {\n\
2425
    *(.rsrc)\n"
2677
    *(.rsrc)\n\
2426
"  }\n\
2678
  }\n\
2427
  .reloc  :\n\
-
 
2428
  {\n\
-
 
2429
    *(.reloc)\n\
-
 
2430
  }\n\
-
 
2431
  .stab   :\n\
2679
  .reloc  :\n\
-
 
2680
  {\n\
-
 
2681
    *(.reloc)\n\
-
 
2682
  }\n\
-
 
2683
  .stab   :\n\
2432
  {\n\
2684
  {\n\
2433
    *(.stab)\n\
2685
    *(.stab)\n\
2434
  }\n\
2686
  }\n\
2435
  .stabstr   :\n\
2687
  .stabstr   :\n\
2436
  {\n\
2688
  {\n\
Line 2446... Line 2698...
2446
    *(.debug_aranges)\n\
2698
    *(.debug_aranges)\n"
2447
  }\n\
2699
"  }\n\
2448
  .zdebug_aranges   :\n\
2700
  .zdebug_aranges   :\n\
2449
  {\n\
2701
  {\n\
2450
    *(.zdebug_aranges)\n"
2702
    *(.zdebug_aranges)\n\
2451
"  }\n\
2703
  }\n\
2452
  .debug_pubnames   :\n\
2704
  .debug_pubnames   :\n\
2453
  {\n\
2705
  {\n\
2454
    *(.debug_pubnames)\n\
2706
    *(.debug_pubnames)\n\
2455
  }\n\
2707
  }\n\
2456
  .zdebug_pubnames   :\n\
2708
  .zdebug_pubnames   :\n\
2457
  {\n\
2709
  {\n\
2458
    *(.zdebug_pubnames)\n\
2710
    *(.zdebug_pubnames)\n\
2459
  }\n\
2711
  }\n\
2460
  .debug_pubtypes   :\n\
2712
  .debug_pubtypes   :\n\
2461
  {\n\
2713
  {\n\
Line 2587... Line 2839...
2587
OUTPUT_FORMAT(pei-i386)\n\
2839
/* Copyright (C) 2014-2015 Free Software Foundation, Inc.\n\
2588
SEARCH_DIR(\"=/usr/local/lib\"); SEARCH_DIR(\"=/lib\"); SEARCH_DIR(\"=/usr/lib\");\n\
2840
   Copying and distribution of this script, with or without modification,\n\
2589
SECTIONS\n\
2841
   are permitted in any medium without royalty provided the copyright\n\
2590
{\n\
2842
   notice and this notice are preserved.  */\n\
2591
  /* Make the virtual address and file offset synced if the alignment is\n\
2843
OUTPUT_FORMAT(pei-i386)\n\
-
 
2844
SEARCH_DIR(\"=/home/autobuild/tools/win32/mingw32/lib\"); SEARCH_DIR(\"=/home/autobuild/tools/win32/lib\"); SEARCH_DIR(\"=/usr/local/lib\"); SEARCH_DIR(\"=/lib\"); SEARCH_DIR(\"=/usr/lib\");\n\
-
 
2845
SECTIONS\n\
-
 
2846
{\n\
-
 
2847
  /* Make the virtual address and file offset synced if the alignment is\n\
2592
     lower than the target page size. */\n\
2848
     lower than the target page size. */\n\
2593
  . = SIZEOF_HEADERS;\n\
2849
  . = SIZEOF_HEADERS;\n\
2594
  . = ALIGN(__section_alignment__);\n\
2850
  . = ALIGN(__section_alignment__);\n\
2595
  .text  __image_base__ + ( __section_alignment__ < 0x1000 ? . : __section_alignment__ ) :\n\
2851
  .text  __image_base__ + ( __section_alignment__ < 0x1000 ? . : __section_alignment__ ) :\n\
2596
  {\n\
2852
  {\n\
2597
     *(.init)\n\
2853
     KEEP(*(.init))\n\
2598
    *(.text)\n\
2854
    *(.text)\n\
2599
    *(SORT(.text$*))\n\
2855
    *(SORT(.text$*))\n\
2600
     *(.text.*)\n\
2856
     *(.text.*)\n\
2601
     *(.gnu.linkonce.t.*)\n\
2857
     *(.gnu.linkonce.t.*)\n\
2602
    *(.glue_7t)\n\
2858
    *(.glue_7t)\n\
2603
    *(.glue_7)\n\
2859
    *(.glue_7)\n\
2604
     ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;\n\
2860
     ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;\n\
2605
			LONG (-1);*(.ctors); *(.ctor); *(SORT(.ctors.*));  LONG (0);\n\
2861
			LONG (-1);*(.ctors); *(.ctor); *(SORT(.ctors.*));  LONG (0);\n\
2606
     ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;\n\
2862
     ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;\n"
2607
			LONG (-1); *(.dtors); *(.dtor); *(SORT(.dtors.*));  LONG (0);\n\
2863
"			LONG (-1); *(.dtors); *(.dtor); *(SORT(.dtors.*));  LONG (0);\n\
2608
     *(.fini)\n\
2864
     *(.fini)\n\
2609
    /* ??? Why is .gcc_exc here?  */\n\
2865
    /* ??? Why is .gcc_exc here?  */\n\
2610
     *(.gcc_exc)\n"
2866
     *(.gcc_exc)\n\
2611
"    PROVIDE (etext = .);\n\
2867
    PROVIDE (etext = .);\n\
2612
    PROVIDE (_etext = .);\n\
2868
    PROVIDE (_etext = .);\n\
2613
     *(.gcc_except_table)\n\
2869
     *(.gcc_except_table)\n\
2614
  }\n\
2870
  }\n\
2615
  /* The Cygwin32 library uses a section to avoid copying certain data\n\
2871
  /* The Cygwin32 library uses a section to avoid copying certain data\n\
2616
     on fork.  This used to be named \".data\".  The linker used\n\
2872
     on fork.  This used to be named \".data\".  The linker used\n\
2617
     to include this between __data_start__ and __data_end__, but that\n\
2873
     to include this between __data_start__ and __data_end__, but that\n\
2618
     breaks building the cygwin32 dll.  Instead, we name the section\n\
2874
     breaks building the cygwin32 dll.  Instead, we name the section\n\
2619
     \".data_cygwin_nocopy\" and explicitly include it after __data_end__. */\n\
2875
     \".data_cygwin_nocopy\" and explicitly include it after __data_end__. */\n\
2620
  .data BLOCK(__section_alignment__) :\n\
2876
  .data BLOCK(__section_alignment__) :\n\
2621
  {\n\
2877
  {\n\
Line 2626... Line 2882...
2626
    *(.jcr)\n\
2882
    KEEP(*(.jcr))\n\
2627
    __data_end__ = . ;\n\
2883
    __data_end__ = . ;\n\
2628
    *(.data_cygwin_nocopy)\n\
2884
    *(.data_cygwin_nocopy)\n\
2629
  }\n\
2885
  }\n\
2630
  .rdata BLOCK(__section_alignment__) :\n\
2886
  .rdata BLOCK(__section_alignment__) :\n\
2631
  {\n\
2887
  {\n"
2632
    *(.rdata)\n\
2888
"    *(.rdata)\n\
2633
             *(SORT(.rdata$*))\n\
2889
             *(SORT(.rdata$*))\n\
2634
    __rt_psrelocs_start = .;\n\
2890
    __rt_psrelocs_start = .;\n\
2635
    *(.rdata_runtime_pseudo_reloc)\n"
2891
    *(.rdata_runtime_pseudo_reloc)\n\
2636
"    __rt_psrelocs_end = .;\n\
2892
    __rt_psrelocs_end = .;\n\
2637
  }\n\
2893
  }\n\
2638
  __rt_psrelocs_size = __rt_psrelocs_end - __rt_psrelocs_start;\n\
2894
  __rt_psrelocs_size = __rt_psrelocs_end - __rt_psrelocs_start;\n\
2639
  ___RUNTIME_PSEUDO_RELOC_LIST_END__ = .;\n\
2895
  ___RUNTIME_PSEUDO_RELOC_LIST_END__ = .;\n\
2640
  __RUNTIME_PSEUDO_RELOC_LIST_END__ = .;\n\
2896
  __RUNTIME_PSEUDO_RELOC_LIST_END__ = .;\n\
2641
  ___RUNTIME_PSEUDO_RELOC_LIST__ = . - __rt_psrelocs_size;\n\
2897
  ___RUNTIME_PSEUDO_RELOC_LIST__ = . - __rt_psrelocs_size;\n\
2642
  __RUNTIME_PSEUDO_RELOC_LIST__ = . - __rt_psrelocs_size;\n\
2898
  __RUNTIME_PSEUDO_RELOC_LIST__ = . - __rt_psrelocs_size;\n\
2643
  .eh_frame BLOCK(__section_alignment__) :\n\
2899
  .eh_frame BLOCK(__section_alignment__) :\n\
2644
  {\n\
2900
  {\n\
2645
    *(.eh_frame*)\n\
2901
    KEEP(*(.eh_frame*))\n\
2646
  }\n\
2902
  }\n\
2647
  .pdata BLOCK(__section_alignment__) :\n\
2903
  .pdata BLOCK(__section_alignment__) :\n\
2648
  {\n\
2904
  {\n\
2649
    *(.pdata)\n\
2905
    KEEP(*(.pdata))\n\
2650
  }\n\
2906
  }\n\
2651
  .bss BLOCK(__section_alignment__) :\n\
2907
  .bss BLOCK(__section_alignment__) :\n\
2652
  {\n\
2908
  {\n\
2653
    __bss_start__ = . ;\n\
2909
    __bss_start__ = . ;\n\
2654
    *(.bss)\n\
2910
    *(.bss)\n\
2655
    *(COMMON)\n\
2911
    *(COMMON)\n\
2656
    __bss_end__ = . ;\n\
2912
    __bss_end__ = . ;\n"
2657
  }\n\
2913
"  }\n\
2658
  .edata BLOCK(__section_alignment__) :\n\
2914
  .edata BLOCK(__section_alignment__) :\n\
2659
  {\n\
2915
  {\n\
2660
    *(.edata)\n"
2916
    *(.edata)\n\
2661
"  }\n\
2917
  }\n\
2662
  /DISCARD/ :\n\
2918
  /DISCARD/ :\n\
2663
  {\n\
2919
  {\n\
2664
    *(.debug$S)\n\
2920
    *(.debug$S)\n\
2665
    *(.debug$T)\n\
2921
    *(.debug$T)\n\
2666
    *(.debug$F)\n\
2922
    *(.debug$F)\n\
2667
    *(.drectve)\n\
2923
    *(.drectve)\n\
2668
     *(.note.GNU-stack)\n\
2924
     *(.note.GNU-stack)\n\
2669
     *(.gnu.lto_*)\n\
2925
     *(.gnu.lto_*)\n\
2670
  }\n\
2926
  }\n\
2671
  .idata BLOCK(__section_alignment__) :\n\
2927
  .idata BLOCK(__section_alignment__) :\n\
Line 2675... Line 2931...
2675
    SORT(*)(.idata$2)\n\
2931
    KEEP (SORT(*)(.idata$2))\n\
2676
    SORT(*)(.idata$3)\n\
2932
    KEEP (SORT(*)(.idata$3))\n\
2677
    /* These zeroes mark the end of the import list.  */\n\
2933
    /* These zeroes mark the end of the import list.  */\n\
2678
    LONG (0); LONG (0); LONG (0); LONG (0); LONG (0);\n\
2934
    LONG (0); LONG (0); LONG (0); LONG (0); LONG (0);\n\
2679
    SORT(*)(.idata$4)\n\
2935
    KEEP (SORT(*)(.idata$4))\n\
2680
    __IAT_start__ = .;\n\
2936
    __IAT_start__ = .;\n\
2681
    SORT(*)(.idata$5)\n\
2937
    KEEP (SORT(*)(.idata$5))\n"
2682
    __IAT_end__ = .;\n\
2938
"    __IAT_end__ = .;\n\
2683
    SORT(*)(.idata$6)\n\
2939
    KEEP (SORT(*)(.idata$6))\n\
2684
    SORT(*)(.idata$7)\n\
2940
    KEEP (SORT(*)(.idata$7))\n\
2685
  }\n"
2941
  }\n\
2686
"  .CRT BLOCK(__section_alignment__) :\n\
2942
  .CRT BLOCK(__section_alignment__) :\n\
2687
  {\n\
2943
  {\n\
2688
    ___crt_xc_start__ = . ;\n\
2944
    ___crt_xc_start__ = . ;\n\
2689
    *(SORT(.CRT$XC*))  /* C initialization */\n\
2945
    KEEP (*(SORT(.CRT$XC*)))  /* C initialization */\n\
2690
    ___crt_xc_end__ = . ;\n\
2946
    ___crt_xc_end__ = . ;\n\
2691
    ___crt_xi_start__ = . ;\n\
2947
    ___crt_xi_start__ = . ;\n\
2692
    *(SORT(.CRT$XI*))  /* C++ initialization */\n\
2948
    KEEP (*(SORT(.CRT$XI*)))  /* C++ initialization */\n\
2693
    ___crt_xi_end__ = . ;\n\
2949
    ___crt_xi_end__ = . ;\n\
2694
    ___crt_xl_start__ = . ;\n\
2950
    ___crt_xl_start__ = . ;\n\
2695
    *(SORT(.CRT$XL*))  /* TLS callbacks */\n\
2951
    KEEP (*(SORT(.CRT$XL*)))  /* TLS callbacks */\n\
2696
    /* ___crt_xl_end__ is defined in the TLS Directory support code */\n\
2952
    /* ___crt_xl_end__ is defined in the TLS Directory support code */\n\
2697
    ___crt_xp_start__ = . ;\n\
2953
    ___crt_xp_start__ = . ;\n\
2698
    *(SORT(.CRT$XP*))  /* Pre-termination */\n\
2954
    KEEP (*(SORT(.CRT$XP*)))  /* Pre-termination */\n\
2699
    ___crt_xp_end__ = . ;\n\
2955
    ___crt_xp_end__ = . ;\n\
2700
    ___crt_xt_start__ = . ;\n\
2956
    ___crt_xt_start__ = . ;\n\
2701
    *(SORT(.CRT$XT*))  /* Termination */\n\
2957
    KEEP (*(SORT(.CRT$XT*)))  /* Termination */\n\
2702
    ___crt_xt_end__ = . ;\n\
2958
    ___crt_xt_end__ = . ;\n\
2703
  }\n\
2959
  }\n\
2704
  /* Windows TLS expects .tls$AAA to be at the start and .tls$ZZZ to be\n\
2960
  /* Windows TLS expects .tls$AAA to be at the start and .tls$ZZZ to be\n\
2705
     at the end of section.  This is important because _tls_start MUST\n\
2961
     at the end of section.  This is important because _tls_start MUST\n\
2706
     be at the beginning of the section to enable SECREL32 relocations with TLS\n\
2962
     be at the beginning of the section to enable SECREL32 relocations with TLS\n\
2707
     data.  */\n\
2963
     data.  */\n\
2708
  .tls BLOCK(__section_alignment__) :\n\
2964
  .tls BLOCK(__section_alignment__) :\n\
2709
  {\n\
2965
  {\n\
2710
    ___tls_start__ = . ;\n\
2966
    ___tls_start__ = . ;\n\
2711
    *(.tls$AAA)\n\
2967
    KEEP (*(.tls$AAA))\n\
2712
    *(.tls)\n\
2968
    KEEP (*(.tls))\n\
2713
    *(.tls$)\n\
2969
    KEEP (*(.tls$))\n\
2714
    *(SORT(.tls$*))\n\
2970
    KEEP (*(SORT(.tls$*)))\n\
2715
    *(.tls$ZZZ)\n\
2971
    KEEP (*(.tls$ZZZ))\n\
2716
    ___tls_end__ = . ;\n\
2972
    ___tls_end__ = . ;\n\
2717
  }\n\
2973
  }\n\
2718
  .endjunk BLOCK(__section_alignment__) :\n\
2974
  .endjunk BLOCK(__section_alignment__) :\n\
2719
  {\n\
2975
  {\n\
2720
    /* end is deprecated, don't use it */\n\
2976
    /* end is deprecated, don't use it */\n\
2721
    PROVIDE (end = .);\n\
2977
    PROVIDE (end = .);\n\
2722
    PROVIDE ( _end = .);\n\
2978
    PROVIDE ( _end = .);\n\
2723
     __end__ = .;\n\
2979
     __end__ = .;\n\
2724
  }\n\
2980
  }\n\
2725
  .rsrc BLOCK(__section_alignment__) :\n\
2981
  .rsrc BLOCK(__section_alignment__) : SUBALIGN(4)\n\
2726
  {\n\
2982
  {\n\
2727
    *(.rsrc)\n\
2983
    KEEP (*(.rsrc))\n\
2728
    *(SORT(.rsrc$*))\n\
2984
    KEEP (*(.rsrc$*))\n\
2729
  }\n\
2985
  }\n\
2730
  .reloc BLOCK(__section_alignment__) :\n\
2986
  .reloc BLOCK(__section_alignment__) :\n\
2731
  {\n\
2987
  {\n\
2732
    *(.reloc)\n\
2988
    *(.reloc)\n\
2733
  }\n\
2989
  }\n\
2734
  .stab BLOCK(__section_alignment__) (NOLOAD) :\n\
2990
  .stab BLOCK(__section_alignment__) (NOLOAD) :\n\
2735
  {\n\
2991
  {\n\
2736
    *(.stab)\n\
2992
    *(.stab)\n\
2737
  }\n\
2993
  }\n\
2738
  .stabstr BLOCK(__section_alignment__) (NOLOAD) :\n\
2994
  .stabstr BLOCK(__section_alignment__) (NOLOAD) :\n\
Line 2890... Line 3146...
2890
OUTPUT_FORMAT(pei-i386)\n\
3146
/* Copyright (C) 2014-2015 Free Software Foundation, Inc.\n\
2891
SEARCH_DIR(\"=/usr/local/lib\"); SEARCH_DIR(\"=/lib\"); SEARCH_DIR(\"=/usr/lib\");\n\
3147
   Copying and distribution of this script, with or without modification,\n\
2892
SECTIONS\n\
3148
   are permitted in any medium without royalty provided the copyright\n\
2893
{\n\
3149
   notice and this notice are preserved.  */\n\
2894
  /* Make the virtual address and file offset synced if the alignment is\n\
3150
OUTPUT_FORMAT(pei-i386)\n\
-
 
3151
SEARCH_DIR(\"=/home/autobuild/tools/win32/mingw32/lib\"); SEARCH_DIR(\"=/home/autobuild/tools/win32/lib\"); SEARCH_DIR(\"=/usr/local/lib\"); SEARCH_DIR(\"=/lib\"); SEARCH_DIR(\"=/usr/lib\");\n\
-
 
3152
SECTIONS\n\
-
 
3153
{\n\
-
 
3154
  /* Make the virtual address and file offset synced if the alignment is\n\
2895
     lower than the target page size. */\n\
3155
     lower than the target page size. */\n\
2896
  . = SIZEOF_HEADERS;\n\
3156
  . = SIZEOF_HEADERS;\n\
2897
  . = ALIGN(__section_alignment__);\n\
3157
  . = ALIGN(__section_alignment__);\n\
2898
  .text  __image_base__ + ( __section_alignment__ < 0x1000 ? . : __section_alignment__ ) :\n\
3158
  .text  __image_base__ + ( __section_alignment__ < 0x1000 ? . : __section_alignment__ ) :\n\
2899
  {\n\
3159
  {\n\
2900
     *(.init)\n\
3160
     KEEP(*(.init))\n\
2901
    *(.text)\n\
3161
    *(.text)\n\
2902
    *(SORT(.text$*))\n\
3162
    *(SORT(.text$*))\n\
2903
     *(.text.*)\n\
3163
     *(.text.*)\n\
2904
     *(.gnu.linkonce.t.*)\n\
3164
     *(.gnu.linkonce.t.*)\n\
2905
    *(.glue_7t)\n\
3165
    *(.glue_7t)\n\
2906
    *(.glue_7)\n\
3166
    *(.glue_7)\n\
2907
     ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;\n\
3167
     ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;\n\
2908
			LONG (-1);*(.ctors); *(.ctor); *(SORT(.ctors.*));  LONG (0);\n\
3168
			LONG (-1);*(.ctors); *(.ctor); *(SORT(.ctors.*));  LONG (0);\n\
2909
     ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;\n\
3169
     ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;\n"
2910
			LONG (-1); *(.dtors); *(.dtor); *(SORT(.dtors.*));  LONG (0);\n\
3170
"			LONG (-1); *(.dtors); *(.dtor); *(SORT(.dtors.*));  LONG (0);\n\
2911
     *(.fini)\n\
3171
     *(.fini)\n\
2912
    /* ??? Why is .gcc_exc here?  */\n\
3172
    /* ??? Why is .gcc_exc here?  */\n\
2913
     *(.gcc_exc)\n"
3173
     *(.gcc_exc)\n\
2914
"    PROVIDE (etext = .);\n\
3174
    PROVIDE (etext = .);\n\
2915
    PROVIDE (_etext = .);\n\
3175
    PROVIDE (_etext = .);\n\
2916
     *(.gcc_except_table)\n\
3176
     *(.gcc_except_table)\n\
2917
  }\n\
3177
  }\n\
2918
  /* The Cygwin32 library uses a section to avoid copying certain data\n\
3178
  /* The Cygwin32 library uses a section to avoid copying certain data\n\
2919
     on fork.  This used to be named \".data\".  The linker used\n\
3179
     on fork.  This used to be named \".data\".  The linker used\n\
2920
     to include this between __data_start__ and __data_end__, but that\n\
3180
     to include this between __data_start__ and __data_end__, but that\n\
2921
     breaks building the cygwin32 dll.  Instead, we name the section\n\
3181
     breaks building the cygwin32 dll.  Instead, we name the section\n\
2922
     \".data_cygwin_nocopy\" and explicitly include it after __data_end__. */\n\
3182
     \".data_cygwin_nocopy\" and explicitly include it after __data_end__. */\n\
2923
  .data BLOCK(__section_alignment__) :\n\
3183
  .data BLOCK(__section_alignment__) :\n\
2924
  {\n\
3184
  {\n\
Line 2929... Line 3189...
2929
    *(.jcr)\n\
3189
    KEEP(*(.jcr))\n\
2930
    __data_end__ = . ;\n\
3190
    __data_end__ = . ;\n\
2931
    *(.data_cygwin_nocopy)\n\
3191
    *(.data_cygwin_nocopy)\n\
2932
  }\n\
3192
  }\n\
2933
  .rdata BLOCK(__section_alignment__) :\n\
3193
  .rdata BLOCK(__section_alignment__) :\n\
2934
  {\n\
3194
  {\n"
2935
    *(.rdata)\n\
3195
"    *(.rdata)\n\
2936
             *(SORT(.rdata$*))\n\
3196
             *(SORT(.rdata$*))\n\
2937
    __rt_psrelocs_start = .;\n\
3197
    __rt_psrelocs_start = .;\n\
2938
    *(.rdata_runtime_pseudo_reloc)\n"
3198
    *(.rdata_runtime_pseudo_reloc)\n\
2939
"    __rt_psrelocs_end = .;\n\
3199
    __rt_psrelocs_end = .;\n\
2940
  }\n\
3200
  }\n\
2941
  __rt_psrelocs_size = __rt_psrelocs_end - __rt_psrelocs_start;\n\
3201
  __rt_psrelocs_size = __rt_psrelocs_end - __rt_psrelocs_start;\n\
2942
  ___RUNTIME_PSEUDO_RELOC_LIST_END__ = .;\n\
3202
  ___RUNTIME_PSEUDO_RELOC_LIST_END__ = .;\n\
2943
  __RUNTIME_PSEUDO_RELOC_LIST_END__ = .;\n\
3203
  __RUNTIME_PSEUDO_RELOC_LIST_END__ = .;\n\
2944
  ___RUNTIME_PSEUDO_RELOC_LIST__ = . - __rt_psrelocs_size;\n\
3204
  ___RUNTIME_PSEUDO_RELOC_LIST__ = . - __rt_psrelocs_size;\n\
2945
  __RUNTIME_PSEUDO_RELOC_LIST__ = . - __rt_psrelocs_size;\n\
3205
  __RUNTIME_PSEUDO_RELOC_LIST__ = . - __rt_psrelocs_size;\n\
2946
  .eh_frame BLOCK(__section_alignment__) :\n\
3206
  .eh_frame BLOCK(__section_alignment__) :\n\
2947
  {\n\
3207
  {\n\
2948
    *(.eh_frame*)\n\
3208
    KEEP(*(.eh_frame*))\n\
2949
  }\n\
3209
  }\n\
2950
  .pdata BLOCK(__section_alignment__) :\n\
3210
  .pdata BLOCK(__section_alignment__) :\n\
2951
  {\n\
3211
  {\n\
2952
    *(.pdata)\n\
3212
    KEEP(*(.pdata))\n\
2953
  }\n\
3213
  }\n\
2954
  .bss BLOCK(__section_alignment__) :\n\
3214
  .bss BLOCK(__section_alignment__) :\n\
2955
  {\n\
3215
  {\n\
2956
    __bss_start__ = . ;\n\
3216
    __bss_start__ = . ;\n\
2957
    *(.bss)\n\
3217
    *(.bss)\n\
2958
    *(COMMON)\n\
3218
    *(COMMON)\n\
2959
    __bss_end__ = . ;\n\
3219
    __bss_end__ = . ;\n"
2960
  }\n\
3220
"  }\n\
2961
  .edata BLOCK(__section_alignment__) :\n\
3221
  .edata BLOCK(__section_alignment__) :\n\
2962
  {\n\
3222
  {\n\
2963
    *(.edata)\n"
3223
    *(.edata)\n\
2964
"  }\n\
3224
  }\n\
2965
  /DISCARD/ :\n\
3225
  /DISCARD/ :\n\
2966
  {\n\
3226
  {\n\
2967
    *(.debug$S)\n\
3227
    *(.debug$S)\n\
2968
    *(.debug$T)\n\
3228
    *(.debug$T)\n\
2969
    *(.debug$F)\n\
3229
    *(.debug$F)\n\
2970
    *(.drectve)\n\
3230
    *(.drectve)\n\
2971
     *(.note.GNU-stack)\n\
3231
     *(.note.GNU-stack)\n\
2972
     *(.gnu.lto_*)\n\
3232
     *(.gnu.lto_*)\n\
2973
  }\n\
3233
  }\n\
2974
  .idata BLOCK(__section_alignment__) :\n\
3234
  .idata BLOCK(__section_alignment__) :\n\
Line 2978... Line 3238...
2978
    SORT(*)(.idata$2)\n\
3238
    KEEP (SORT(*)(.idata$2))\n\
2979
    SORT(*)(.idata$3)\n\
3239
    KEEP (SORT(*)(.idata$3))\n\
2980
    /* These zeroes mark the end of the import list.  */\n\
3240
    /* These zeroes mark the end of the import list.  */\n\
2981
    LONG (0); LONG (0); LONG (0); LONG (0); LONG (0);\n\
3241
    LONG (0); LONG (0); LONG (0); LONG (0); LONG (0);\n\
2982
    SORT(*)(.idata$4)\n\
3242
    KEEP (SORT(*)(.idata$4))\n\
2983
    __IAT_start__ = .;\n\
3243
    __IAT_start__ = .;\n\
2984
    SORT(*)(.idata$5)\n\
3244
    KEEP (SORT(*)(.idata$5))\n"
2985
    __IAT_end__ = .;\n\
3245
"    __IAT_end__ = .;\n\
2986
    SORT(*)(.idata$6)\n\
3246
    KEEP (SORT(*)(.idata$6))\n\
2987
    SORT(*)(.idata$7)\n\
3247
    KEEP (SORT(*)(.idata$7))\n\
2988
  }\n"
3248
  }\n\
2989
"  .CRT BLOCK(__section_alignment__) :\n\
3249
  .CRT BLOCK(__section_alignment__) :\n\
2990
  {\n\
3250
  {\n\
2991
    ___crt_xc_start__ = . ;\n\
3251
    ___crt_xc_start__ = . ;\n\
2992
    *(SORT(.CRT$XC*))  /* C initialization */\n\
3252
    KEEP (*(SORT(.CRT$XC*)))  /* C initialization */\n\
2993
    ___crt_xc_end__ = . ;\n\
3253
    ___crt_xc_end__ = . ;\n\
2994
    ___crt_xi_start__ = . ;\n\
3254
    ___crt_xi_start__ = . ;\n\
2995
    *(SORT(.CRT$XI*))  /* C++ initialization */\n\
3255
    KEEP (*(SORT(.CRT$XI*)))  /* C++ initialization */\n\
2996
    ___crt_xi_end__ = . ;\n\
3256
    ___crt_xi_end__ = . ;\n\
2997
    ___crt_xl_start__ = . ;\n\
3257
    ___crt_xl_start__ = . ;\n\
2998
    *(SORT(.CRT$XL*))  /* TLS callbacks */\n\
3258
    KEEP (*(SORT(.CRT$XL*)))  /* TLS callbacks */\n\
2999
    /* ___crt_xl_end__ is defined in the TLS Directory support code */\n\
3259
    /* ___crt_xl_end__ is defined in the TLS Directory support code */\n\
3000
    ___crt_xp_start__ = . ;\n\
3260
    ___crt_xp_start__ = . ;\n\
3001
    *(SORT(.CRT$XP*))  /* Pre-termination */\n\
3261
    KEEP (*(SORT(.CRT$XP*)))  /* Pre-termination */\n\
3002
    ___crt_xp_end__ = . ;\n\
3262
    ___crt_xp_end__ = . ;\n\
3003
    ___crt_xt_start__ = . ;\n\
3263
    ___crt_xt_start__ = . ;\n\
3004
    *(SORT(.CRT$XT*))  /* Termination */\n\
3264
    KEEP (*(SORT(.CRT$XT*)))  /* Termination */\n\
3005
    ___crt_xt_end__ = . ;\n\
3265
    ___crt_xt_end__ = . ;\n\
3006
  }\n\
3266
  }\n\
3007
  /* Windows TLS expects .tls$AAA to be at the start and .tls$ZZZ to be\n\
3267
  /* Windows TLS expects .tls$AAA to be at the start and .tls$ZZZ to be\n\
3008
     at the end of section.  This is important because _tls_start MUST\n\
3268
     at the end of section.  This is important because _tls_start MUST\n\
3009
     be at the beginning of the section to enable SECREL32 relocations with TLS\n\
3269
     be at the beginning of the section to enable SECREL32 relocations with TLS\n\
3010
     data.  */\n\
3270
     data.  */\n\
3011
  .tls BLOCK(__section_alignment__) :\n\
3271
  .tls BLOCK(__section_alignment__) :\n\
3012
  {\n\
3272
  {\n\
3013
    ___tls_start__ = . ;\n\
3273
    ___tls_start__ = . ;\n\
3014
    *(.tls$AAA)\n\
3274
    KEEP (*(.tls$AAA))\n\
3015
    *(.tls)\n\
3275
    KEEP (*(.tls))\n\
3016
    *(.tls$)\n\
3276
    KEEP (*(.tls$))\n\
3017
    *(SORT(.tls$*))\n\
3277
    KEEP (*(SORT(.tls$*)))\n\
3018
    *(.tls$ZZZ)\n\
3278
    KEEP (*(.tls$ZZZ))\n\
3019
    ___tls_end__ = . ;\n\
3279
    ___tls_end__ = . ;\n\
3020
  }\n\
3280
  }\n\
3021
  .endjunk BLOCK(__section_alignment__) :\n\
3281
  .endjunk BLOCK(__section_alignment__) :\n\
3022
  {\n\
3282
  {\n\
3023
    /* end is deprecated, don't use it */\n\
3283
    /* end is deprecated, don't use it */\n\
3024
    PROVIDE (end = .);\n\
3284
    PROVIDE (end = .);\n\
3025
    PROVIDE ( _end = .);\n\
3285
    PROVIDE ( _end = .);\n\
3026
     __end__ = .;\n\
3286
     __end__ = .;\n\
3027
  }\n\
3287
  }\n\
3028
  .rsrc BLOCK(__section_alignment__) :\n\
3288
  .rsrc BLOCK(__section_alignment__) : SUBALIGN(4)\n\
3029
  {\n\
3289
  {\n\
3030
    *(.rsrc)\n\
3290
    KEEP (*(.rsrc))\n\
3031
    *(SORT(.rsrc$*))\n\
3291
    KEEP (*(.rsrc$*))\n\
3032
  }\n\
3292
  }\n\
3033
  .reloc BLOCK(__section_alignment__) :\n\
3293
  .reloc BLOCK(__section_alignment__) :\n\
3034
  {\n\
3294
  {\n\
3035
    *(.reloc)\n\
3295
    *(.reloc)\n\
3036
  }\n\
3296
  }\n\
3037
  .stab BLOCK(__section_alignment__) (NOLOAD) :\n\
3297
  .stab BLOCK(__section_alignment__) (NOLOAD) :\n\
3038
  {\n\
3298
  {\n\
3039
    *(.stab)\n\
3299
    *(.stab)\n\
3040
  }\n\
3300
  }\n\
3041
  .stabstr BLOCK(__section_alignment__) (NOLOAD) :\n\
3301
  .stabstr BLOCK(__section_alignment__) (NOLOAD) :\n\
Line 3193... Line 3453...
3193
OUTPUT_FORMAT(pei-i386)\n\
3453
/* Copyright (C) 2014-2015 Free Software Foundation, Inc.\n\
3194
SEARCH_DIR(\"=/usr/local/lib\"); SEARCH_DIR(\"=/lib\"); SEARCH_DIR(\"=/usr/lib\");\n\
3454
   Copying and distribution of this script, with or without modification,\n\
3195
SECTIONS\n\
3455
   are permitted in any medium without royalty provided the copyright\n\
3196
{\n\
3456
   notice and this notice are preserved.  */\n\
3197
  /* Make the virtual address and file offset synced if the alignment is\n\
3457
OUTPUT_FORMAT(pei-i386)\n\
-
 
3458
SEARCH_DIR(\"=/home/autobuild/tools/win32/mingw32/lib\"); SEARCH_DIR(\"=/home/autobuild/tools/win32/lib\"); SEARCH_DIR(\"=/usr/local/lib\"); SEARCH_DIR(\"=/lib\"); SEARCH_DIR(\"=/usr/lib\");\n\
-
 
3459
SECTIONS\n\
-
 
3460
{\n\
-
 
3461
  /* Make the virtual address and file offset synced if the alignment is\n\
3198
     lower than the target page size. */\n\
3462
     lower than the target page size. */\n\
3199
  . = SIZEOF_HEADERS;\n\
3463
  . = SIZEOF_HEADERS;\n\
3200
  . = ALIGN(__section_alignment__);\n\
3464
  . = ALIGN(__section_alignment__);\n\
3201
  .text  __image_base__ + ( __section_alignment__ < 0x1000 ? . : __section_alignment__ ) :\n\
3465
  .text  __image_base__ + ( __section_alignment__ < 0x1000 ? . : __section_alignment__ ) :\n\
3202
  {\n\
3466
  {\n\
3203
     *(.init)\n\
3467
     KEEP(*(.init))\n\
3204
    *(.text)\n\
3468
    *(.text)\n\
3205
    *(SORT(.text$*))\n\
3469
    *(SORT(.text$*))\n\
3206
     *(.text.*)\n\
3470
     *(.text.*)\n\
3207
     *(.gnu.linkonce.t.*)\n\
3471
     *(.gnu.linkonce.t.*)\n\
3208
    *(.glue_7t)\n\
3472
    *(.glue_7t)\n\
3209
    *(.glue_7)\n\
3473
    *(.glue_7)\n\
3210
     ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;\n\
3474
     ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;\n\
3211
			LONG (-1);*(.ctors); *(.ctor); *(SORT(.ctors.*));  LONG (0);\n\
3475
			LONG (-1);*(.ctors); *(.ctor); *(SORT(.ctors.*));  LONG (0);\n\
3212
     ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;\n\
3476
     ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;\n"
3213
			LONG (-1); *(.dtors); *(.dtor); *(SORT(.dtors.*));  LONG (0);\n\
3477
"			LONG (-1); *(.dtors); *(.dtor); *(SORT(.dtors.*));  LONG (0);\n\
3214
     *(.fini)\n\
3478
     *(.fini)\n\
3215
    /* ??? Why is .gcc_exc here?  */\n\
3479
    /* ??? Why is .gcc_exc here?  */\n\
3216
     *(.gcc_exc)\n"
3480
     *(.gcc_exc)\n\
3217
"    PROVIDE (etext = .);\n\
3481
    PROVIDE (etext = .);\n\
3218
    PROVIDE (_etext = .);\n\
3482
    PROVIDE (_etext = .);\n\
3219
     *(.gcc_except_table)\n\
3483
     *(.gcc_except_table)\n\
3220
  }\n\
3484
  }\n\
3221
  /* The Cygwin32 library uses a section to avoid copying certain data\n\
3485
  /* The Cygwin32 library uses a section to avoid copying certain data\n\
3222
     on fork.  This used to be named \".data\".  The linker used\n\
3486
     on fork.  This used to be named \".data\".  The linker used\n\
3223
     to include this between __data_start__ and __data_end__, but that\n\
3487
     to include this between __data_start__ and __data_end__, but that\n\
3224
     breaks building the cygwin32 dll.  Instead, we name the section\n\
3488
     breaks building the cygwin32 dll.  Instead, we name the section\n\
3225
     \".data_cygwin_nocopy\" and explicitly include it after __data_end__. */\n\
3489
     \".data_cygwin_nocopy\" and explicitly include it after __data_end__. */\n\
3226
  .data BLOCK(__section_alignment__) :\n\
3490
  .data BLOCK(__section_alignment__) :\n\
3227
  {\n\
3491
  {\n\
Line 3234... Line 3498...
3234
    *(.jcr)\n\
3498
    KEEP(*(.jcr))\n\
3235
    __data_end__ = . ;\n\
3499
    __data_end__ = . ;\n\
3236
    *(.data_cygwin_nocopy)\n\
3500
    *(.data_cygwin_nocopy)\n\
3237
  }\n\
3501
  }\n"
3238
  .rdata BLOCK(__section_alignment__) :\n\
3502
"  .rdata BLOCK(__section_alignment__) :\n\
3239
  {\n\
3503
  {\n\
3240
    __rt_psrelocs_start = .;\n\
3504
    __rt_psrelocs_start = .;\n\
3241
    *(.rdata_runtime_pseudo_reloc)\n"
3505
    *(.rdata_runtime_pseudo_reloc)\n\
3242
"    __rt_psrelocs_end = .;\n\
3506
    __rt_psrelocs_end = .;\n\
3243
  }\n\
3507
  }\n\
3244
  __rt_psrelocs_size = __rt_psrelocs_end - __rt_psrelocs_start;\n\
3508
  __rt_psrelocs_size = __rt_psrelocs_end - __rt_psrelocs_start;\n\
3245
  ___RUNTIME_PSEUDO_RELOC_LIST_END__ = .;\n\
3509
  ___RUNTIME_PSEUDO_RELOC_LIST_END__ = .;\n\
3246
  __RUNTIME_PSEUDO_RELOC_LIST_END__ = .;\n\
3510
  __RUNTIME_PSEUDO_RELOC_LIST_END__ = .;\n\
3247
  ___RUNTIME_PSEUDO_RELOC_LIST__ = . - __rt_psrelocs_size;\n\
3511
  ___RUNTIME_PSEUDO_RELOC_LIST__ = . - __rt_psrelocs_size;\n\
3248
  __RUNTIME_PSEUDO_RELOC_LIST__ = . - __rt_psrelocs_size;\n\
3512
  __RUNTIME_PSEUDO_RELOC_LIST__ = . - __rt_psrelocs_size;\n\
3249
  .eh_frame BLOCK(__section_alignment__) :\n\
3513
  .eh_frame BLOCK(__section_alignment__) :\n\
3250
  {\n\
3514
  {\n\
3251
    *(.eh_frame*)\n\
3515
    KEEP(*(.eh_frame*))\n\
3252
  }\n\
3516
  }\n\
3253
  .pdata BLOCK(__section_alignment__) :\n\
3517
  .pdata BLOCK(__section_alignment__) :\n\
3254
  {\n\
3518
  {\n\
3255
    *(.pdata)\n\
3519
    KEEP(*(.pdata))\n\
3256
  }\n\
3520
  }\n\
3257
  .bss BLOCK(__section_alignment__) :\n\
3521
  .bss BLOCK(__section_alignment__) :\n\
3258
  {\n\
3522
  {\n\
3259
    __bss_start__ = . ;\n\
3523
    __bss_start__ = . ;\n\
3260
    *(.bss)\n\
3524
    *(.bss)\n\
3261
    *(COMMON)\n\
3525
    *(COMMON)\n\
3262
    __bss_end__ = . ;\n\
3526
    __bss_end__ = . ;\n"
3263
  }\n\
3527
"  }\n\
3264
  .edata BLOCK(__section_alignment__) :\n\
3528
  .edata BLOCK(__section_alignment__) :\n\
3265
  {\n\
3529
  {\n\
3266
    *(.edata)\n"
3530
    *(.edata)\n\
3267
"  }\n\
3531
  }\n\
3268
  /DISCARD/ :\n\
3532
  /DISCARD/ :\n\
3269
  {\n\
3533
  {\n\
3270
    *(.debug$S)\n\
3534
    *(.debug$S)\n\
3271
    *(.debug$T)\n\
3535
    *(.debug$T)\n\
3272
    *(.debug$F)\n\
3536
    *(.debug$F)\n\
3273
    *(.drectve)\n\
3537
    *(.drectve)\n\
3274
     *(.note.GNU-stack)\n\
3538
     *(.note.GNU-stack)\n\
3275
     *(.gnu.lto_*)\n\
3539
     *(.gnu.lto_*)\n\
3276
  }\n\
3540
  }\n\
3277
  .idata BLOCK(__section_alignment__) :\n\
3541
  .idata BLOCK(__section_alignment__) :\n\
Line 3281... Line 3545...
3281
    SORT(*)(.idata$2)\n\
3545
    KEEP (SORT(*)(.idata$2))\n\
3282
    SORT(*)(.idata$3)\n\
3546
    KEEP (SORT(*)(.idata$3))\n\
3283
    /* These zeroes mark the end of the import list.  */\n\
3547
    /* These zeroes mark the end of the import list.  */\n\
3284
    LONG (0); LONG (0); LONG (0); LONG (0); LONG (0);\n\
3548
    LONG (0); LONG (0); LONG (0); LONG (0); LONG (0);\n\
3285
    SORT(*)(.idata$4)\n\
3549
    KEEP (SORT(*)(.idata$4))\n\
3286
    __IAT_start__ = .;\n\
3550
    __IAT_start__ = .;\n\
3287
    SORT(*)(.idata$5)\n\
3551
    KEEP (SORT(*)(.idata$5))\n"
3288
    __IAT_end__ = .;\n\
3552
"    __IAT_end__ = .;\n\
3289
    SORT(*)(.idata$6)\n\
3553
    KEEP (SORT(*)(.idata$6))\n\
3290
    SORT(*)(.idata$7)\n\
3554
    KEEP (SORT(*)(.idata$7))\n\
3291
  }\n"
3555
  }\n\
3292
"  .CRT BLOCK(__section_alignment__) :\n\
3556
  .CRT BLOCK(__section_alignment__) :\n\
3293
  {\n\
3557
  {\n\
3294
    ___crt_xc_start__ = . ;\n\
3558
    ___crt_xc_start__ = . ;\n\
3295
    *(SORT(.CRT$XC*))  /* C initialization */\n\
3559
    KEEP (*(SORT(.CRT$XC*)))  /* C initialization */\n\
3296
    ___crt_xc_end__ = . ;\n\
3560
    ___crt_xc_end__ = . ;\n\
3297
    ___crt_xi_start__ = . ;\n\
3561
    ___crt_xi_start__ = . ;\n\
3298
    *(SORT(.CRT$XI*))  /* C++ initialization */\n\
3562
    KEEP (*(SORT(.CRT$XI*)))  /* C++ initialization */\n\
3299
    ___crt_xi_end__ = . ;\n\
3563
    ___crt_xi_end__ = . ;\n\
3300
    ___crt_xl_start__ = . ;\n\
3564
    ___crt_xl_start__ = . ;\n\
3301
    *(SORT(.CRT$XL*))  /* TLS callbacks */\n\
3565
    KEEP (*(SORT(.CRT$XL*)))  /* TLS callbacks */\n\
3302
    /* ___crt_xl_end__ is defined in the TLS Directory support code */\n\
3566
    /* ___crt_xl_end__ is defined in the TLS Directory support code */\n\
3303
    ___crt_xp_start__ = . ;\n\
3567
    ___crt_xp_start__ = . ;\n\
3304
    *(SORT(.CRT$XP*))  /* Pre-termination */\n\
3568
    KEEP (*(SORT(.CRT$XP*)))  /* Pre-termination */\n\
3305
    ___crt_xp_end__ = . ;\n\
3569
    ___crt_xp_end__ = . ;\n\
3306
    ___crt_xt_start__ = . ;\n\
3570
    ___crt_xt_start__ = . ;\n\
3307
    *(SORT(.CRT$XT*))  /* Termination */\n\
3571
    KEEP (*(SORT(.CRT$XT*)))  /* Termination */\n\
3308
    ___crt_xt_end__ = . ;\n\
3572
    ___crt_xt_end__ = . ;\n\
3309
  }\n\
3573
  }\n\
3310
  /* Windows TLS expects .tls$AAA to be at the start and .tls$ZZZ to be\n\
3574
  /* Windows TLS expects .tls$AAA to be at the start and .tls$ZZZ to be\n\
3311
     at the end of section.  This is important because _tls_start MUST\n\
3575
     at the end of section.  This is important because _tls_start MUST\n\
3312
     be at the beginning of the section to enable SECREL32 relocations with TLS\n\
3576
     be at the beginning of the section to enable SECREL32 relocations with TLS\n\
3313
     data.  */\n\
3577
     data.  */\n\
3314
  .tls BLOCK(__section_alignment__) :\n\
3578
  .tls BLOCK(__section_alignment__) :\n\
3315
  {\n\
3579
  {\n\
3316
    ___tls_start__ = . ;\n\
3580
    ___tls_start__ = . ;\n\
3317
    *(.tls$AAA)\n\
3581
    KEEP (*(.tls$AAA))\n\
3318
    *(.tls)\n\
3582
    KEEP (*(.tls))\n\
3319
    *(.tls$)\n\
3583
    KEEP (*(.tls$))\n\
3320
    *(SORT(.tls$*))\n\
3584
    KEEP (*(SORT(.tls$*)))\n\
3321
    *(.tls$ZZZ)\n\
3585
    KEEP (*(.tls$ZZZ))\n\
3322
    ___tls_end__ = . ;\n\
3586
    ___tls_end__ = . ;\n\
3323
  }\n\
3587
  }\n\
3324
  .endjunk BLOCK(__section_alignment__) :\n\
3588
  .endjunk BLOCK(__section_alignment__) :\n\
3325
  {\n\
3589
  {\n\
3326
    /* end is deprecated, don't use it */\n\
3590
    /* end is deprecated, don't use it */\n\
3327
    PROVIDE (end = .);\n\
3591
    PROVIDE (end = .);\n\
3328
    PROVIDE ( _end = .);\n\
3592
    PROVIDE ( _end = .);\n\
3329
     __end__ = .;\n\
3593
     __end__ = .;\n\
3330
  }\n\
3594
  }\n\
3331
  .rsrc BLOCK(__section_alignment__) :\n\
3595
  .rsrc BLOCK(__section_alignment__) : SUBALIGN(4)\n\
3332
  {\n\
3596
  {\n\
3333
    *(.rsrc)\n\
3597
    KEEP (*(.rsrc))\n\
3334
    *(SORT(.rsrc$*))\n\
3598
    KEEP (*(.rsrc$*))\n\
3335
  }\n\
3599
  }\n\
3336
  .reloc BLOCK(__section_alignment__) :\n\
3600
  .reloc BLOCK(__section_alignment__) :\n\
3337
  {\n\
3601
  {\n\
3338
    *(.reloc)\n\
3602
    *(.reloc)\n\
3339
  }\n\
3603
  }\n\
3340
  .stab BLOCK(__section_alignment__) (NOLOAD) :\n\
3604
  .stab BLOCK(__section_alignment__) (NOLOAD) :\n\
3341
  {\n\
3605
  {\n\
3342
    *(.stab)\n\
3606
    *(.stab)\n\
3343
  }\n\
3607
  }\n\
3344
  .stabstr BLOCK(__section_alignment__) (NOLOAD) :\n\
3608
  .stabstr BLOCK(__section_alignment__) (NOLOAD) :\n\
Line 3496... Line 3760...
3496
OUTPUT_FORMAT(pei-i386)\n\
3760
/* Copyright (C) 2014-2015 Free Software Foundation, Inc.\n\
3497
SEARCH_DIR(\"=/usr/local/lib\"); SEARCH_DIR(\"=/lib\"); SEARCH_DIR(\"=/usr/lib\");\n\
3761
   Copying and distribution of this script, with or without modification,\n\
3498
SECTIONS\n\
3762
   are permitted in any medium without royalty provided the copyright\n\
3499
{\n\
3763
   notice and this notice are preserved.  */\n\
3500
  /* Make the virtual address and file offset synced if the alignment is\n\
3764
OUTPUT_FORMAT(pei-i386)\n\
-
 
3765
SEARCH_DIR(\"=/home/autobuild/tools/win32/mingw32/lib\"); SEARCH_DIR(\"=/home/autobuild/tools/win32/lib\"); SEARCH_DIR(\"=/usr/local/lib\"); SEARCH_DIR(\"=/lib\"); SEARCH_DIR(\"=/usr/lib\");\n\
-
 
3766
SECTIONS\n\
-
 
3767
{\n\
-
 
3768
  /* Make the virtual address and file offset synced if the alignment is\n\
3501
     lower than the target page size. */\n\
3769
     lower than the target page size. */\n\
3502
  . = SIZEOF_HEADERS;\n\
3770
  . = SIZEOF_HEADERS;\n\
3503
  . = ALIGN(__section_alignment__);\n\
3771
  . = ALIGN(__section_alignment__);\n\
3504
  .text  __image_base__ + ( __section_alignment__ < 0x1000 ? . : __section_alignment__ ) :\n\
3772
  .text  __image_base__ + ( __section_alignment__ < 0x1000 ? . : __section_alignment__ ) :\n\
3505
  {\n\
3773
  {\n\
3506
     *(.init)\n\
3774
     KEEP(*(.init))\n\
3507
    *(.text)\n\
3775
    *(.text)\n\
3508
    *(SORT(.text$*))\n\
3776
    *(SORT(.text$*))\n\
3509
     *(.text.*)\n\
3777
     *(.text.*)\n\
3510
     *(.gnu.linkonce.t.*)\n\
3778
     *(.gnu.linkonce.t.*)\n\
3511
    *(.glue_7t)\n\
3779
    *(.glue_7t)\n\
3512
    *(.glue_7)\n\
3780
    *(.glue_7)\n\
3513
     ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;\n\
3781
     ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;\n\
3514
			LONG (-1);*(.ctors); *(.ctor); *(SORT(.ctors.*));  LONG (0);\n\
3782
			LONG (-1);*(.ctors); *(.ctor); *(SORT(.ctors.*));  LONG (0);\n\
3515
     ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;\n\
3783
     ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;\n"
3516
			LONG (-1); *(.dtors); *(.dtor); *(SORT(.dtors.*));  LONG (0);\n\
3784
"			LONG (-1); *(.dtors); *(.dtor); *(SORT(.dtors.*));  LONG (0);\n\
3517
     *(.fini)\n\
3785
     *(.fini)\n\
3518
    /* ??? Why is .gcc_exc here?  */\n\
3786
    /* ??? Why is .gcc_exc here?  */\n\
3519
     *(.gcc_exc)\n"
3787
     *(.gcc_exc)\n\
3520
"    PROVIDE (etext = .);\n\
3788
    PROVIDE (etext = .);\n\
3521
    PROVIDE (_etext = .);\n\
3789
    PROVIDE (_etext = .);\n\
3522
     *(.gcc_except_table)\n\
3790
     *(.gcc_except_table)\n\
3523
  }\n\
3791
  }\n\
3524
  /* The Cygwin32 library uses a section to avoid copying certain data\n\
3792
  /* The Cygwin32 library uses a section to avoid copying certain data\n\
3525
     on fork.  This used to be named \".data\".  The linker used\n\
3793
     on fork.  This used to be named \".data\".  The linker used\n\
3526
     to include this between __data_start__ and __data_end__, but that\n\
3794
     to include this between __data_start__ and __data_end__, but that\n\
3527
     breaks building the cygwin32 dll.  Instead, we name the section\n\
3795
     breaks building the cygwin32 dll.  Instead, we name the section\n\
3528
     \".data_cygwin_nocopy\" and explicitly include it after __data_end__. */\n\
3796
     \".data_cygwin_nocopy\" and explicitly include it after __data_end__. */\n\
3529
  .data BLOCK(__section_alignment__) :\n\
3797
  .data BLOCK(__section_alignment__) :\n\
3530
  {\n\
3798
  {\n\
Line 3535... Line 3803...
3535
    *(.jcr)\n\
3803
    KEEP(*(.jcr))\n\
3536
    __data_end__ = . ;\n\
3804
    __data_end__ = . ;\n\
3537
    *(.data_cygwin_nocopy)\n\
3805
    *(.data_cygwin_nocopy)\n\
3538
  }\n\
3806
  }\n\
3539
  .rdata BLOCK(__section_alignment__) :\n\
3807
  .rdata BLOCK(__section_alignment__) :\n\
3540
  {\n\
3808
  {\n"
3541
    *(.rdata)\n\
3809
"    *(.rdata)\n\
3542
             *(SORT(.rdata$*))\n\
3810
             *(SORT(.rdata$*))\n\
3543
    __rt_psrelocs_start = .;\n\
3811
    __rt_psrelocs_start = .;\n\
3544
    *(.rdata_runtime_pseudo_reloc)\n"
3812
    *(.rdata_runtime_pseudo_reloc)\n\
3545
"    __rt_psrelocs_end = .;\n\
3813
    __rt_psrelocs_end = .;\n\
3546
  }\n\
3814
  }\n\
3547
  __rt_psrelocs_size = __rt_psrelocs_end - __rt_psrelocs_start;\n\
3815
  __rt_psrelocs_size = __rt_psrelocs_end - __rt_psrelocs_start;\n\
3548
  ___RUNTIME_PSEUDO_RELOC_LIST_END__ = .;\n\
3816
  ___RUNTIME_PSEUDO_RELOC_LIST_END__ = .;\n\
3549
  __RUNTIME_PSEUDO_RELOC_LIST_END__ = .;\n\
3817
  __RUNTIME_PSEUDO_RELOC_LIST_END__ = .;\n\
3550
  ___RUNTIME_PSEUDO_RELOC_LIST__ = . - __rt_psrelocs_size;\n\
3818
  ___RUNTIME_PSEUDO_RELOC_LIST__ = . - __rt_psrelocs_size;\n\
3551
  __RUNTIME_PSEUDO_RELOC_LIST__ = . - __rt_psrelocs_size;\n\
3819
  __RUNTIME_PSEUDO_RELOC_LIST__ = . - __rt_psrelocs_size;\n\
3552
  .eh_frame BLOCK(__section_alignment__) :\n\
3820
  .eh_frame BLOCK(__section_alignment__) :\n\
3553
  {\n\
3821
  {\n\
3554
    *(.eh_frame*)\n\
3822
    KEEP(*(.eh_frame*))\n\
3555
  }\n\
3823
  }\n\
3556
  .pdata BLOCK(__section_alignment__) :\n\
3824
  .pdata BLOCK(__section_alignment__) :\n\
3557
  {\n\
3825
  {\n\
3558
    *(.pdata)\n\
3826
    KEEP(*(.pdata))\n\
3559
  }\n\
3827
  }\n\
3560
  .bss BLOCK(__section_alignment__) :\n\
3828
  .bss BLOCK(__section_alignment__) :\n\
3561
  {\n\
3829
  {\n\
3562
    __bss_start__ = . ;\n\
3830
    __bss_start__ = . ;\n\
3563
    *(.bss)\n\
3831
    *(.bss)\n\
3564
    *(COMMON)\n\
3832
    *(COMMON)\n\
3565
    __bss_end__ = . ;\n\
3833
    __bss_end__ = . ;\n"
3566
  }\n\
3834
"  }\n\
3567
  .edata BLOCK(__section_alignment__) :\n\
3835
  .edata BLOCK(__section_alignment__) :\n\
3568
  {\n\
3836
  {\n\
3569
    *(.edata)\n"
3837
    *(.edata)\n\
3570
"  }\n\
3838
  }\n\
3571
  /DISCARD/ :\n\
3839
  /DISCARD/ :\n\
3572
  {\n\
3840
  {\n\
3573
    *(.debug$S)\n\
3841
    *(.debug$S)\n\
3574
    *(.debug$T)\n\
3842
    *(.debug$T)\n\
3575
    *(.debug$F)\n\
3843
    *(.debug$F)\n\
3576
    *(.drectve)\n\
3844
    *(.drectve)\n\
3577
     *(.note.GNU-stack)\n\
3845
     *(.note.GNU-stack)\n\
3578
     *(.gnu.lto_*)\n\
3846
     *(.gnu.lto_*)\n\
3579
  }\n\
3847
  }\n\
3580
  .idata BLOCK(__section_alignment__) :\n\
3848
  .idata BLOCK(__section_alignment__) :\n\
Line 3584... Line 3852...
3584
    SORT(*)(.idata$2)\n\
3852
    KEEP (SORT(*)(.idata$2))\n\
3585
    SORT(*)(.idata$3)\n\
3853
    KEEP (SORT(*)(.idata$3))\n\
3586
    /* These zeroes mark the end of the import list.  */\n\
3854
    /* These zeroes mark the end of the import list.  */\n\
3587
    LONG (0); LONG (0); LONG (0); LONG (0); LONG (0);\n\
3855
    LONG (0); LONG (0); LONG (0); LONG (0); LONG (0);\n\
3588
    SORT(*)(.idata$4)\n\
3856
    KEEP (SORT(*)(.idata$4))\n\
3589
    __IAT_start__ = .;\n\
3857
    __IAT_start__ = .;\n\
3590
    SORT(*)(.idata$5)\n\
3858
    KEEP (SORT(*)(.idata$5))\n"
3591
    __IAT_end__ = .;\n\
3859
"    __IAT_end__ = .;\n\
3592
    SORT(*)(.idata$6)\n\
3860
    KEEP (SORT(*)(.idata$6))\n\
3593
    SORT(*)(.idata$7)\n\
3861
    KEEP (SORT(*)(.idata$7))\n\
3594
  }\n"
3862
  }\n\
3595
"  .CRT BLOCK(__section_alignment__) :\n\
3863
  .CRT BLOCK(__section_alignment__) :\n\
3596
  {\n\
3864
  {\n\
3597
    ___crt_xc_start__ = . ;\n\
3865
    ___crt_xc_start__ = . ;\n\
3598
    *(SORT(.CRT$XC*))  /* C initialization */\n\
3866
    KEEP (*(SORT(.CRT$XC*)))  /* C initialization */\n\
3599
    ___crt_xc_end__ = . ;\n\
3867
    ___crt_xc_end__ = . ;\n\
3600
    ___crt_xi_start__ = . ;\n\
3868
    ___crt_xi_start__ = . ;\n\
3601
    *(SORT(.CRT$XI*))  /* C++ initialization */\n\
3869
    KEEP (*(SORT(.CRT$XI*)))  /* C++ initialization */\n\
3602
    ___crt_xi_end__ = . ;\n\
3870
    ___crt_xi_end__ = . ;\n\
3603
    ___crt_xl_start__ = . ;\n\
3871
    ___crt_xl_start__ = . ;\n\
3604
    *(SORT(.CRT$XL*))  /* TLS callbacks */\n\
3872
    KEEP (*(SORT(.CRT$XL*)))  /* TLS callbacks */\n\
3605
    /* ___crt_xl_end__ is defined in the TLS Directory support code */\n\
3873
    /* ___crt_xl_end__ is defined in the TLS Directory support code */\n\
3606
    ___crt_xp_start__ = . ;\n\
3874
    ___crt_xp_start__ = . ;\n\
3607
    *(SORT(.CRT$XP*))  /* Pre-termination */\n\
3875
    KEEP (*(SORT(.CRT$XP*)))  /* Pre-termination */\n\
3608
    ___crt_xp_end__ = . ;\n\
3876
    ___crt_xp_end__ = . ;\n\
3609
    ___crt_xt_start__ = . ;\n\
3877
    ___crt_xt_start__ = . ;\n\
3610
    *(SORT(.CRT$XT*))  /* Termination */\n\
3878
    KEEP (*(SORT(.CRT$XT*)))  /* Termination */\n\
3611
    ___crt_xt_end__ = . ;\n\
3879
    ___crt_xt_end__ = . ;\n\
3612
  }\n\
3880
  }\n\
3613
  /* Windows TLS expects .tls$AAA to be at the start and .tls$ZZZ to be\n\
3881
  /* Windows TLS expects .tls$AAA to be at the start and .tls$ZZZ to be\n\
3614
     at the end of section.  This is important because _tls_start MUST\n\
3882
     at the end of section.  This is important because _tls_start MUST\n\
3615
     be at the beginning of the section to enable SECREL32 relocations with TLS\n\
3883
     be at the beginning of the section to enable SECREL32 relocations with TLS\n\
3616
     data.  */\n\
3884
     data.  */\n\
3617
  .tls BLOCK(__section_alignment__) :\n\
3885
  .tls BLOCK(__section_alignment__) :\n\
3618
  {\n\
3886
  {\n\
3619
    ___tls_start__ = . ;\n\
3887
    ___tls_start__ = . ;\n\
3620
    *(.tls$AAA)\n\
3888
    KEEP (*(.tls$AAA))\n\
3621
    *(.tls)\n\
3889
    KEEP (*(.tls))\n\
3622
    *(.tls$)\n\
3890
    KEEP (*(.tls$))\n\
3623
    *(SORT(.tls$*))\n\
3891
    KEEP (*(SORT(.tls$*)))\n\
3624
    *(.tls$ZZZ)\n\
3892
    KEEP (*(.tls$ZZZ))\n\
3625
    ___tls_end__ = . ;\n\
3893
    ___tls_end__ = . ;\n\
3626
  }\n\
3894
  }\n\
3627
  .endjunk BLOCK(__section_alignment__) :\n\
3895
  .endjunk BLOCK(__section_alignment__) :\n\
3628
  {\n\
3896
  {\n\
3629
    /* end is deprecated, don't use it */\n\
3897
    /* end is deprecated, don't use it */\n\
3630
    PROVIDE (end = .);\n\
3898
    PROVIDE (end = .);\n\
3631
    PROVIDE ( _end = .);\n\
3899
    PROVIDE ( _end = .);\n\
3632
     __end__ = .;\n\
3900
     __end__ = .;\n\
3633
  }\n\
3901
  }\n\
3634
  .rsrc BLOCK(__section_alignment__) :\n\
3902
  .rsrc BLOCK(__section_alignment__) : SUBALIGN(4)\n\
3635
  {\n\
3903
  {\n\
3636
    *(.rsrc)\n\
3904
    KEEP (*(.rsrc))\n\
3637
    *(SORT(.rsrc$*))\n\
3905
    KEEP (*(.rsrc$*))\n\
3638
  }\n\
3906
  }\n\
3639
  .reloc BLOCK(__section_alignment__) :\n\
3907
  .reloc BLOCK(__section_alignment__) :\n\
3640
  {\n\
3908
  {\n\
3641
    *(.reloc)\n\
3909
    *(.reloc)\n\
3642
  }\n\
3910
  }\n\
3643
  .stab BLOCK(__section_alignment__) (NOLOAD) :\n\
3911
  .stab BLOCK(__section_alignment__) (NOLOAD) :\n\
3644
  {\n\
3912
  {\n\
3645
    *(.stab)\n\
3913
    *(.stab)\n\
3646
  }\n\
3914
  }\n\
3647
  .stabstr BLOCK(__section_alignment__) (NOLOAD) :\n\
3915
  .stabstr BLOCK(__section_alignment__) (NOLOAD) :\n\
Line 3826... Line 4094...
3826
  NULL	/* new_vers_pattern.  */
4094
  NULL,	/* new_vers_pattern.  */
3827
};
4095
  NULL	/* extra_map_file_text.  */
3828
4096
};
3829
4097
3830
4098
3831
4099
-
 
4100
3832
4101