forked from msys2/MINGW-packages
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
binutils: backport patch for msys2/MSYS2-packages#454
- Loading branch information
Showing
3 changed files
with
53 additions
and
58 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
mingw-w64-binutils/0200-prevent-problems-with-section-alignment.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
From ec8f76882145c71bef81a9cadf0bf51ff9fa5b35 Mon Sep 17 00:00:00 2001 | ||
From: Jon Turney <jon.turney@dronecode.org.uk> | ||
Date: Fri, 25 Nov 2016 09:47:31 +0000 | ||
Subject: [PATCH] Prevent problems with section alignment by not shrinking the | ||
.rsrc section. | ||
|
||
PR ld/20193 | ||
* peXXigen.c (rsrc_process_section): Do not shrink the merged | ||
.rsrc section. | ||
--- | ||
bfd/peXXigen.c | 22 ++-------------------- | ||
1 file changed, 2 insertions(+), 20 deletions(-) | ||
|
||
diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c | ||
index 0bbd200..3a16ef0 100644 | ||
--- a/bfd/peXXigen.c | ||
+++ b/bfd/peXXigen.c | ||
@@ -4319,26 +4319,8 @@ rsrc_process_section (bfd * abfd, | ||
rsrc_write_directory (& write_data, & new_table); | ||
|
||
/* Step five: Replace the old contents with the new. | ||
- We recompute the size as we may have lost entries due to mergeing. */ | ||
- size = ((write_data.next_data - new_data) + 3) & ~ 3; | ||
- | ||
- { | ||
- int page_size; | ||
- | ||
- if (coff_data (abfd)->link_info) | ||
- { | ||
- page_size = pe_data (abfd)->pe_opthdr.FileAlignment; | ||
- | ||
- /* If no file alignment has been set, default to one. | ||
- This repairs 'ld -r' for arm-wince-pe target. */ | ||
- if (page_size == 0) | ||
- page_size = 1; | ||
- } | ||
- else | ||
- page_size = PE_DEF_FILE_ALIGNMENT; | ||
- size = (size + page_size - 1) & - page_size; | ||
- } | ||
- | ||
+ We don't recompute the size as it's too late here to shrink section. | ||
+ See PR ld/20193 for more details. */ | ||
bfd_set_section_contents (pfinfo->output_bfd, sec, new_data, 0, size); | ||
sec->size = sec->rawsize = size; | ||
|
||
-- | ||
2.9.3 | ||
|
54 changes: 0 additions & 54 deletions
54
mingw-w64-binutils/0200-try-fix-isue-with-embedded-manifest.patch
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters