[Bug ld/26659] x86_64 pe relocation truncated to fit: R_X86_64_PC32 against undefined symbol

2020-09-28 Thread mati865 at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26659

Mateusz Mikuła  changed:

   What|Removed |Added

 CC||mati865 at gmail dot com

--- Comment #1 from Mateusz Mikuła  ---
There is discussion about this issue in
https://github.com/msys2/MINGW-packages/issues/6986

I tested it with GCC 10.2, Binutils 2.35, Clang/LLD 11.
Using reproducer in shared.zip by calling ./build.sh (designed to run under
MSYS2) GCC+ld.bfd fails with this error:

D:\tmp\weak\shared-wiki\build-bfd/../power_slow.c:15:(.text+0x18): relocation
truncated to fit: R_X86_64_PC32 against undefined symbol `user_hook'

The same code works as expected when using GCC+ld.lld, Clang+ld.bfd,
Clang+ld.lld.

Extracted details from issue in MSYS2 repo (I couldn't find anything beyond
what was already said there):

Relocations:
Clang:
  Section (1) .text {
0xB IMAGE_REL_AMD64_REL32 .refptr.user_hook (10)
0x1F IMAGE_REL_AMD64_REL32 .refptr.user_hook (10)
0x4D IMAGE_REL_AMD64_REL32 power2 (24)
  }

GCC:
  Section (1) .text {
0xE IMAGE_REL_AMD64_REL32 .refptr.user_hook (29)
0x18 IMAGE_REL_AMD64_REL32 user_hook (33)
0x37 IMAGE_REL_AMD64_REL32 power2 (31)
  }

Relevant symbols:
  Symbol {
Name: user_hook
Value: 0
Section: IMAGE_SYM_UNDEFINED (0)
BaseType: Null (0x0)
ComplexType: Function (0x2)
StorageClass: WeakExternal (0x69)
AuxSymbolCount: 1
AuxWeakExternal {
  Linked: .weak.user_hook.power3 (30)
  Search: NoLibrary (0x1)
}
  }
Symbol {
Name: .rdata$.refptr.user_hook
Value: 0
Section: .rdata$.refptr.user_hook (12)
BaseType: Null (0x0)
ComplexType: Null (0x0)
StorageClass: Static (0x3)
AuxSymbolCount: 1
AuxSectionDef {
  Length: 8
  RelocationCount: 1
  LineNumberCount: 0
  Checksum: 0x0
  Number: 0
  Selection: Any (0x2)
}
  }
  Symbol {
Name: .refptr.user_hook
Value: 0
Section: .rdata$.refptr.user_hook (12)
BaseType: Null (0x0)
ComplexType: Null (0x0)
StorageClass: External (0x2)
AuxSymbolCount: 0
  }

Assembly and object file are included in objects.zip.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/26659] x86_64 pe relocation truncated to fit: R_X86_64_PC32 against undefined symbol

2020-09-28 Thread sourceware-bugzilla at jdrake dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26659

--- Comment #2 from sourceware-bugzilla at jdrake dot com ---
Created attachment 12867
  --> https://sourceware.org/bugzilla/attachment.cgi?id=12867&action=edit
testcase source from msys2 #6986

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/26659] x86_64 pe relocation truncated to fit: R_X86_64_PC32 against undefined symbol

2020-09-28 Thread sourceware-bugzilla at jdrake dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26659

--- Comment #3 from sourceware-bugzilla at jdrake dot com ---
Created attachment 12868
  --> https://sourceware.org/bugzilla/attachment.cgi?id=12868&action=edit
testcase objects from msys2 #6986

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/26675] New: 32bit build of dxvk fails with binutils 2.35.1

2020-09-28 Thread mike at fireburn dot co.uk
https://sourceware.org/bugzilla/show_bug.cgi?id=26675

Bug ID: 26675
   Summary: 32bit build of dxvk fails with binutils 2.35.1
   Product: binutils
   Version: 2.35.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: mike at fireburn dot co.uk
  Target Milestone: ---

Created attachment 12869
  --> https://sourceware.org/bugzilla/attachment.cgi?id=12869&action=edit
Build log

This worked fine with binutils 2.34, the 64bit build continues to work

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/26675] 32bit build of dxvk fails with binutils 2.35.1

2020-09-28 Thread mike at fireburn dot co.uk
https://sourceware.org/bugzilla/show_bug.cgi?id=26675

--- Comment #1 from Mike Lothian  ---
https://github.com/doitsujin/dxvk/issues/1782
https://bugs.gentoo.org/745372

-- 
You are receiving this mail because:
You are on the CC list for the bug.