Bug 1547747
| Summary: | gold produces broken executables | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Serge Pavlovsky <pal666> | ||||
| Component: | binutils | Assignee: | Nick Clifton <nickc> | ||||
| Status: | CLOSED WONTFIX | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 27 | CC: | aoliva, dvlasenk, hongjiu.lu, jakub, nickc, pal666 | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | x86_64 | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2018-03-29 07:19:53 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
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 |
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