Maybe another or1k bug

Giulio Benetti giulio.benetti@benettiengineering.com
Thu Jul 8 22:57:03 GMT 2021


Hi Stafford,

On 7/8/21 11:44 PM, Stafford Horne wrote:
> On Wed, Jul 07, 2021 at 02:25:39PM -0700, Richard Henderson wrote:
>> On 7/7/21 2:06 PM, Stafford Horne wrote:
>>> +CC Richards other account
>>>
>>> Hi Richard,
>>>
>>> I Cced this to you twiddle.net account you on this one originally. Do you recall
>>> why we added the below check in or1k bfd?  It seems to be overly restrictive and
>>> causing some issues below.
>>>
>>>    case R_OR1K_INSN_REL_26:
>>>      if (bfd_link_pic (info) && !SYMBOL_REFERENCES_LOCAL (info, h))
>>>        ERROR
>> ...
>>>> 4. The symbols are from `readelf -s`:
>>>>
>>>>      221: 00008ce4   716 FUNC    GLOBAL PROTECTED   24 alSourcePausev
>>>>      222: 00008fb0    36 FUNC    GLOBAL PROTECTED   24 alSourcePause
>>>>      223: 00008fd4   784 FUNC    GLOBAL PROTECTED   24 alSourceStopv
>>>>      224: 000092e4    36 FUNC    GLOBAL PROTECTED   24 alSourceStop
>>>>      225: 00009308   720 FUNC    GLOBAL PROTECTED   24 alSourceRewindv
>>>>      226: 000095d8    36 FUNC    GLOBAL PROTECTED   24 alSourceRewind
>>
>> Ah, STV_PROTECTED.  Unusual.
>>
>> It looks like this should be SYMBOL_CALLS_LOCAL.  The only difference from
>> SYMBOL_REFERENCES_LOCAL is versus protected symbols.
> 
> Thanks Richard.
> 
> I will post a patch for this in a few days.  Or, maybe Giulio can do it if he
> has time.

Yes, I can give a try. I've never patched binutils but I can try to. 
I'll let you know the result soon.

Thank you and
Best regards
-- 
Giulio Benetti
Benetti Engineering sas


More information about the Binutils mailing list