<pre style='margin:0'>
Jeremy Huddleston Sequoia (jeremyhu) pushed a commit to branch master
in repository macports-ports.

</pre>
<p><a href="https://github.com/macports/macports-ports/commit/73d716c633ad9351d2ffdf1347268ce43ba6b2d7">https://github.com/macports/macports-ports/commit/73d716c633ad9351d2ffdf1347268ce43ba6b2d7</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 73d716c633ad9351d2ffdf1347268ce43ba6b2d7
</span>Author: Jeremy Huddleston Sequoia <jeremyhu@macports.org>
AuthorDate: Sun Dec 25 22:45:52 2016 -0800

<span style='display:block; white-space:pre;color:#404040;'>    ld64-127: Ensure that file offset is aligned correctly
</span><span style='display:block; white-space:pre;color:#404040;'>    
</span><span style='display:block; white-space:pre;color:#404040;'>    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@macports.org>
</span>---
 devel/ld64/Portfile                                |  3 ++-
 ...127-align_file_offset_with_address_layout.patch | 27 ++++++++++++++++++++++
 2 files changed, 29 insertions(+), 1 deletion(-)

<span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/ld64/Portfile b/devel/ld64/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index fb3f2d4..f3fba6e 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/devel/ld64/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/devel/ld64/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -74,7 +74,7 @@ subport ld64-127 {
</span>     # XCode 4.2
     # This was the last ld64 release that supported linking ppc executables.
     version             127.2
<span style='display:block; white-space:pre;background:#ffe0e0;'>-    revision            13
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    revision            14
</span> 
     set makefile       "Makefile-127"
     set ld64_ver        127
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -87,6 +87,7 @@ subport ld64-127 {
</span>         ld64-127-cxx_initializer_order_and_sim.patch \
         ld64-127-ppc.patch \
         ld64-127-configured_architectures.patch \
<span style='display:block; white-space:pre;background:#e0ffe0;'>+        ld64-127-align_file_offset_with_address_layout.patch \
</span>         ld64-127-alignment_padding.patch \
         ld64-127-filter_out_zero_length_functions.patch \
         ld64-127-i386-reloc.patch \
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/ld64/files/ld64-127-align_file_offset_with_address_layout.patch b/devel/ld64/files/ld64-127-align_file_offset_with_address_layout.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..636def9
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/devel/ld64/files/ld64-127-align_file_offset_with_address_layout.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,27 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+align file offset with address layout
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+<rdar://problem/10445047>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/ld/OutputFile.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/ld/OutputFile.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -551,8 +551,8 @@ void OutputFile::assignFileOffsets(ld::Internal& state)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                           throwf("section %s (address=0x%08llX, size=%llu) would make the output executable exceed available address range", 
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                                           sect->sectionName(), address, sect->size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+           
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-          if ( log ) fprintf(stderr, "  address=0x%08llX, hidden=%d, alignment=%02d, padBytes=%d, section=%s,%s\n",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-                                                  sect->address, sect->isSectionHidden(), sect->alignment, sect->alignmentPaddingBytes, 
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++          if ( log ) fprintf(stderr, "  address=0x%08llX, size=0x%08llX, hidden=%d, alignment=%02d, padBytes=%d, section=%s,%s\n",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++                                                  sect->address, sect->size, sect->isSectionHidden(), sect->alignment, sect->alignmentPaddingBytes, 
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                                                   sect->segmentName(), sect->sectionName());
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+           // update running totals
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+           if ( !sect->isSectionHidden() || hiddenSectionsOccupyAddressSpace )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -569,6 +569,9 @@ void OutputFile::assignFileOffsets(ld::Internal& state)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+           if ( hasZeroForFileOffset(sect) ) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                   // fileoff of zerofill sections is moot, but historically it is set to zero
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                   sect->fileOffset = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++                  // <rdar://problem/10445047> align file offset with address layout
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++                  fileOffset += sect->alignmentPaddingBytes;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+           }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+           else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                   // page align file offset at start of each segment
</span></pre><pre style='margin:0'>

</pre>