From 9a646582a6d0c893799b5a1c79f5210d10cf3292 Mon Sep 17 00:00:00 2001 From: midipix Date: Wed, 11 Mar 2015 21:33:51 -0400 Subject: binutils-2.24.51: initial patch: allow the symbol 'environ' to be exported by PE images, but leave it excluded by default so that non-midipix PE targets remain unaffected. signed-off by Z. Gilboa; see copying.midipix (9cd0746c) for additional information. --- binutils-2.24.51.midipix.patch | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/binutils-2.24.51.midipix.patch b/binutils-2.24.51.midipix.patch index 0aeea4f..9355376 100644 --- a/binutils-2.24.51.midipix.patch +++ b/binutils-2.24.51.midipix.patch @@ -366,3 +366,25 @@ diff -ru --new-file a/binutils/winduni.c b/binutils/winduni.c { 1, "WINDOWS-1252" }, { 437, "MS-ANSI" }, { 737, "MS-GREEK" }, +diff -ru --new-file a/ld/pe-dll.c b/ld/pe-dll.c +--- a/ld/pe-dll.c 2014-07-03 01:37:48.000000000 -0400 ++++ b/ld/pe-dll.c 2015-02-28 09:36:05.942808235 -0500 +@@ -40,6 +40,7 @@ + #include "coff/internal.h" + #include "../bfd/libcoff.h" + #include "deffile.h" ++#include "peimplib.h" + + #ifdef pe_use_x86_64 + +@@ -234,7 +235,11 @@ + { STRING_COMMA_LEN ("impure_ptr") }, + { STRING_COMMA_LEN ("_impure_ptr") }, + { STRING_COMMA_LEN ("_fmode") }, ++ #ifdef PE_TARGET_MIDIPIX ++ /* (default) excluded symbols are defined by the caller (specs, etc.) */ ++ #else + { STRING_COMMA_LEN ("environ") }, ++ #endif + { NULL, 0 } + }; -- cgit v1.2.3