Created attachment 1399000 [details] "bad" object, caller(main) object and demonstrating shell script Description of problem: same code linked by ld.bfd works fine,linked by ld.gold jumps into the middle of instruction Version-Release number of selected component (if applicable): binutils-2.29-6.fc27.x86_64 How reproducible: $ LANG=C ./run.sh + link bfd + gcc codectest.c.o pscopyca.o -o codectest.bfd -fuse-ld=bfd + ./codectest.bfd + link gold + gcc codectest.c.o pscopyca.o -o codectest.gold -fuse-ld=gold + ./codectest.gold ./run.sh: line 3: 17605 Segmentation fault (core dumped) ./codectest.$1 Steps to Reproduce: 1. link attached objects with ld.gold 2. run executable Actual results: sigsegv Expected results: clean exit Additional info: link with ld.bfd to see correct behavior
I have submitted this bug report to the FSF binutils project so that the gold maintainers can take a look at it: https://sourceware.org/bugzilla/show_bug.cgi?id=22883
Hi Serge, The conclusion from the binutils maintainers appears to be that the pscopyca.o file is corrupt. (Specifically it is using a RELA relocation but storing it like a REL relocation). Please can you tell us how it was created ? Cheers Nick
it is part of old binary only intel media codecs library
Hi Serge, In which case all I can say is that that binary is broken. The relocations in it are incorrect and cannot and will not be processed correctly by todays linkers. Sorry. Cheers Nick