]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[PATCH] c6x: Fix EHTYPE relocations
authorRichard Braun <rbraun@sceen.net>
Fri, 18 Apr 2025 15:26:59 +0000 (09:26 -0600)
committerJeff Law <jlaw@ventanamicro.com>
Fri, 18 Apr 2025 15:27:59 +0000 (09:27 -0600)
R_C6000_EHTYPE relocations are implemented as GOT-indirect relocations,
but, as specified by the C6000 EABI (SPRAB89A), 13.5.1 Relocation Types,
they are a special case of SBR (static base relocation).

gcc/
* config/c6x/c6x.h (ASM_PREFERRED_EH_DATA_FORMAT): Remove the
DW_EH_PE_indirect flag.

gcc/config/c6x/c6x.h

index e7da250f966999441d75cd9d7e202785891fe3db..50bad2772370f7491b35a377a9da5e6640758b83 100644 (file)
@@ -444,11 +444,9 @@ struct GTY(()) machine_function
 #define TARG_VEC_PERMUTE_COST        1
 #endif
 
-/* ttype entries (the only interesting data references used) are
-   sb-relative got-indirect (aka .ehtype).  */
+/* .ehtype ttype entries are sb-relative.  */
 #define ASM_PREFERRED_EH_DATA_FORMAT(code, data) \
-  (((code) == 0 && (data) == 1) ? (DW_EH_PE_datarel | DW_EH_PE_indirect) \
-                               : DW_EH_PE_absptr)
+  (((code) == 0 && (data) == 1) ? DW_EH_PE_datarel : DW_EH_PE_absptr)
 
 /* This should be the same as the definition in elfos.h, plus the call
    to output special unwinding directives.  */