This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PR22764][LD][AARCH64]Allow R_AARCH64_ABS16 and R_AARCH64_ABS32 against absolution symbol or undefine symbol in shared object under LP64 abi.


Hi Nick,

On 05/02/18 17:23, Nick Clifton wrote:
Hi Renlin,

Regarding for the indirect symbol case you pointed out,
I saw the following code in elfNN_aarch64_check_relocs ()

       if (r_symndx < symtab_hdr->sh_info)
     {
       /* A local symbol.  */
       ...
     }
       else
     {
       h = sym_hashes[r_symndx - symtab_hdr->sh_info];
       while (h->root.type == bfd_link_hash_indirect
          || h->root.type == bfd_link_hash_warning)
         h = (struct elf_link_hash_entry *) h->root.u.i.link;
     }

This is done before the check happens.
Does this mean, h is already been processed to points to final symbol?

Yes. :-)  [I should have looked further back in the code when I was reviewing the patch].

Not at all! It is a good point. I didn't consider the case you mentioned when I wrote the patch.
It happens that it is properly handled.

Regards,
Renlin



Cheers
   Nick



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]