Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 1326023 Details for
Bug 1491023
memtest86+ FTBFS in Rawhide -- segfaults on linking memtest.bin
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh92 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Backport patch
0001-Fix-bug-causing-memtest86-builds-to-segfault.patch (text/plain), 13.27 KB, created by
Stephen Gallagher
on 2017-09-14 13:43:57 UTC
(
hide
)
Description:
Backport patch
Filename:
MIME Type:
Creator:
Stephen Gallagher
Created:
2017-09-14 13:43:57 UTC
Size:
13.27 KB
patch
obsolete
>From fdd962cc068d274d190bd8f62f6d12130a654b9c Mon Sep 17 00:00:00 2001 >From: Stephen Gallagher <sgallagh@redhat.com> >Date: Thu, 14 Sep 2017 09:41:37 -0400 >Subject: [PATCH] Fix bug causing memtest86+ builds to segfault > >--- > ...more-targets-to-the-list-of-architectures.patch | 305 +++++++++++++++++++++ > binutils.spec | 7 +- > 2 files changed, 311 insertions(+), 1 deletion(-) > create mode 100644 binutils-2.29-Add-more-targets-to-the-list-of-architectures.patch > >diff --git a/binutils-2.29-Add-more-targets-to-the-list-of-architectures.patch b/binutils-2.29-Add-more-targets-to-the-list-of-architectures.patch >new file mode 100644 >index 0000000000000000000000000000000000000000..9ca0be07addb3c03c02dd48c5e86e6a0a5fba038 >--- /dev/null >+++ b/binutils-2.29-Add-more-targets-to-the-list-of-architectures.patch >@@ -0,0 +1,305 @@ >+From 1bae7fdad0a9b7eb243f483b2ea717cf0a3cc5b2 Mon Sep 17 00:00:00 2001 >+From: Nick Clifton <nickc@redhat.com> >+Date: Thu, 3 Aug 2017 11:59:32 +0100 >+Subject: [PATCH] Add more targets to the list of architectures not supporting >+ format changing during linking. Fix seg-faults triggered when this is >+ attempted. >+ >+ PR ld/21884 >+ * testsuite/ld-elf/pr21884.d: Add AVR, HPPA, IA64, M68HC1x and >+ SCORE to list of targets not supporting file format changes during >+ linking. >+ * testsuite/ld-unique/pr21529.d: Likewise. >+ * emultempl/avrelf.em (_before_allocation): Skip for non-ELF >+ output formats. >+ (avr_elf_create_output_section_statements): Fail if the output >+ format is not ELF. >+ (avr_finish): Do not access the ELF header in non-ELF format >+ output bfds. >+ * emultempl/m68hc1xelf.em (_before_allocation): Skip for non-ELF >+ output formats. >+ (m68hc11elf_create_output_section_statements): Fail if the putput >+ format is not ELF. >+ (m68hc11elf_after_allocation): Skip for non-ELF output formats. >+--- >+ ld/ChangeLog | 111 +++++++++++++++++++++++++++++++++++++++ >+ ld/emultempl/avrelf.em | 24 +++++++-- >+ ld/emultempl/m68hc1xelf.em | 38 +++++++++----- >+ ld/testsuite/ld-unique/pr21529.d | 3 +- >+ 4 files changed, 158 insertions(+), 18 deletions(-) >+ >+diff --git a/ld/ChangeLog b/ld/ChangeLog >+index bc7d797cd0f7c9a64f279f71955f935585aa1257..28543722440107accbffec02b155bfc237131454 100644 >+--- a/ld/ChangeLog >++++ b/ld/ChangeLog >+@@ -1,5 +1,116 @@ >++2017-08-03 Nick Clifton <nickc@redhat.com> >++ >++ PR ld/21884 >++ * testsuite/ld-elf/pr21884.d: Add AVR, HPPA, IA64, M68HC1x and >++ SCORE to list of targets not supporting file format changes during >++ linking. >++ * testsuite/ld-unique/pr21529.d: Likewise. >++ * emultempl/avrelf.em (_before_allocation): Skip for non-ELF >++ output formats. >++ (avr_elf_create_output_section_statements): Fail if the output >++ format is not ELF. >++ (avr_finish): Do not access the ELF header in non-ELF format >++ output bfds. >++ * emultempl/m68hc1xelf.em (_before_allocation): Skip for non-ELF >++ output formats. >++ (m68hc11elf_create_output_section_statements): Fail if the putput >++ format is not ELF. >++ (m68hc11elf_after_allocation): Skip for non-ELF output formats. >++ >++2017-07-25 Alan Modra <amodra@gmail.com> >++ >++ * testsuite/ld-powerpc/tlsopt5.s: Add cfi. >++ * testsuite/ld-powerpc/tlsopt5.d: Update. >++ * testsuite/ld-powerpc/tlsopt5.wf: New file. >++ * testsuite/ld-powerpc/powerpc.exp: Perform new tlsopt5 test. >++ >++2017-07-14 Alan Modra <amodra@gmail.com> >++ >++ * testsuite/ld-powerpc/powerpc.exp: Add -shared to tlsop5 tests. >++ * testsuite/ld-powerpc/tlsopt5.d: Adjust. >++ * testsuite/ld-powerpc/tlsopt1_32.s: Use r30 as GOT pointer. >++ * testsuite/ld-powerpc/tlsopt2_32.s: Likewise. >++ * testsuite/ld-powerpc/tlsopt3_32.s: Likewise. >++ * testsuite/ld-powerpc/tlsopt4_32.s: Likewise. >++ * testsuite/ld-powerpc/tlsopt5_32.s: Rewrite. >++ * testsuite/ld-powerpc/tlsopt1_32.d: Adjust. >++ * testsuite/ld-powerpc/tlsopt2_32.d: Adjust. >++ * testsuite/ld-powerpc/tlsopt3_32.d: Adjust. >++ * testsuite/ld-powerpc/tlsopt5_32.d: Adjust. >++ >++2017-08-13 H.J. Lu <hongjiu.lu@intel.com> >++ >++ PR ld/21923 >++ * configure.ac (TESTBFDLIB): Replace --rpath with -Wl,--rpath, >++ for --disable-static. >++ * configure: Regenerated. >++ >++2017-08-13 H.J. Lu <hongjiu.lu@intel.com> >++ >++ * testsuite/ld-i386/i386.exp: Run pr21884-nacl. >++ * testsuite/ld-x86-64/x86-64.exp: Likewise. >++ * testsuite/ld-i386/pr21884.d: Don't run on nacl targets. >++ * testsuite/ld-x86-64/pr21884.d: Likewise. >++ * testsuite/ld-i386/pr21884.t: Revert the last change. >++ * testsuite/ld-x86-64/pr21884.t: Likewise. >++ * testsuite/ld-i386/pr21884-nacl.d: New file. >++ * testsuite/ld-i386/pr21884-nacl.t: Likewise. >++ * testsuite/ld-x86-64/pr21884-nacl.d: Likewise. >++ * testsuite/ld-x86-64/pr21884-nacl.t: Likewise. >++ >++2017-08-13 Alan Modra <amodra@gmail.com> >++ >++ * testsuite/ld-i386/pr21884.t: Remove unneeded format, arch and entry. >++ * testsuite/ld-x86-64/pr21884.t: Likewise. >++ >++2017-08-11 H.J. Lu <hongjiu.lu@intel.com> >++ >++ PR ld/21884 >++ * testsuite/ld-i386/i386.exp: Run pr21884. >++ * testsuite/ld-x86-64/x86-64.exp: Likewise. >++ * testsuite/ld-i386/pr21884.d: New file. >++ * testsuite/ld-i386/pr21884.t: Likewise. >++ * testsuite/ld-x86-64/pr21884.d: Likewise. >++ * testsuite/ld-x86-64/pr21884.t: Likewise. >++ >++2017-08-03 Alan Modra <amodra@gmail.com> >++ >++ PR ld/21884 >++ * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Revert >++ last change. Rename iself to elfinput. Expand comments. Condition >++ ELF checks on having both input and output ELF files. Extract.. >++ (elf_orphan_compatible): ..this new function. >++ >++2017-08-02 H.J. Lu <hongjiu.lu@intel.com> >++ >++ PR ld/21884 >++ * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Check >++ ELF section header only for ELF output. >++ * testsuite/ld-elf/pr21884.d: New test. >++ * testsuite/ld-elf/pr21884.t: Likewise. >++ * testsuite/ld-elf/pr21884a.s: Likewise. >++ * testsuite/ld-elf/pr21884b.s: Likewise. >++ >++2017-07-31 Alan Modra <amodra@gmail.com> >++ >++ * ld.texinfo (plt-localentry): Revise. >++ >++2017-07-29 Alan Modra <amodra@gmail.com> >++ >++ * ld.texinfo (plt-localentry): Document. >++ >++2017-07-27 Georg-Johann Lay <gjl@gcc.gnu.org> >++ >++ PR ld/21849 >++ * scripttempl/avr.sc: Split .progmemx.* from .progmem.* and locate >++ former at a higher address. >++ >++2017-07-24 Tristan Gingold <gingold@adacore.com> >++ >++ * configure: Regenerate. >++ >+ 2017-07-24 Tristan Gingold <gingold@adacore.com> >+ >+ * configure: Regenerate. >+ >+ 2017-07-18 Nick Clifton <nickc@redhat.com> >+diff --git a/ld/emultempl/avrelf.em b/ld/emultempl/avrelf.em >+index 9bad2a28b6aedee520fbf8c9ea450426f3b1bbcd..0096f5fa8cfee5108bd2a00746c061bf3839d819 100644 >+--- a/ld/emultempl/avrelf.em >++++ b/ld/emultempl/avrelf.em >+@@ -69,10 +69,16 @@ avr_elf_${EMULATION_NAME}_before_allocation (void) >+ { >+ int ret; >+ >+ gld${EMULATION_NAME}_before_allocation (); >+ >++ if (bfd_get_flavour (link_info.output_bfd) != bfd_target_elf_flavour) >++ { >++ avr_no_stubs = TRUE; >++ return; >++ } >++ >+ /* We only need stubs for avr6, avrxmega6, and avrxmega7. */ >+ if (strcmp ("${EMULATION_NAME}","avr6") >+ && strcmp ("${EMULATION_NAME}","avrxmega6") >+ && strcmp ("${EMULATION_NAME}","avrxmega7") ) >+ avr_no_stubs = TRUE; >+@@ -106,10 +112,16 @@ avr_elf_${EMULATION_NAME}_before_allocation (void) >+ static void >+ avr_elf_create_output_section_statements (void) >+ { >+ flagword flags; >+ >++ if (bfd_get_flavour (link_info.output_bfd) != bfd_target_elf_flavour) >++ { >++ einfo ("%X%P: changing output format whilst linking is not supported\n"); >++ return; >++ } >++ >+ stub_file = lang_add_input_file ("linker stubs", >+ lang_input_file_is_fake_enum, >+ NULL); >+ >+ stub_file->the_bfd = bfd_create ("linker stubs", link_info.output_bfd); >+@@ -202,14 +214,18 @@ avr_finish (void) >+ { >+ avr_link_relax = RELAXATION_ENABLED; >+ } >+ >+ abfd = link_info.output_bfd; >+- if (avr_link_relax) >+- elf_elfheader (abfd)->e_flags |= EF_AVR_LINKRELAX_PREPARED; >+- else >+- elf_elfheader (abfd)->e_flags &= ~EF_AVR_LINKRELAX_PREPARED; >++ >++ if (bfd_get_flavour (link_info.output_bfd) == bfd_target_elf_flavour) >++ { >++ if (avr_link_relax) >++ elf_elfheader (abfd)->e_flags |= EF_AVR_LINKRELAX_PREPARED; >++ else >++ elf_elfheader (abfd)->e_flags &= ~EF_AVR_LINKRELAX_PREPARED; >++ } >+ >+ gld${EMULATION_NAME}_finish (); >+ } >+ EOF >+ >+diff --git a/ld/emultempl/m68hc1xelf.em b/ld/emultempl/m68hc1xelf.em >+index bfe88d604fd7af2e39359af39d7967328f5d60d6..f7337da2066b9df66847b68679ddeeb81d1d7b78 100644 >+--- a/ld/emultempl/m68hc1xelf.em >++++ b/ld/emultempl/m68hc1xelf.em >+@@ -64,10 +64,13 @@ m68hc11_elf_${EMULATION_NAME}_before_allocation (void) >+ lang_memory_region_type* region; >+ int ret; >+ >+ gld${EMULATION_NAME}_before_allocation (); >+ >++ if (bfd_get_flavour (link_info.output_bfd) != bfd_target_elf_flavour) >++ return; >++ >+ /* If generating a relocatable output file, then we don't >+ have to generate the trampolines. */ >+ if (bfd_link_relocatable (&link_info)) >+ return; >+ >+@@ -139,10 +142,16 @@ m68hc11_elf_${EMULATION_NAME}_before_allocation (void) >+ fake input file to hold the stub sections. */ >+ >+ static void >+ m68hc11elf_create_output_section_statements (void) >+ { >++ if (bfd_get_flavour (link_info.output_bfd) != bfd_target_elf_flavour) >++ { >++ einfo ("%X%P: changing output format whilst linking is not supported\n"); >++ return; >++ } >++ >+ stub_file = lang_add_input_file ("linker stubs", >+ lang_input_file_is_fake_enum, >+ NULL); >+ stub_file->the_bfd = bfd_create ("linker stubs", link_info.output_bfd); >+ if (stub_file->the_bfd == NULL >+@@ -284,26 +293,29 @@ m68hc11elf_add_stub_section (const char *stub_sec_name, >+ /* For the 68HC12 we use this opportunity to build linker stubs. */ >+ >+ static void >+ m68hc11elf_after_allocation (void) >+ { >+- /* Now build the linker stubs. */ >+- if (stub_file->the_bfd->sections != NULL) >++ if (bfd_get_flavour (link_info.output_bfd) == bfd_target_elf_flavour) >+ { >+- /* Call again the trampoline analyzer to initialize the trampoline >+- stubs with the correct symbol addresses. Since there could have >+- been relaxation, the symbol addresses that were found during >+- first call may no longer be correct. */ >+- if (!elf32_m68hc11_size_stubs (link_info.output_bfd, >+- stub_file->the_bfd, >+- &link_info, 0)) >++ /* Now build the linker stubs. */ >++ if (stub_file->the_bfd->sections != NULL) >+ { >+- einfo ("%X%P: can not size stub section: %E\n"); >+- return; >++ /* Call again the trampoline analyzer to initialize the trampoline >++ stubs with the correct symbol addresses. Since there could have >++ been relaxation, the symbol addresses that were found during >++ first call may no longer be correct. */ >++ if (!elf32_m68hc11_size_stubs (link_info.output_bfd, >++ stub_file->the_bfd, >++ &link_info, 0)) >++ { >++ einfo ("%X%P: can not size stub section: %E\n"); >++ return; >++ } >++ if (!elf32_m68hc11_build_stubs (link_info.output_bfd, &link_info)) >++ einfo ("%X%P: can not build stubs: %E\n"); >+ } >+- if (!elf32_m68hc11_build_stubs (link_info.output_bfd, &link_info)) >+- einfo ("%X%P: can not build stubs: %E\n"); >+ } >+ >+ gld${EMULATION_NAME}_after_allocation (); >+ } >+ >+diff --git a/ld/testsuite/ld-unique/pr21529.d b/ld/testsuite/ld-unique/pr21529.d >+index bc4763dfeb1fae59b593e17d45563433c0b70609..5d3436badb654b5e4e60f686667013cbd6630d1b 100644 >+--- a/ld/testsuite/ld-unique/pr21529.d >++++ b/ld/testsuite/ld-unique/pr21529.d >+@@ -1,5 +1,6 @@ >+ #ld: --oformat binary -T pr21529.ld -e main >+ #objdump: -s -b binary >+-#xfail: aarch64*-*-* arm*-*-* hppa-*-* ia64-*-* nds32*-*-* score-*-* >++#notarget: aarch64*-*-* arm*-*-* avr-*-* hppa-*-* ia64-*-* m68hc1*-*-* nds32*-*-* score-*-* >++# Skip targets which can't change output format to binary. >+ >+ #pass >+-- >+2.13.5 >+ >diff --git a/binutils.spec b/binutils.spec >index 2872b34eab1503d6ab5f4aca656d6839a60ffa03..9998d403436041855fcc1a53b68de56b05a058b3 100644 >--- a/binutils.spec >+++ b/binutils.spec >@@ -52,11 +52,11 @@ > #--------------------------------------------------------------------------------- > > Summary: A GNU collection of binary utilities > Name: %{?cross}binutils%{?_with_debug:-debug} > Version: 2.29 >-Release: 7%{?dist} >+Release: 7%{?dist}.1 > License: GPLv3+ > Group: Development/Tools > URL: http://sources.redhat.com/binutils > > # Note - the Linux Kernel binutils releases are too unstable and contain too >@@ -117,10 +117,14 @@ Patch13: binutils-2.29-filename-in-error-messages.patch > > # Purpose: Do not enable the PPC64 plt-localentry0 linker optimization by default. > # Lifetime: Fixed in 2.29.1. > Patch15: binutils-2.29-ppc64-plt-localentry0-disable.patch > >+# Purpose: Fix failure to build memtestx86+ >+# Lifetime: Fixed in 2.29.1 >+Patch16: binutils-2.29-Add-more-targets-to-the-list-of-architectures.patch >+ > #--------------------------------------------------------------------------------- > > Provides: bundled(libiberty) > > # BZ 1173780: Building GOLD for PPC is not working at the moment. >@@ -249,10 +253,11 @@ using libelf instead of BFD. > %patch07 -p1 > %patch11 -p1 > %patch12 -p1 > %patch13 -p1 > %patch15 -p1 >+%patch16 -p1 > > # We cannot run autotools as there is an exact requirement of autoconf-2.59. > > # On ppc64 and aarch64, we might use 64KiB pages > sed -i -e '/#define.*ELF_COMMONPAGESIZE/s/0x1000$/0x10000/' bfd/elf*ppc.c >-- >2.13.5 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
sgallagh
: review?
Actions:
View
|
Diff
Attachments on
bug 1491023
: 1326023 |
1326143