diff options
| author | Mark Wielaard <[email protected]> | 2019-03-07 12:05:25 +0100 |
|---|---|---|
| committer | Mark Wielaard <[email protected]> | 2019-03-07 12:05:25 +0100 |
| commit | 14030673602a4f331f348decd51e5f0160719f0e (patch) | |
| tree | db1e66a97a8133c34920699ccfeda56e2b01a965 /backends/riscv_init.c | |
| parent | b244a241a82c28f7fef33f37d82bc47631ceca4e (diff) | |
| parent | 1e52d4ce3aa2093d12901d32fe07aae70211fe2a (diff) | |
Merge tag 'elfutils-0.176' into mjw/RH-DTSdts-0.176
elfutils 0.176 release
Conflicts:
tests/run-readelf-mixed-corenote.sh: Remove riscv testcase.
Diffstat (limited to 'backends/riscv_init.c')
| -rw-r--r-- | backends/riscv_init.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/backends/riscv_init.c b/backends/riscv_init.c index 8b7ce8b5..3398c104 100644 --- a/backends/riscv_init.c +++ b/backends/riscv_init.c @@ -33,12 +33,18 @@ #define RELOC_PREFIX R_RISCV_ #include "libebl_CPU.h" +#include "libelfP.h" + /* This defines the common reloc hooks based on riscv_reloc.def. */ #include "common-reloc.c" +extern __typeof (EBLHOOK (return_value_location)) + riscv_return_value_location_lp64d attribute_hidden; + +extern __typeof (EBLHOOK (core_note)) riscv64_core_note attribute_hidden; const char * -riscv_init (Elf *elf __attribute__ ((unused)), +riscv_init (Elf *elf, GElf_Half machine __attribute__ ((unused)), Ebl *eh, size_t ehlen) @@ -58,7 +64,14 @@ riscv_init (Elf *elf __attribute__ ((unused)), HOOK (eh, check_special_symbol); HOOK (eh, machine_flag_check); HOOK (eh, set_initial_registers_tid); - HOOK (eh, core_note); + if (eh->class == ELFCLASS64) + eh->core_note = riscv64_core_note; + else + HOOK (eh, core_note); + if (eh->class == ELFCLASS64 + && ((elf->state.elf64.ehdr->e_flags & EF_RISCV_FLOAT_ABI) + == EF_RISCV_FLOAT_ABI_DOUBLE)) + eh->return_value_location = riscv_return_value_location_lp64d; return MODVERSION; } |
