From baf6ad5dad55a7aa1e75d4ccadc05347b4506a1f Mon Sep 17 00:00:00 2001 From: Richard Braun Date: Fri, 18 Apr 2025 09:26:59 -0600 Subject: [PATCH] [PATCH] c6x: Fix EHTYPE relocations 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 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gcc/config/c6x/c6x.h b/gcc/config/c6x/c6x.h index e7da250f9669..50bad2772370 100644 --- a/gcc/config/c6x/c6x.h +++ b/gcc/config/c6x/c6x.h @@ -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. */ -- 2.47.2