Summary: | Problem with partial linking [Was: Assertion triggered in cofflink.c] | ||
---|---|---|---|
Product: | binutils | Reporter: | Anton Korobeynikov <asl> |
Component: | ld | Assignee: | unassigned |
Status: | RESOLVED FIXED | ||
Severity: | critical | CC: | bug-binutils |
Priority: | P2 | ||
Version: | 2.20 | ||
Target Milestone: | --- | ||
Host: | i686-pc-mingw32 | Target: | |
Build: | i686-pc-mingw32 | Last reconfirmed: | |
Attachments: |
Set of object files on which link failed.
First object file Second object file Add check for missing aux entries Output from the first pass The second pass output Improved check for missing aux entries. |
Description
Anton Korobeynikov
2006-05-14 08:29:36 UTC
Created attachment 1023 [details]
Set of object files on which link failed.
I've digged into the problem some more deep. The main problem is in file named LLVMSelectionDAG.o, which can be found in the prev. attach. This file was produced as 'ld -r' output from 9 object files. I've reduced the full set to just 2 files, running ld on which produces an assertion. So, if I do: ld -r -o LLVMSelectionDAG.o ScheduleDAGList.o ScheduleDAGRRList.o ld -o LLVMSelectionDAG.o I'm getting an assertion (even more, if I just do ld -r LLVMSelectionDAG.o -o LLVMSelectionDAG_1.o, I'm getting an exception). Seems, that something is broken in the partial link... Created attachment 1027 [details]
First object file
Created attachment 1028 [details]
Second object file
Created attachment 1047 [details]
Add check for missing aux entries
Hi Anton, I think that this is a case of a missing check in bfd_coff_link_input_bfd, so please could you try the uploaded patch and let me know if it works on a real world test, (ie your build environment). Cheers Nick Unfortunately, patch doesn't work for me. Assertion is still triggered. I'm attaching the file from the first linker pass (ld -r -o LLVMSelectionDAG.o ScheduleDAGList.o ScheduleDAGRRList.o). Created attachment 1048 [details]
Output from the first pass
This is the output from 'ld -r -o LLVMSelectionDAG.o ScheduleDAGList.o
ScheduleDAGRRList.o'
Created attachment 1049 [details]
The second pass output
The output from the second pass: `ld -r -o LLVMSelectionDAG_1.o
LLVMSelectionDAG.o`. Assertion is triggered, but file is actually not null.
Hi Anton, Sorry about the delay in getting back to you. I am a bit swamped at the moment. I am uploading a revised patch which I think should take care of this issue now. The problem appears to be the fact that there are multiple defintions of a symbol, but only one of them has an aux entry and the wrong version of the symbol was being selecetd when the code wanted to process the aux data. Cheers Nick Created attachment 1114 [details]
Improved check for missing aux entries.
Nick, Now no assertions at all. Files look fine. However, I don't have a complete build system & sources which the attached .o files was taken from. So I don't know the results of linking. I'll let you know the results of linking the whole program (I hope, everything will be ok) in 4-5 days. Nick! Everything is building ok. So, this bug is definitely fixed by now. Thanks alot! Hi Anton, Great - I have checked the revised patch in together with this ChangeLog entry. Cheers Nick bfd/ChangeLog 2006-07-05 Nick Clifton <nickc@redhat.com> PR ld/2659 * cofflink.c (_bfd_coff_link_input_bfd): Fix selection of aux entry when multiple definitions of a symbol are encountered. *** Bug 260998 has been marked as a duplicate of this bug. *** Seen from the domain http://volichat.com Page where seen: http://volichat.com/adult-chat-rooms Marked for reference. Resolved as fixed @bugzilla. |