Bug 14640

Summary: gas generates broken relocations for symbols with weak defs on microblaze
Product: binutils Reporter: Rich Felker <bugdal>
Component: gasAssignee: Not yet assigned to anyone <unassigned>
Status: NEW ---    
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:

Description Rich Felker 2012-09-28 00:59:07 UTC
See this thread for a description of the issue and a patch, which is in Xilinx's fork of binutils but does not seem to have made it upstream:

http://permalink.gmane.org/gmane.linux.uclinux.microblaze/11155

Basically, the issue is that gas thinks it can generate a 16-bit relative jump when there's a local definition of the function, even if that definition is weak and might be overridden by a strong definition that's outside of the 16-bit jump range. I'm in the process of porting musl libc to microblaze, and this issue is a show-stopper since we make heavy use of weak definitions.