public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Ian Stakenvicius" <axs@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/mozilla:master commit in: mail-client/thunderbird/, mail-client/thunderbird/files/
Date: Thu,  6 Oct 2016 16:31:19 +0000 (UTC)	[thread overview]
Message-ID: <1475770736.5049ed8d0b9f12069ec8aa03aae77bad57d3c8d7.axs@gentoo> (raw)

commit:     5049ed8d0b9f12069ec8aa03aae77bad57d3c8d7
Author:     Ian Stakenvicius <axs <AT> gentoo <DOT> org>
AuthorDate: Thu Oct  6 16:18:49 2016 +0000
Commit:     Ian Stakenvicius <axs <AT> gentoo <DOT> org>
CommitDate: Thu Oct  6 16:18:56 2016 +0000
URL:        https://gitweb.gentoo.org/proj/mozilla.git/commit/?id=5049ed8d

mail-client/thunderbird: patch elfhack to address ld.gold failure from binutils-2.26

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1233963
Bug: http://bugs.gentoo.org/593958

 .../firefox-45-binutils-2.26-gold-elfhack.patch    | 49 ++++++++++++++++++++++
 ...-45.4.0.ebuild => thunderbird-45.4.0-r1.ebuild} |  1 +
 2 files changed, 50 insertions(+)

diff --git a/mail-client/thunderbird/files/firefox-45-binutils-2.26-gold-elfhack.patch b/mail-client/thunderbird/files/firefox-45-binutils-2.26-gold-elfhack.patch
new file mode 100644
index 0000000..1e7fa1c
--- /dev/null
+++ b/mail-client/thunderbird/files/firefox-45-binutils-2.26-gold-elfhack.patch
@@ -0,0 +1,49 @@
+From 4d0fe8f40364c170226f1ef3bc98975630463e87 Mon Sep 17 00:00:00 2001
+From: Mike Hommey <mh+mozilla@glandium.org>
+Date: Tue, 19 Jan 2016 14:31:04 +0900
+Subject: [PATCH] Bug 1233963 - Work around recent GNU gold behavior with
+ segments starting before the first section they contain
+
+---
+ build/unix/elfhack/elf.cpp | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/build/unix/elfhack/elf.cpp b/build/unix/elfhack/elf.cpp
+index 666b535..743afde 100644
+--- a/build/unix/elfhack/elf.cpp
++++ b/build/unix/elfhack/elf.cpp
+@@ -253,26 +253,29 @@ Elf::Elf(std::ifstream &file)
+         }
+         if (phdr.p_type == PT_PHDR)
+             segment->addSection(phdr_section);
+         for (int j = 1; j < ehdr->e_shnum; j++)
+             if (phdr.contains(sections[j]))
+                 segment->addSection(sections[j]);
+         // Make sure that our view of segments corresponds to the original
+         // ELF file.
+-        assert(segment->getFileSize() == phdr.p_filesz);
++        // GNU gold likes to start some segments before the first section
++        // they contain. https://sourceware.org/bugzilla/show_bug.cgi?id=19392
++        unsigned int gold_adjustment = segment->getAddr() - phdr.p_vaddr;
++        assert(segment->getFileSize() == phdr.p_filesz - gold_adjustment);
+         // gold makes TLS segments end on an aligned virtual address, even
+         // when the underlying section ends before that, while bfd ld
+         // doesn't. It's fine if we don't keep that alignment.
+         unsigned int memsize = segment->getMemSize();
+         if (phdr.p_type == PT_TLS && memsize != phdr.p_memsz) {
+             unsigned int align = segment->getAlign();
+             memsize = (memsize + align - 1) & ~(align - 1);
+         }
+-        assert(memsize == phdr.p_memsz);
++        assert(memsize == phdr.p_memsz - gold_adjustment);
+         segments.push_back(segment);
+     }
+ 
+     new (&eh_entry) ElfLocation(ehdr->e_entry, this);
+ }
+ 
+ Elf::~Elf()
+ {
+-- 
+2.7.0
+

diff --git a/mail-client/thunderbird/thunderbird-45.4.0.ebuild b/mail-client/thunderbird/thunderbird-45.4.0-r1.ebuild
similarity index 99%
rename from mail-client/thunderbird/thunderbird-45.4.0.ebuild
rename to mail-client/thunderbird/thunderbird-45.4.0-r1.ebuild
index 42d8da7..a74e343 100644
--- a/mail-client/thunderbird/thunderbird-45.4.0.ebuild
+++ b/mail-client/thunderbird/thunderbird-45.4.0-r1.ebuild
@@ -144,6 +144,7 @@ src_prepare() {
 	# Apply our patchset from firefox to thunderbird as well
 	pushd "${S}"/mozilla &>/dev/null || die
 	eapply "${WORKDIR}/firefox" \
+		"${FILESDIR}"/firefox-45-binutils-2.26-gold-elfhack.patch \
 		"${FILESDIR}"/firefox-45-gcc6.patch
 	popd &>/dev/null || die
 


             reply	other threads:[~2016-10-06 16:31 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-06 16:31 Ian Stakenvicius [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-08-30 14:14 [gentoo-commits] proj/mozilla:master commit in: mail-client/thunderbird/, mail-client/thunderbird/files/ Jory Pratt
2018-11-30 20:09 Ian Stakenvicius
2018-10-22 20:15 Ian Stakenvicius
2018-08-15 21:11 Ian Stakenvicius
2017-01-08 21:19 Jory Pratt
2015-06-10  1:31 Jory Pratt
2013-12-14  0:48 Jory Pratt
2013-09-23 21:14 Jory Pratt
2012-02-01  2:33 Jory Pratt
2011-12-11 22:50 Jory Pratt
2011-11-11 13:44 Jory Pratt
2011-10-02 23:48 Jory Pratt
2011-06-06 14:16 Jory Pratt
2011-04-16 13:00 Jory Pratt
2011-04-10 20:01 Jory Pratt
2011-04-04  2:41 Jory Pratt
2011-03-28 20:12 Jory Pratt
2011-03-17  2:53 Jory Pratt
2011-03-06  2:42 Jory Pratt
2011-02-04  5:57 anarchy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1475770736.5049ed8d0b9f12069ec8aa03aae77bad57d3c8d7.axs@gentoo \
    --to=axs@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox