[Bug ld/20800] BFD Linker failing (unresolvable R_X86_64_PLTOFF64) with -mcmodel=large and --start-group

2016-11-15 Thread keno at juliacomputing dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=20800

--- Comment #11 from Keno Fischer  ---
Awesome, thank you so much!

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/20800] BFD Linker failing (unresolvable R_X86_64_PLTOFF64) with -mcmodel=large and --start-group

2016-11-14 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=20800

H.J. Lu  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |2.28

--- Comment #10 from H.J. Lu  ---
Fixed for 2.28.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/20800] BFD Linker failing (unresolvable R_X86_64_PLTOFF64) with -mcmodel=large and --start-group

2016-11-14 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=20800

--- Comment #9 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by H.J. Lu :

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

commit 9d734efa1034d266249751978f95a686ec9d19c6
Author: H.J. Lu 
Date:   Mon Nov 14 10:13:03 2016 -0800

Also check GOT PLT for R_X86_64_PLTOFF64

Since "-z now" replaces PLT with GOT PLT, we should also check GOT PLT
for R_X86_64_PLTOFF64 relocation.

bfd/

PR ld/20800
* elf64-x86-64.c (elf_x86_64_relocate_section): Also check
plt_got.offset for R_X86_64_PLTOFF64.

ld/

PR ld/20800
* testsuite/ld-x86-64/pr20800a.S: New file.
* testsuite/ld-x86-64/pr20800b.S: Likewise.
* testsuite/ld-x86-64/x86-64.exp: Run PR ld/20800 test.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/20800] BFD Linker failing (unresolvable R_X86_64_PLTOFF64) with -mcmodel=large and --start-group

2016-11-14 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=20800

H.J. Lu  changed:

   What|Removed |Added

 Status|WAITING |NEW

--- Comment #8 from H.J. Lu  ---
[hjl@gnu-6 pr20800]$ cat test.c
#include 
int main(void) {
printf("Hello World");
return 0;
}
[hjl@gnu-6 pr20800]$ gcc -fpie -mcmodel=large -fno-builtin test.c 
[hjl@gnu-6 pr20800]$ gcc -pie test.o -Wl,-z,now 
/usr/local/bin/ld: test.o(.text+0x36): unresolvable R_X86_64_PLTOFF64
relocation against symbol `printf@@GLIBC_2.2.5'
/usr/local/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
[hjl@gnu-6 pr20800]$

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/20800] BFD Linker failing (unresolvable R_X86_64_PLTOFF64) with -mcmodel=large and --start-group

2016-11-11 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=20800

--- Comment #7 from H.J. Lu  ---
(In reply to Keno Fischer from comment #4)

> ```
> I'd also be happy to give you SSH access to this machine.

I sent you my ssh key.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/20800] BFD Linker failing (unresolvable R_X86_64_PLTOFF64) with -mcmodel=large and --start-group

2016-11-11 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=20800

--- Comment #6 from H.J. Lu  ---
(In reply to Keno Fischer from comment #5)
> Created attachment 9625 [details]
> My test.o

Your test.o works for me.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/20800] BFD Linker failing (unresolvable R_X86_64_PLTOFF64) with -mcmodel=large and --start-group

2016-11-11 Thread keno at juliacomputing dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=20800

--- Comment #5 from Keno Fischer  ---
Created attachment 9625
  --> https://sourceware.org/bugzilla/attachment.cgi?id=9625&action=edit
My test.o

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/20800] BFD Linker failing (unresolvable R_X86_64_PLTOFF64) with -mcmodel=large and --start-group

2016-11-11 Thread keno at juliacomputing dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=20800

--- Comment #4 from Keno Fischer  ---
Attaching my test.o here. Maybe it's a compiler problem. What version of ld are
you using? Maybe it's already fixed? I have:
```
ld --version
GNU ld (GNU Binutils for Ubuntu) 2.27
Copyright (C) 2016 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
```
I'd also be happy to give you SSH access to this machine.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/20800] BFD Linker failing (unresolvable R_X86_64_PLTOFF64) with -mcmodel=large and --start-group

2016-11-11 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=20800

--- Comment #3 from H.J. Lu  ---
(In reply to Keno Fischer from comment #2)
> This is on stock Ubuntu 16.10. Try adding `-fPIE` to the compile invocation
> maybe? I know Debian recently switched that on by default.

Works for me:

[hjl@gnu-6 pr20800]$ cat test.c
#include 
int main(void) {
printf("Hello World");
return 0;
}
[hjl@gnu-6 pr20800]$ gcc -shared -mcmodel=large -fno-builtin -c test.c -fPIE
[hjl@gnu-6 pr20800]$ gcc -Wl,-rpath,/lib64 -m64 -Wl,--start-group test.o
-Wl,--end-group -pie
[hjl@gnu-6 pr20800]$

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/20800] BFD Linker failing (unresolvable R_X86_64_PLTOFF64) with -mcmodel=large and --start-group

2016-11-10 Thread keno at juliacomputing dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=20800

--- Comment #2 from Keno Fischer  ---
This is on stock Ubuntu 16.10. Try adding `-fPIE` to the compile invocation
maybe? I know Debian recently switched that on by default.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/20800] BFD Linker failing (unresolvable R_X86_64_PLTOFF64) with -mcmodel=large and --start-group

2016-11-10 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=20800

H.J. Lu  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2016-11-10
 CC||hjl.tools at gmail dot com
 Ever confirmed|0   |1

--- Comment #1 from H.J. Lu  ---
I can't reproduce this on Fedora 24.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils