This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PR22764][LD][AARCH64]Allow R_AARCH64_ABS16 and R_AARCH64_ABS32 against absolution symbol or undefine symbol in shared object under LP64 abi.
- From: Renlin Li <renlin dot li at foss dot arm dot com>
- To: Nick Clifton <nickc at redhat dot com>, "binutils at sourceware dot org" <binutils at sourceware dot org>, Matthias Klose <doko at ubuntu dot com>, ard dot biesheuvel at linaro dot org, arnd at arndb dot de, Ramana Radhakrishnan <Ramana dot Radhakrishnan at arm dot com>
- Date: Mon, 5 Feb 2018 14:10:44 +0000
- Subject: Re: [PR22764][LD][AARCH64]Allow R_AARCH64_ABS16 and R_AARCH64_ABS32 against absolution symbol or undefine symbol in shared object under LP64 abi.
- Authentication-results: sourceware.org; auth=none
- References: <80514701-2aad-d704-12f2-865073b60a99@foss.arm.com> <7d6a7227-4dfd-dc3d-d7ec-93105ff5878e@redhat.com>
Hi Nick,
Thanks for the review!
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?
Regards,
Renlin
On 05/02/18 12:53, Nick Clifton wrote:
Hi Renlin,
Okay to commit and backport to 2.30 branch?
Approved for branch and mainline.
One thing though - and I am just being paranoid now -
can you get an indirect symbol that points to an absolute
symbol ?
If so, then you would need to enhance your check to follow
any indirect symbol to see what type it (eventually) becomes...
Cheers
Nick