From 4df4cd4e921fd091efe98c7708df54f91a39eb25 Mon Sep 17 00:00:00 2001 From: joerg Date: Tue, 18 Jul 2017 18:02:37 +0000 Subject: [PATCH] Fix encoding of LSDA entries. .eh_frame references in non-PIC mode can use plain pointers. For PIC, any references to global objects must be indirect, but the .eh_frame entries themselve should be pcrel. --- external/gpl3/gcc/dist/gcc/config/arm/arm.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/external/gpl3/gcc/dist/gcc/config/arm/arm.h b/external/gpl3/gcc/dist/gcc/config/arm/arm.h index a5223e43fea0..7ce4399144f9 100644 --- a/external/gpl3/gcc/dist/gcc/config/arm/arm.h +++ b/external/gpl3/gcc/dist/gcc/config/arm/arm.h @@ -964,10 +964,8 @@ extern int arm_arch_crc; /* DWARF unwinding uses the normal indirect/pcrel vs absptr format for 32bit platforms. */ #define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) \ - ((flag_pic \ - && ((GLOBAL) || (CODE))) \ - ? ((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4 \ - : DW_EH_PE_absptr) + (flag_pic ? (((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4) \ + : DW_EH_PE_absptr) #else /* ttype entries (the only interesting data references used) use TARGET2 relocations. */