Linker error on ArchLinux
See original GitHub issueI’m getting a linker error when running make
(Additionally I’ve tried adding -fPIC
to the compilation options however this hasn’t solved the issue.)
See below command output and versions.
From commit dff63246fed84d90118441b8ba5b5d3bdd094427
make
output:
cc -c injector.c -o injector.o -Wall
injector.c:321:93: warning: excess elements in array initializer
.start={.bytes={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, .len=0},
^~~~
injector.c:321:93: note: (near initialization for ‘total_range.start.bytes’)
injector.c:322:91: warning: excess elements in array initializer
.end={.bytes={0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff}, .len=0},
^~~~
injector.c:322:91: note: (near initialization for ‘total_range.end.bytes’)
cc injector.o -O3 -Wall -l:libcapstone.a -o injector -pthread
/usr/bin/ld: injector.o: relocation R_X86_64_32S against undefined symbol `dummy_stack' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
make: *** [Makefile:35: injector] Error 1
cc --version
: cc (GCC) 7.1.1 20170630
ld --version
: GNU ld (GNU Binutils) 2.28.0.20170506
Issue Analytics
- State:
- Created 6 years ago
- Comments:9
Top Results From Across the Web
[SOLVED] Linker related issued when making c packages ...
Tried to build pam_ssh and rasdaemon, and I get the same type of code error messages. Smells like a gcc regression, right? Arch...
Read more >OpenGL on Arch Linux - Linker Error: Undefined Reference
Your compilation is not complete, you only try to compile one file, whereas there is several. You can use theses command to compile...
Read more >[SOLVED] linker error (glibc bug) - Arch Linux
As for the glibc issue, I;ve narrowed down the offending upgrade to glibc-2.29-1.26 -> glibc-2.29-1.27. There were 3 changes made to the glibc ......
Read more >Linker errors when building audio application on Arch Linux
Hi, I'm getting a various different linker errors when trying to build a new audio application on linux. when trying to build with...
Read more >T56540 install_deps.sh issues on arch linux
Arch. Blender Version All. Short description of error ... [ 7%] Linking CXX static library . ... ERROR! LLVM-3.4.2 failed to compile, exiting....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I simply compiled the injector as static which solved the problem of
however -
-no-pie
also works on gcc7I come across similar issue when building other software in
Arch Linux
, and hope my post can help you.