Bug 906273 - ld fails with "dynreloc miscount" and "can not edit opd: Bad value" errors
ld fails with "dynreloc miscount" and "can not edit opd: Bad value" errors
Product: Fedora
Classification: Fedora
Component: binutils (Show other bugs)
ppc64 Linux
unspecified Severity high
: ---
: ---
Assigned To: Nick Clifton
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-01-31 05:44 EST by Jonas Maebe
Modified: 2013-02-04 05:54 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-02-04 05:45:23 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Archive containing files to reproduce the problem (155.24 KB, application/octet-stream)
2013-01-31 05:44 EST, Jonas Maebe
no flags Details

  None (edit)
Description Jonas Maebe 2013-01-31 05:44:05 EST
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 20120806

How reproducible:


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.
Comment 1 Jonas Maebe 2013-01-31 05:46:08 EST
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.
Comment 2 Nick Clifton 2013-01-31 10:52:02 EST
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:


  I will update the Fedora linker once I have received feedback from them.

Comment 3 Jonas Maebe 2013-01-31 11:57:29 EST
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).
Comment 5 Jonas Maebe 2013-02-02 05:11:30 EST
Comment 6 Nick Clifton 2013-02-04 05:45:23 EST
I have checked in a patch and created binutils-  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.

Comment 7 Jonas Maebe 2013-02-04 05:54:00 EST

Note You need to log in before you can comment on or make changes to this bug.