bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/15707] New: Assertion failed while trying to statically link a C


From: logout at free dot fr
Subject: [Bug ld/15707] New: Assertion failed while trying to statically link a C++ program
Date: Sun, 30 Jun 2013 21:13:35 +0000

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

            Bug ID: 15707
           Summary: Assertion failed while trying to statically link a C++
                    program
           Product: binutils
           Version: 2.23
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: logout at free dot fr

Created attachment 7104
  --> http://sourceware.org/bugzilla/attachment.cgi?id=7104&action=edit
Script to build a full cross-compilation toolchain from scratch

I'm trying to build a reliable ARM toolchain from scratch (see attached
script/archive for further information). After several days, I managed to
create that toolchain and I compiled a very simple C++ program. 

// main.cxx
#include <string>
#include <iostream>

int main(int ac, char const *av[])
{
    std::string app = av[0];

    std::cout << "APP: " << app << std::endl;
    for (int n = 1; n < ac; ++n) {
        std::cout << "\tARG" << n << ": " << av[n] << std::endl;
    }
}

When compiling with "armeb-edt-linux-gnueabi-g++ -o main main.cxx" everything
looks fine and the generated code seems legit. 

When compiling with "armeb-edt-linux-gnueabi-g++ -static -o main main.cxx", ld
fails with the following assertion: 

/home/edt/personnal/cross-compile/staging/armeb-edt-linux-gnueabi/usr/lib/gcc/armeb-edt-linux-gnueabi/4.7.3/../../../../armeb-edt-linux-gnueabi/bin/ld:
BFD (GNU Binutils) 2.23.2 assertion fail
/home/edt/personnal/cross-compile/.source/binutils-2.23.2/bfd/elf32-arm.c:7363
collect2: error: ld returned 1 exit status

-- 
You are receiving this mail because:
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]