From 0115fa98d2033f0a7d26f81fe9e7f2bba91aa729 Mon Sep 17 00:00:00 2001 From: midipix Date: Fri, 16 Aug 2019 03:38:17 -0400 Subject: binutils-2.24.51: further refactor pemdso.h, pe.em, and pep.em. --- binutils-2.24.51.midipix.patch | 91 ++++++++++++++++++++++-------------------- 1 file changed, 47 insertions(+), 44 deletions(-) (limited to 'binutils-2.24.51.midipix.patch') diff --git a/binutils-2.24.51.midipix.patch b/binutils-2.24.51.midipix.patch index 70a4ff0..0e076a6 100644 --- a/binutils-2.24.51.midipix.patch +++ b/binutils-2.24.51.midipix.patch @@ -2,8 +2,8 @@ diff -ru --new-file a/bfd/pemdso.h b/bfd/pemdso.h --- a/bfd/pemdso.h 1969-12-31 19:00:00.000000000 -0500 +++ b/bfd/pemdso.h 2019-08-15 07:00:00.000000000 -0400 @@ -0,0 +1,11 @@ -+#ifndef MIDIPIX_H -+#define MIDIPIX_H ++#ifndef PEMDSO_H ++#define PEMDSO_H + +#include +#include @@ -43,16 +43,24 @@ diff -ru --new-file a/bfd/pemdso.h b/bfd/pemdso.h +#include "pemdso.h" +EOF +esac +diff --ru --new-file a/ld/sysdep.h b/ld/sysdep.h +--- a/ld/sysdep.h 2014-07-03 01:37:48.000000000 -0400 ++++ b/ld/sysdep.h 2019-08-16 03:08:47.771929753 -0400 +@@ -26,6 +26,7 @@ + #endif + + #include "config.h" ++#include "peimplib.h" + + #include + #include diff -ru --new-file a/ld/emultempl/pe.em b/ld/emultempl/pe.em --- a/ld/emultempl/pe.em 2014-07-03 01:37:48.000000000 -0400 -+++ b/ld/emultempl/pe.em 2017-10-14 20:05:15.268012525 -0400 -@@ -35,6 +35,18 @@ - only determine if the subsystem is console or windows in order to select - the correct entry point by default. */ ++++ b/ld/emultempl/pe.em 2019-08-16 03:27:04.540631764 -0400 +@@ -69,6 +69,14 @@ fragment < When linking dynamically to a dll without\n\ @@ -113,7 +120,7 @@ diff -ru --new-file a/ld/emultempl/pe.em b/ld/emultempl/pe.em fprintf (file, _(" --enable-auto-import Do sophisticated linking of _sym to\n\ __imp_sym for DATA references\n")); fprintf (file, _(" --disable-auto-import Do not auto-import DATA items from DLLs\n")); -@@ -808,6 +826,12 @@ +@@ -808,6 +822,12 @@ gld${EMULATION_NAME}_handle_option (int optc) case OPTION_IMPLIB_FILENAME: pe_implib_filename = xstrdup (optarg); break; @@ -126,7 +133,7 @@ diff -ru --new-file a/ld/emultempl/pe.em b/ld/emultempl/pe.em case OPTION_WARN_DUPLICATE_EXPORTS: pe_dll_warn_dup_exports = 1; break; -@@ -1698,7 +1722,7 @@ +@@ -1698,7 +1718,7 @@ gld_${EMULATION_NAME}_after_open (void) extension, and use that for the remainder of the comparisons. */ pnt = strrchr (is3->the_bfd->filename, '.'); @@ -135,7 +142,7 @@ diff -ru --new-file a/ld/emultempl/pe.em b/ld/emultempl/pe.em break; } -@@ -1733,7 +1757,7 @@ +@@ -1733,7 +1753,7 @@ gld_${EMULATION_NAME}_after_open (void) then leave the filename alone. */ pnt = strrchr (is->the_bfd->filename, '.'); @@ -144,7 +151,7 @@ diff -ru --new-file a/ld/emultempl/pe.em b/ld/emultempl/pe.em { int idata2 = 0, reloc_count=0; asection *sec; -@@ -2063,8 +2087,14 @@ +@@ -2063,8 +2083,14 @@ gld_${EMULATION_NAME}_finish (void) ) { pe_dll_fill_sections (link_info.output_bfd, &link_info); @@ -159,7 +166,7 @@ diff -ru --new-file a/ld/emultempl/pe.em b/ld/emultempl/pe.em } #if defined(TARGET_IS_shpe) /* ARM doesn't need relocs. */ -@@ -2298,10 +2328,14 @@ +@@ -2298,10 +2324,14 @@ gld_${EMULATION_NAME}_open_dynamic_archive } libname_fmt [] = { @@ -176,7 +183,7 @@ diff -ru --new-file a/ld/emultempl/pe.em b/ld/emultempl/pe.em /* "libfoo.a" could be either an import lib or a static lib. For backwards compatibility, libfoo.a needs to precede libfoo.dll and foo.dll in the search. */ -@@ -2310,10 +2344,10 @@ +@@ -2310,10 +2340,10 @@ gld_${EMULATION_NAME}_open_dynamic_archive { "%s.lib", FALSE }, #ifdef DLL_SUPPORT /* Try "foo.dll" (preferred dll name, if specified). */ @@ -191,14 +198,11 @@ diff -ru --new-file a/ld/emultempl/pe.em b/ld/emultempl/pe.em /* Note: If adding more formats to this table, make sure to check to diff -ru --new-file a/ld/emultempl/pep.em b/ld/emultempl/pep.em --- a/ld/emultempl/pep.em 2014-07-03 01:37:48.000000000 -0400 -+++ b/ld/emultempl/pep.em 2017-10-14 19:17:10.840545945 -0400 -@@ -42,6 +42,18 @@ - /* For WINDOWS_XP64 and higher */ - /* Based on pe.em, but modified for 64 bit support. */ ++++ b/ld/emultempl/pep.em 2019-08-16 03:27:04.540631764 -0400 +@@ -67,6 +67,14 @@ fragment < When linking dynamically to a dll without\n\ @@ -257,7 +260,7 @@ diff -ru --new-file a/ld/emultempl/pep.em b/ld/emultempl/pep.em fprintf (file, _(" --enable-auto-import Do sophisticated linking of _sym to\n\ __imp_sym for DATA references\n")); fprintf (file, _(" --disable-auto-import Do not auto-import DATA items from DLLs\n")); -@@ -760,6 +778,12 @@ +@@ -760,6 +774,12 @@ gld${EMULATION_NAME}_handle_option (int optc) case OPTION_IMPLIB_FILENAME: pep_implib_filename = xstrdup (optarg); break; @@ -270,7 +273,7 @@ diff -ru --new-file a/ld/emultempl/pep.em b/ld/emultempl/pep.em case OPTION_WARN_DUPLICATE_EXPORTS: pep_dll_warn_dup_exports = 1; break; -@@ -1635,7 +1659,7 @@ +@@ -1635,7 +1655,7 @@ gld_${EMULATION_NAME}_after_open (void) extension, and use that for the remainder of the comparisons. */ pnt = strrchr (is3->the_bfd->filename, '.'); @@ -279,7 +282,7 @@ diff -ru --new-file a/ld/emultempl/pep.em b/ld/emultempl/pep.em break; } -@@ -1670,7 +1694,7 @@ +@@ -1670,7 +1690,7 @@ gld_${EMULATION_NAME}_after_open (void) then leave the filename alone. */ pnt = strrchr (is->the_bfd->filename, '.'); @@ -288,7 +291,7 @@ diff -ru --new-file a/ld/emultempl/pep.em b/ld/emultempl/pep.em { int idata2 = 0, reloc_count=0; asection *sec; -@@ -1834,8 +1858,14 @@ +@@ -1834,8 +1854,14 @@ gld_${EMULATION_NAME}_finish (void) || (!link_info.relocatable && pep_def_file->num_exports != 0)) { pep_dll_fill_sections (link_info.output_bfd, &link_info); @@ -303,7 +306,7 @@ diff -ru --new-file a/ld/emultempl/pep.em b/ld/emultempl/pep.em } if (pep_out_def_filename) -@@ -2062,10 +2092,14 @@ +@@ -2062,10 +2088,14 @@ gld_${EMULATION_NAME}_open_dynamic_archive } libname_fmt [] = { @@ -320,7 +323,7 @@ diff -ru --new-file a/ld/emultempl/pep.em b/ld/emultempl/pep.em /* "libfoo.a" could be either an import lib or a static lib. For backwards compatibility, libfoo.a needs to precede libfoo.dll and foo.dll in the search. */ -@@ -2074,10 +2108,10 @@ +@@ -2074,10 +2104,10 @@ gld_${EMULATION_NAME}_open_dynamic_archive { "%s.lib", FALSE }, #ifdef DLL_SUPPORT /* Try "foo.dll" (preferred dll name, if specified). */ -- cgit v1.2.3