Created attachment 690842 [details] Archive containing files to reproduce the problem Description of problem: When compiling any program using the the Free Pascal Compiler svn trunk version, the resulting program fails to link with the following errors from ld: /usr/bin/ld: dynreloc miscount for system.o, section .opd /usr/bin/ld: can not edit opd: Bad value Version-Release number of selected component (if applicable): GNU ld version 2.23.51.0.1-3.fc18 20120806 How reproducible: Always Steps to Reproduce: 1. Unpack the provided archive and change into the dynrelocmiscount directory 2. Execute ./ppas.sh Actual results: Linking tt /usr/bin/ld: dynreloc miscount for system.o, section .opd /usr/bin/ld: can not edit opd: Bad value An error occurred while linking tt Expected results: ld links the program successfully. The resulting program won't print anything when executed, it's a dummy. Additional info: The test was executed on gcc110.fsffrance.org. Everything worked fine before that machine was upgraded from FC16 to FC18.
I forgot to mention that everything still work fine when the code is compiled with FPC 2.6.0. The main difference between the two compiler versions is that FPC svn trunk generates code that is similar to what gcc does when -ffunction-sections -fdata-sections are specified, while 2.6.0 puts everything in a single text/data section.
Hi Jonas, As a workaround you can just link without --gc-sections specified on the linker command line. I have produced a possible patch to fix this problem, but not being a PowerPC64 expert I have forwarded it to the ppc maintainers for review and possible alteration: http://sourceware.org/ml/binutils/2013-01/msg00486.html I will update the Fedora linker once I have received feedback from them. Cheers Nick
Thanks a lot for the quick feedback, workaround and proposed patch! Since there's a workaround, please feel free to reduce the priority to "medium" (it seems I can't do that).
http://sourceware.org/ml/binutils/2013-02/msg00001.html
Thanks!
I have checked in a patch and created binutils-2.23.51.0.1-7.fc18. I will not bother updating rawhide because the same patch is in the FSF sources which will be imported into rawhide in a couple of weeks. Cheers Nick
Awesome!