Bug 16870 - Gold internal error with -fpie and -mcmodel=large
Summary: Gold internal error with -fpie and -mcmodel=large
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: gold (show other bugs)
Version: 2.25
: P2 normal
Target Milestone: ---
Assignee: Cary Coutant
URL:
Keywords:
: 14324 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-04-23 21:54 UTC by Sriraman Tallam
Modified: 2014-05-14 16:51 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sriraman Tallam 2014-04-23 21:54:13 UTC
This code:

foo.cc
----------

extern int foo;
extern int bar();

int main () {
  return foo + bar();
}

compiled with:
gcc-4_9_g++ foo.cc -fpie -mcmodel=large

ld: internal error in relocate, at .../gold/x86_64.cc:3397
Comment 1 Cary Coutant 2014-04-23 22:31:52 UTC
The problem was a missing break statement when processing an R_X86_64_PLTOFF64 relocation. Fixed on trunk.

https://sourceware.org/ml/binutils-cvs/2014-04/msg00141.html
Comment 2 Sourceware Commits 2014-04-23 22:39:02 UTC
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gdb and binutils".

The branch, binutils-2_24-branch has been updated
       via  cb25fe47b0a76573ba04c33a76e0aaab0700b551 (commit)
      from  d69c090f9a7b68088570e725fda7088e8e9e0c76 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=cb25fe47b0a76573ba04c33a76e0aaab0700b551

commit cb25fe47b0a76573ba04c33a76e0aaab0700b551
Author: Cary Coutant <ccoutant@google.com>
Date:   Wed Apr 23 15:17:16 2014 -0700

    Add missing break statement for case elfcpp::R_X86_64_PLTOFF64.
    
    gold/
    	PR gold/16870
    	* x86_64.cc (Target_x86_64::Relocate::relocate): Add missing break.

-----------------------------------------------------------------------

Summary of changes:
 gold/ChangeLog |    5 +++++
 gold/x86_64.cc |    1 +
 2 files changed, 6 insertions(+), 0 deletions(-)
Comment 3 Cary Coutant 2014-04-23 22:41:11 UTC
Also fixed on binutils-2.24 branch.
Comment 4 H.J. Lu 2014-05-14 16:51:53 UTC
*** Bug 14324 has been marked as a duplicate of this bug. ***