[Bug binutils/11549] New: Allow 32bit relocations in 64bit code

2010-04-28 Thread dev at sw dot ru
Unfortunately, elf64_x86_64_check_relocs prohibits 32bit relocations, which 
makes it impossible to link 32/64 bit code together in some cases though may be 
needed in low-level loaders and such.

We faced this problem when tried to link together 32bit asm code with 64bit 
system code. The target binary is loaded at virtual addresses lower then 4GB, 
so 
there is no problem in such a mix, except for ld doesn't allow to link the code 
together.

Attached patch fixes the problem.

-- 
   Summary: Allow 32bit relocations in 64bit code
   Product: binutils
   Version: 2.20
Status: NEW
  Severity: normal
  Priority: P2
 Component: binutils
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: dev at sw dot ru
CC: bug-binutils at gnu dot org
 GCC build triplet: x86_64-linux-elf
  GCC host triplet: x86_64-linux-elf
GCC target triplet: x86_64-linux-elf


http://sourceware.org/bugzilla/show_bug.cgi?id=11549

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/11549] Allow 32bit relocations in 64bit code

2010-04-28 Thread dev at sw dot ru

--- Additional Comments From dev at sw dot ru  2010-04-28 09:06 ---
Created an attachment (id=4756)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4756&action=view)
patch to fix


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=11549

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/11549] Allow 32bit relocations in 64bit code

2010-04-28 Thread hjl dot tools at gmail dot com

--- Additional Comments From hjl dot tools at gmail dot com  2010-04-28 
14:19 ---
Please provide a testcase.

-- 
   What|Removed |Added

 CC||hjl dot tools at gmail dot
   ||com
 Status|NEW |WAITING


http://sourceware.org/bugzilla/show_bug.cgi?id=11549

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils