x86: Update X86_64_GOT_TYPE_P to cover more GOT relocations
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 3 Feb 2022 19:48:16 +0000 (11:48 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 3 Feb 2022 19:51:18 +0000 (11:51 -0800)
Add R_X86_64_GOT32, R_X86_64_GOT64, R_X86_64_GOTPCREL64 and
R_X86_64_GOTPLT64 to X86_64_GOT_TYPE_P to cover more GOT relocations.

PR ld/28858
* elfxx-x86.h (X86_64_GOT_TYPE_P): Add R_X86_64_GOT32,
R_X86_64_GOT64, R_X86_64_GOTPCREL64 and R_X86_64_GOTPLT64.

bfd/elfxx-x86.h

index 4b5784ca08a168608fa05ee9b7526ecb027ddadd..3219f363a9ae90048831913e0cd4c90473ee5a7f 100644 (file)
 #define X86_64_GOT_TYPE_P(TYPE) \
   ((TYPE) == R_X86_64_GOTPCREL \
    || (TYPE) == R_X86_64_GOTPCRELX \
-   || (TYPE) == R_X86_64_REX_GOTPCRELX)
+   || (TYPE) == R_X86_64_REX_GOTPCRELX \
+   || (TYPE) == R_X86_64_GOT32 \
+   || (TYPE) == R_X86_64_GOT64 \
+   || (TYPE) == R_X86_64_GOTPCREL64 \
+   || (TYPE) == R_X86_64_GOTPLT64)
 #define I386_GOT_TYPE_P(TYPE) \
   ((TYPE) == R_386_GOT32 || (TYPE) == R_386_GOT32X)
 #define X86_GOT_TYPE_P(IS_X86_64, TYPE) \