The master branch has been updated by Alan Modra
<amo...@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-
gdb.git;h=7ba115508aa02ffbb01a09613b5dffdd0c6563e3

commit 7ba115508aa02ffbb01a09613b5dffdd0c6563e3
Author: Alan Modra <amo...@gmail.com>
Date:   Tue Sep 8 13:02:31 2020 +0930

    PR26580, Size and alignment of commons vs as-needed shared lib
    
    Two pieces to this puzzle:
    1) Revert HJ's fix for PR13250 so that size and alignment isn't
       sticky, instead attack the real underlying problem that
       _bfd_generic_link_add_one_symbol does the wrong thing in making a
       common section in a shared library bfd.
    2) Save and restore common u.c.p fields, which hold the section and
       alignment.
    
    A better fix for (2) would be to throw away all of that horrible code
    saving and restoring the hash table when loading as-needed library
    symbols, and instead do a scan over as-needed library symbols before
    adding anything.
    
    bfd/
            PR 13250
            PR 26580
            * elflink.c (_bfd_elf_merge_symbol): Make "override" a bfd**.
            Return oldbfd in override when old common should override new
            common.
            (_bfd_elf_add_default_symbol): Adjust to suit.
            (elf_link_add_object_symbols): Likewise.  Pass "override" to
            _bfd_generic_link_add_one_symbol.  Save and restore common u.c.p
            field for --as-needed shared libraries.  Revert pr13250 changes.
    ld/
            * testsuite/ld-elf/pr26580-a.s,
            * testsuite/ld-elf/pr26580-b.s,
            * testsuite/ld-elf/pr26580-1.sd,
            * testsuite/ld-elf/pr26580-2.sd: New tests
            * testsuite/ld-elf/comm-data.exp: Run new tests.
            * testsuite/ld-elf/pr26580-a.c,
            * testsuite/ld-elf/pr26580-b.c,
            * testsuite/ld-elf/pr26580-3.out,
            * testsuite/ld-elf/pr26580-4.out: New tests.
            * testsuite/ld-elf/shared.exp: Run new tests.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to binutils in Ubuntu.
https://bugs.launchpad.net/bugs/697229

Title:
  openmpi link failure with ld --as-needed

Status in binutils:
  Fix Released
Status in binutils package in Ubuntu:
  Fix Released
Status in openmpi package in Ubuntu:
  Invalid
Status in binutils source package in Oneiric:
  Fix Released
Status in openmpi source package in Oneiric:
  Invalid
Status in binutils source package in Precise:
  Fix Released
Status in openmpi source package in Precise:
  Invalid
Status in openmpi package in Debian:
  Fix Released

Bug description:
  $ cat test.F
        program main
         include 'mpif.h'
         integer ierr
         call mpi_init(ierr)
        end
  $ mpif90 test.F -Wl,--as-needed -Wall -Wno-unused-variable -g   
-I/usr/lib/openmpi/include -I/usr/lib/openmpi/lib -L/usr/lib/openmpi/lib 
-L/usr/lib/gcc/i686-linux-gnu/4.5.2 -ldl -lmpi -lopen-rte -lopen-pal -lnsl 
-lutil -lgcc_s -lpthread -ldl        /usr/bin/ld: 
/tmp/cccq3IWF.o(.debug_info+0x48d): unresolvable R_X86_64_64 relocation against 
symbol `mpi_fortran_argv_null_'
  /usr/bin/ld: /tmp/cccq3IWF.o(.debug_info+0x4a7): unresolvable R_X86_64_64 
relocation against symbol `mpi_fortran_argv_null_'
  /usr/bin/ld: /tmp/cccq3IWF.o(.debug_info+0x511): unresolvable R_X86_64_64 
relocation against symbol `mpi_fortran_errcodes_ignore_'
  /usr/bin/ld: /tmp/cccq3IWF.o(.debug_info+0x52b): unresolvable R_X86_64_64 
relocation against symbol `mpi_fortran_errcodes_ignore_'

  works with --no-as-needed.

To manage notifications about this bug go to:
https://bugs.launchpad.net/binutils/+bug/697229/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to