diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-01-09 13:57:31 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-01-09 13:57:31 +0100 |
commit | bc774f62436c4fe5082f0a70c6620fa0fdf823a9 (patch) | |
tree | 07963f45b2cdaccf12281712e2eef179dbce1fee /backends | |
parent | 5da108a40dd24c7d3e4183ec9ae1904bb3f01575 (diff) | |
parent | 4ea9a2db164caadf836a65d5cdffb09a2d5a37ce (diff) |
Merge tag 'elfutils-0.175'
elfutils 0.175 release
Change-Id: I409f41767af349d0521351dd733879ad31c65aab
Diffstat (limited to 'backends')
-rw-r--r-- | backends/ChangeLog | 30 | ||||
-rw-r--r-- | backends/aarch64_symbol.c | 3 | ||||
-rw-r--r-- | backends/alpha_symbol.c | 3 | ||||
-rw-r--r-- | backends/arm_symbol.c | 3 | ||||
-rw-r--r-- | backends/bpf_symbol.c | 3 | ||||
-rw-r--r-- | backends/i386_symbol.c | 3 | ||||
-rw-r--r-- | backends/ia64_symbol.c | 3 | ||||
-rw-r--r-- | backends/m68k_symbol.c | 3 | ||||
-rw-r--r-- | backends/ppc64_symbol.c | 3 | ||||
-rw-r--r-- | backends/ppc_initreg.c | 8 | ||||
-rw-r--r-- | backends/ppc_symbol.c | 3 | ||||
-rw-r--r-- | backends/riscv_symbol.c | 26 | ||||
-rw-r--r-- | backends/s390_symbol.c | 3 | ||||
-rw-r--r-- | backends/sh_symbol.c | 3 | ||||
-rw-r--r-- | backends/sparc_symbol.c | 3 | ||||
-rw-r--r-- | backends/tilegx_symbol.c | 3 | ||||
-rw-r--r-- | backends/x86_64_init.c | 3 | ||||
-rw-r--r-- | backends/x86_64_symbol.c | 17 |
18 files changed, 102 insertions, 21 deletions
diff --git a/backends/ChangeLog b/backends/ChangeLog index 3e0dd266..245553cb 100644 --- a/backends/ChangeLog +++ b/backends/ChangeLog @@ -13,6 +13,36 @@ * Makefile.am: Link backends against libgnu.a if requested. +2018-11-06 Mark Wielaard <mark@klomp.org> + + * x86_64_symbol.c (x86_64_section_type_name): New function. + * x86_64_init.c (x86_64_int): Hook section_type_name. + +2018-10-20 Mark Wielaard <mark@klomp.org> + + * ppc_initreg.c (ppc_set_initial_registers_tid): Use define instead of + const for size of dwarf_regs array. + +2018-10-02 Andreas Schwab <schwab@suse.de> + + * riscv_symbol.c (riscv_reloc_simple_type): Add parameter addsub. + Set it for ADD and SUB relocations. + * aarch64_symbol.c (aarch64_reloc_simple_type): Add and ignore + third parameter. + * alpha_symbol.c (alpha_reloc_simple_type): Likewise. + * arm_symbol.c (arm_reloc_simple_type): Likewise. + * bpf_symbol.c (bpf_reloc_simple_type): Likewise. + * i386_symbol.c (i386_reloc_simple_type): Likewise. + * ia64_symbol.c (ia64_reloc_simple_type): Likewise. + * m68k_symbol.c (m68k_reloc_simple_type): Likewise. + * ppc64_symbol.c (ppc64_reloc_simple_type): Likewise. + * ppc_symbol.c (ppc_reloc_simple_type): Likewise. + * s390_symbol.c (s390_reloc_simple_type): Likewise. + * sh_symbol.c (sh_reloc_simple_type): Likewise. + * sparc_symbol.c (sparc_reloc_simple_type): Likewise. + * tilegx_symbol.c (tilegx_reloc_simple_type): Likewise. + * x86_64_symbol.c (x86_64_reloc_simple_type): Likewise. + 2018-09-12 Mark Wielaard <mark@klomp.org> * ppc64_init.c (ppc64_init): Use elf_getshdrstrndx. diff --git a/backends/aarch64_symbol.c b/backends/aarch64_symbol.c index dfd755a5..e30c409d 100644 --- a/backends/aarch64_symbol.c +++ b/backends/aarch64_symbol.c @@ -40,7 +40,8 @@ /* Check for the simple reloc types. */ Elf_Type -aarch64_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type) +aarch64_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type, + int *addsub __attribute__ ((unused))) { switch (type) { diff --git a/backends/alpha_symbol.c b/backends/alpha_symbol.c index b7f7c17a..53a9e7b7 100644 --- a/backends/alpha_symbol.c +++ b/backends/alpha_symbol.c @@ -61,7 +61,8 @@ alpha_dynamic_tag_check (int64_t tag) /* Check for the simple reloc types. */ Elf_Type -alpha_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type) +alpha_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type, + int *addsub __attribute__ ((unused))) { switch (type) { diff --git a/backends/arm_symbol.c b/backends/arm_symbol.c index 3edda724..c8e1d7f9 100644 --- a/backends/arm_symbol.c +++ b/backends/arm_symbol.c @@ -109,7 +109,8 @@ arm_machine_flag_check (GElf_Word flags) /* Check for the simple reloc types. */ Elf_Type -arm_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type) +arm_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type, + int *addsub __attribute__ ((unused))) { switch (type) { diff --git a/backends/bpf_symbol.c b/backends/bpf_symbol.c index c9856f26..85c948ab 100644 --- a/backends/bpf_symbol.c +++ b/backends/bpf_symbol.c @@ -40,7 +40,8 @@ /* Check for the simple reloc types. */ Elf_Type -bpf_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type) +bpf_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type, + int *addsub __attribute__ ((unused))) { switch (type) { diff --git a/backends/i386_symbol.c b/backends/i386_symbol.c index 7dbf899f..a4b6ec08 100644 --- a/backends/i386_symbol.c +++ b/backends/i386_symbol.c @@ -49,7 +49,8 @@ i386_gotpc_reloc_check (Elf *elf __attribute__ ((unused)), int type) /* Check for the simple reloc types. */ Elf_Type -i386_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type) +i386_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type, + int *addsub __attribute__ ((unused))) { switch (type) { diff --git a/backends/ia64_symbol.c b/backends/ia64_symbol.c index f928b0b7..0c038f0d 100644 --- a/backends/ia64_symbol.c +++ b/backends/ia64_symbol.c @@ -115,7 +115,8 @@ ia64_section_type_name (int type, /* Check for the simple reloc types. */ Elf_Type -ia64_reloc_simple_type (Ebl *ebl, int type) +ia64_reloc_simple_type (Ebl *ebl, int type, + int *addsub __attribute__ ((unused))) { switch (type) { diff --git a/backends/m68k_symbol.c b/backends/m68k_symbol.c index 269d12e5..9551cdfe 100644 --- a/backends/m68k_symbol.c +++ b/backends/m68k_symbol.c @@ -54,7 +54,8 @@ m68k_gotpc_reloc_check (Elf *elf __attribute__ ((unused)), int type) /* Check for the simple reloc types. */ Elf_Type -m68k_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type) +m68k_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type, + int *addsub __attribute__ ((unused))) { switch (type) { diff --git a/backends/ppc64_symbol.c b/backends/ppc64_symbol.c index 40ba4f74..81b94cfd 100644 --- a/backends/ppc64_symbol.c +++ b/backends/ppc64_symbol.c @@ -42,7 +42,8 @@ /* Check for the simple reloc types. */ Elf_Type -ppc64_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type) +ppc64_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type, + int *addsub __attribute__ ((unused))) { switch (type) { diff --git a/backends/ppc_initreg.c b/backends/ppc_initreg.c index 3e4432f6..0e0d3599 100644 --- a/backends/ppc_initreg.c +++ b/backends/ppc_initreg.c @@ -93,11 +93,11 @@ ppc_set_initial_registers_tid (pid_t tid __attribute__ ((unused)), if (errno != 0) return false; } - const size_t gprs = sizeof (user_regs.r.gpr) / sizeof (*user_regs.r.gpr); - Dwarf_Word dwarf_regs[gprs]; - for (unsigned gpr = 0; gpr < gprs; gpr++) +#define GPRS (sizeof (user_regs.r.gpr) / sizeof (*user_regs.r.gpr)) + Dwarf_Word dwarf_regs[GPRS]; + for (unsigned gpr = 0; gpr < GPRS; gpr++) dwarf_regs[gpr] = user_regs.r.gpr[gpr]; - if (! setfunc (0, gprs, dwarf_regs, arg)) + if (! setfunc (0, GPRS, dwarf_regs, arg)) return false; dwarf_regs[0] = user_regs.r.link; // LR uses both 65 and 108 numbers, there is no consistency for it. diff --git a/backends/ppc_symbol.c b/backends/ppc_symbol.c index 35b14319..5a169d54 100644 --- a/backends/ppc_symbol.c +++ b/backends/ppc_symbol.c @@ -42,7 +42,8 @@ /* Check for the simple reloc types. */ Elf_Type -ppc_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type) +ppc_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type, + int *addsub __attribute__ ((unused))) { switch (type) { diff --git a/backends/riscv_symbol.c b/backends/riscv_symbol.c index 866a2d7a..c34b7702 100644 --- a/backends/riscv_symbol.c +++ b/backends/riscv_symbol.c @@ -40,14 +40,38 @@ /* Check for the simple reloc types. */ Elf_Type -riscv_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type) +riscv_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type, + int *addsub) { switch (type) { + case R_RISCV_SET8: + return ELF_T_BYTE; + case R_RISCV_SET16: + return ELF_T_HALF; case R_RISCV_32: + case R_RISCV_SET32: return ELF_T_WORD; case R_RISCV_64: return ELF_T_XWORD; + case R_RISCV_ADD16: + *addsub = 1; + return ELF_T_HALF; + case R_RISCV_SUB16: + *addsub = -1; + return ELF_T_HALF; + case R_RISCV_ADD32: + *addsub = 1; + return ELF_T_WORD; + case R_RISCV_SUB32: + *addsub = -1; + return ELF_T_WORD; + case R_RISCV_ADD64: + *addsub = 1; + return ELF_T_XWORD; + case R_RISCV_SUB64: + *addsub = -1; + return ELF_T_XWORD; default: return ELF_T_NUM; } diff --git a/backends/s390_symbol.c b/backends/s390_symbol.c index a0a4fafa..f91e1373 100644 --- a/backends/s390_symbol.c +++ b/backends/s390_symbol.c @@ -38,7 +38,8 @@ /* Check for the simple reloc types. */ Elf_Type -s390_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type) +s390_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type, + int *addsub __attribute__ ((unused))) { switch (type) { diff --git a/backends/sh_symbol.c b/backends/sh_symbol.c index 8101e96f..2761d92c 100644 --- a/backends/sh_symbol.c +++ b/backends/sh_symbol.c @@ -47,7 +47,8 @@ sh_gotpc_reloc_check (Elf *elf __attribute__ ((unused)), int type) /* Check for the simple reloc types. */ Elf_Type -sh_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type) +sh_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type, + int *addsub __attribute__ ((unused))) { switch (type) { diff --git a/backends/sparc_symbol.c b/backends/sparc_symbol.c index ec11dc97..e8ee3911 100644 --- a/backends/sparc_symbol.c +++ b/backends/sparc_symbol.c @@ -39,7 +39,8 @@ /* Check for the simple reloc types. */ Elf_Type -sparc_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type) +sparc_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type, + int *addsub __attribute__ ((unused))) { switch (type) { diff --git a/backends/tilegx_symbol.c b/backends/tilegx_symbol.c index b6533266..62a46907 100644 --- a/backends/tilegx_symbol.c +++ b/backends/tilegx_symbol.c @@ -39,7 +39,8 @@ /* Check for the simple reloc types. */ Elf_Type -tilegx_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type) +tilegx_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type, + int *addsub __attribute__ ((unused))) { switch (type) { diff --git a/backends/x86_64_init.c b/backends/x86_64_init.c index adfa4791..49f6c6c7 100644 --- a/backends/x86_64_init.c +++ b/backends/x86_64_init.c @@ -1,5 +1,5 @@ /* Initialization of x86-64 specific backend library. - Copyright (C) 2002-2009, 2013 Red Hat, Inc. + Copyright (C) 2002-2009, 2013, 2018 Red Hat, Inc. Copyright (C) H.J. Lu <hjl.tools@gmail.com>, 2015. This file is part of elfutils. Written by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -55,6 +55,7 @@ x86_64_init (Elf *elf __attribute__ ((unused)), eh->name = "AMD x86-64"; x86_64_init_reloc (eh); HOOK (eh, reloc_simple_type); + HOOK (eh, section_type_name); if (eh->class == ELFCLASS32) eh->core_note = x32_core_note; else diff --git a/backends/x86_64_symbol.c b/backends/x86_64_symbol.c index 1622461d..98457bcb 100644 --- a/backends/x86_64_symbol.c +++ b/backends/x86_64_symbol.c @@ -1,5 +1,5 @@ /* x86_64 specific symbolic name handling. - Copyright (C) 2002, 2005 Red Hat, Inc. + Copyright (C) 2002, 2005, 2018 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -40,7 +40,8 @@ /* Check for the simple reloc types. */ Elf_Type -x86_64_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type) +x86_64_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type, + int *addsub __attribute__ ((unused))) { switch (type) { @@ -58,3 +59,15 @@ x86_64_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type) return ELF_T_NUM; } } + +/* Return symbolic representation of section type. */ +const char * +x86_64_section_type_name (int type, + char *buf __attribute__ ((unused)), + size_t len __attribute__ ((unused))) +{ + if (type == SHT_X86_64_UNWIND) + return "X86_64_UNWIND"; + + return NULL; +} |