Why Program linking against libelf.so of developer toolset fails?
Issue
- Program linking against
libelf.soprovided withdevtoolset-<version>-elfutils-libelf-develfails with below error
$ gcc -o main.out main.o -L . -lcallelf -lelf
/opt/rh/devtoolset-3/root/usr/libexec/gcc/x86_64-redhat-linux/4.9.1/ld: main.out: hidden symbol `elf_end' in /opt/rh/devtoolset-3/root/usr/lib/gcc/x86_64-redhat-linux/4.9.1/../../../../lib64/libelf.ar(libelf_a-elf_end.o) is referenced by DSO
/opt/rh/devtoolset-3/root/usr/libexec/gcc/x86_64-redhat-linux/4.9.1/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
Environment
- Red Hat Enterprise Linux 6
- Developer Toolset
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
