Bug 906273 - ld fails with "dynreloc miscount" and "can not edit opd: Bad value" errors
Summary: ld fails with "dynreloc miscount" and "can not edit opd: Bad value" errors
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: binutils
Version: 18
Hardware: ppc64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Nick Clifton
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-31 10:44 UTC by Jonas Maebe
Modified: 2013-02-04 10:54 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-04 10:45:23 UTC
Type: Bug
Embargoed:


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

Description Jonas Maebe 2013-01-31 10:44:05 UTC
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.

Comment 1 Jonas Maebe 2013-01-31 10:46:08 UTC
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 15:52:02 UTC
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

Comment 3 Jonas Maebe 2013-01-31 16:57:29 UTC
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 10:11:30 UTC
Thanks!

Comment 6 Nick Clifton 2013-02-04 10:45:23 UTC
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

Comment 7 Jonas Maebe 2013-02-04 10:54:00 UTC
Awesome!


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