http://sourceware.org/bugzilla/show_bug.cgi?id=15365

             Bug #: 15365
           Summary: MIPS linker hits assertion with -mabi=64 accessing
                    __ehdr_start
           Product: binutils
           Version: 2.24 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
        AssignedTo: unassig...@sourceware.org
        ReportedBy: s...@gcc.gnu.org
    Classification: Unclassified


A recent change to glibc caused my ToT MIPS builds to fail.  The test case
included below demonstrates the linker assertion I am hitting when building
glibc.

% cat ehdr.c
#include <stdio.h>
#include <elf.h> /* has definition of Elf32_Ehdr & Elf64_Ehdr */

extern const Elf32_Ehdr __ehdr_start __attribute__ ((weak));

main()
{
    void *x;
    x = (void *) &__ehdr_start;
    printf("0x%x\n", x);
}

% mips-mti-linux-gnu-gcc -mips64r2 -mabi=64 ehdr.c -o x
/local/home/sellcey/nightly2/install-mips-mti-linux-gnu/lib/gcc/mips-mti-linux-gnu/4.9.0/../../../../mips-mti-linux-gnu/bin/ld:
BFD (GNU Binutils) 2.23.52.20130411 assertion fail
/local/home/sellcey/nightly2/src/binutils/bfd/elfxx-mips.c:3457
collect2: error: ld returned 1 exit status

The assertion in elfxx-mips.c is:


   /* This function shouldn't be called for symbols that live in the global    
  area of the GOT.  */
   BFD_ASSERT (h == NULL || h->global_got_area == GGA_NONE);

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to