Why ld.gold fails to recognise some commands in linker script?

Solution In Progress - Updated -

Issue

  • ld.gold fails to recognise some commands in linker script

- /opt/rh/devtoolset-1.1/root/usr/bin/g++ -Wl,--script=./fail.lds a.c /opt/rh/devtoolset-1.1/root/usr/libexec/gcc/x86_64-redhat-linux/4.7.2/ld: error: ./fail.lds:6:8: syntax error, unexpected STRING /opt/rh/devtoolset-1.1/root/usr/libexec/gcc/x86_64-redhat-linux/4.7.2/ld: fatal error: unable to parse script file ./fail.lds collect2: error: ld returned 1 exit status

Environment

  • Red Hat Enterprise Linux 5
  • devtoolset-1.1-binutils-2.23.51.0.3-3.el5

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.