diff options
Diffstat (limited to 'libgcc')
-rw-r--r-- | libgcc/ChangeLog | 9 | ||||
-rw-r--r-- | libgcc/config.host | 3 | ||||
-rw-r--r-- | libgcc/config/nios2/elf-lib.h | 24 | ||||
-rw-r--r-- | libgcc/unwind-dw2-fde-dip.c | 2 |
4 files changed, 36 insertions, 2 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 20cb222..9ec9edf 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,12 @@ +2020-01-31 Sandra Loosemore <sandra@codesourcery.com> + + nios2: Support for GOT-relative DW_EH_PE_datarel encoding. + + * config.host [nios2-*-linux*] (tmake_file, tm_file): Adjust. + * config/nios2-elf-lib.h: New. + * unwind-dw2-fde-dip.c (_Unwind_IteratePhdrCallback): Use existing + code for finding GOT base for nios2. + 2020-01-27 Martin Liska <mliska@suse.cz> PR gcov-profile/93403 diff --git a/libgcc/config.host b/libgcc/config.host index 8f0ea90..4198dc8 100644 --- a/libgcc/config.host +++ b/libgcc/config.host @@ -1112,7 +1112,8 @@ nds32*-elf*) esac ;; nios2-*-linux*) - tmake_file="$tmake_file nios2/t-nios2 nios2/t-linux t-libgcc-pic t-slibgcc-libgcc" + tmake_file="$tmake_file nios2/t-nios2 nios2/t-linux t-libgcc-pic t-eh-dw2-dip t-slibgcc-libgcc" + tm_file="$tm_file nios2/elf-lib.h" md_unwind_header=nios2/linux-unwind.h ;; nios2-*-*) diff --git a/libgcc/config/nios2/elf-lib.h b/libgcc/config/nios2/elf-lib.h new file mode 100644 index 0000000..4d718d9 --- /dev/null +++ b/libgcc/config/nios2/elf-lib.h @@ -0,0 +1,24 @@ +/* Target macros for the Nios II port of GCC. + Copyright (C) 2015-2020 Free Software Foundation, Inc. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +<http://www.gnu.org/licenses/>. */ + +#define CRT_GET_RFIB_DATA(dbase) \ + ({ extern void *_gp_got; (dbase) = &_gp_got; }) diff --git a/libgcc/unwind-dw2-fde-dip.c b/libgcc/unwind-dw2-fde-dip.c index d3a09ce..6e50405 100644 --- a/libgcc/unwind-dw2-fde-dip.c +++ b/libgcc/unwind-dw2-fde-dip.c @@ -329,7 +329,7 @@ _Unwind_IteratePhdrCallback (struct dl_phdr_info *info, size_t size, void *ptr) return 1; #ifdef CRT_GET_RFIB_DATA -# ifdef __i386__ +# if defined __i386__ || defined __nios2__ data->dbase = NULL; if (p_dynamic) { |