bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/22764] [2.30 Regression] ld fails to link 4.13 and 4.15 kernels


From: peter.smith at linaro dot org
Subject: [Bug ld/22764] [2.30 Regression] ld fails to link 4.13 and 4.15 kernels on aarch64-linux-gnu
Date: Wed, 31 Jan 2018 18:28:35 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=22764

Peter Smith <peter.smith at linaro dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |peter.smith at linaro dot org

--- Comment #5 from Peter Smith <peter.smith at linaro dot org> ---
I think that the new error message for R_AARCH64_ABS32 from the linker makes
some sense if the destination symbol is section relative as there is no dynamic
relocation supported and truncating a 64-bit address is most likely a mistake.

However if the destination symbol is absolute the linker shouldn't make the
assumption that the symbol is an address so it should resolve the relocation at
static link-time.

I think the test:
        case BFD_RELOC_AARCH64_16:
#if ARCH_SIZE == 64
        case BFD_RELOC_AARCH64_32:
#endif
          if (bfd_link_pic (info)
              && (sec->flags & SEC_ALLOC) != 0
              && (sec->flags & SEC_READONLY) != 0)
            ... Give error message
Should check that the symbol is not absolute as well.

Unfortunately I can't think of a workaround for the case where the value of the
symbols has to be in the RO-segment. For some reason the check only applies in
RO sections, which does not make a lot of sense to me as a R_AARCH64_ABS32 from
a RW section to an address will truncate it in the same way as if it were from
a RO section. No dynamic relocation is generated for either RO or RW so I don't
know why the distinction has been made.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]