[GOLD] [PATCH] Changed R_ARM_ABS8; added R_ARM_ABS32_NOI, R_ARM_ABS16, R_ARM_ABS12, R_ARM_THM_ABS5, R_ARM_BASE_ABS relocations

Doug Kwan (關振德) dougkwan@google.com
Fri Oct 9 23:33:00 GMT 2009


Hi,

I saw code like:

    Reltype x = This::arm_symbol_value(object, psymval, addend, false);

If there is no need for thumb bit adjustment, this can be simply written as

   Reltype x = psymval->value(object, addend);

If fact,  I plan to remove the arm_symbol_value in the interworking
patch.  I would appreicate Viktor avoid calling arm_symbol_value in
the future if no adjustment is required.

Thanks

-Doug


2009/10/9 Ian Lance Taylor <iant@google.com>:
> Viktor Kutuzov <vkutuzov@accesssoftek.com> writes:
>
>> Attached is a patch that changes the R_ARM_ABS8 a little (removed unused has_thumb_bit flag) and adds the few new relocations:
>>
>> R_ARM_ABS32_NOI
>> R_ARM_ABS16
>> R_ARM_ABS12
>> R_ARM_THM_ABS5
>> R_ARM_BASE_ABS
>>
>> Best regards,
>> Viktor
>>
>> * gold/arm.cc: Changed R_ARM_ABS8 - removed unused has_thumb_bit flag;
>> added R_ARM_ABS32_NOI, R_ARM_ABS16, R_ARM_ABS12, R_ARM_THM_ABS5,
>> R_ARM_BASE_ABS  relocations
>
> Approved and applied with this ChangeLog entry.  Note how each
> function is called out individually in ChangeLog.
>
> Ian
>
>
> 2009-10-09  Viktor Kutuzov  <vkutuzov@accesssoftek.com>
>
>        * arm.cc (Target_arm::relocate::reloc_is_non_pic): Return true for
>        R_ARM_THM_ABS5, R_ARM_ABS8, R_ARM_ABS12, R_ARM_ABS16,
>        R_ARM_BASE_ABS.
>        (Arm_relocate_functions::abs8): Remove has_thumb_bit parameter.
>        (Arm_relocate_functions::thm_abs5): New function.
>        (Arm_relocate_functions::abs12): New function.
>        (Arm_relocate_functions::abs16): New function.
>        (Arm_relocate_functions::base_abs): New function.
>        (Scan::check_non_pic): Handle R_ARM_ABS32_NOI.
>        (Scan::local): Remove special handling of R_ARM_ABS8.  Handle
>        R_ARM_ABS32_NOI, R_ARM_THM_ABS5, R_ARM_ABS12, R_ARM_ABS16, and
>        R_ARM_BASE_ABS.
>        (Scan::global): Likewise.
>        (Relocate::relocate): Handle R_ARM_ABS12, R_ARM_ABS16,
>        R_ARM_ABS32_NOI, R_ARM_THM_ABS5, and R_ARM_BASE_ABS.
>        (Relocatable_size_for_reloc::get_size_for_reloc): Handle
>        R_ARM_ABS16, R_ARM_THM_ABS5, R_ARM_ABS32_NOI, R_ARM_ABS12, and
>        R_ARM_BASE_ABS.
>



More information about the Binutils mailing list