diff options
author | Mark Wielaard <[email protected]> | 2020-06-11 23:16:21 +0200 |
---|---|---|
committer | Mark Wielaard <[email protected]> | 2020-06-11 23:16:21 +0200 |
commit | 50a6eeef7d87623faa65126dc3d16c2a8e613aea (patch) | |
tree | 19a35135efaac56c49a30316c6572c7b4d6ec4aa /libebl | |
parent | 49f13584d60322578c19b6118393ab04236ca7bf (diff) | |
parent | a2bc0214a5615551d89cef8d160bdbaafd5f1a83 (diff) |
Merge tag 'elfutils-0.180' into mjw/RH-DTSdts-0.180
elfutils 0.180 release
Diffstat (limited to 'libebl')
-rw-r--r-- | libebl/ChangeLog | 24 | ||||
-rw-r--r-- | libebl/eblopenbackend.c | 22 | ||||
-rw-r--r-- | libebl/eblsegmenttypename.c | 2 | ||||
-rw-r--r-- | libebl/libeblP.h | 6 |
4 files changed, 42 insertions, 12 deletions
diff --git a/libebl/ChangeLog b/libebl/ChangeLog index 4da7eeeb..fa6dd037 100644 --- a/libebl/ChangeLog +++ b/libebl/ChangeLog @@ -1,3 +1,27 @@ +2020-06-10 Mark Wielaard <[email protected]> + + * eblopenbackend.c (i386_init, sh_init, x86_64_init, ia64_init, + alpha_init, arm_init, aarch64_init, sparc_init, ppc_init, + ppc64_init, s390_init, tilegx_init, m68k_init, bpf_init, + riscv_init, csky_init): Adjust signature. + (openbackend): Call init without sizeof(Ebl). + * libeblP.h (ebl_bhinit_t): Adjust signature. + +2020-06-04 Mark Wielaard <[email protected]> + + * eblsegmenttypename.c (ebl_segment_type_name): Remove + PT_GNU_PROPERTY define. + +2020-04-17 Mark Wielaard <[email protected]> + + * eblopenbackend.c (default_debugscn_p): Handle .gnu.debuglto_ + prefix. + +2020-02-08 Mark Wielaard <[email protected]> + + * eblsegmenttypename.c (ebl_segment_type_name): Handle + PT_GNU_PROPERTY. + 2019-08-29 Mark Wielaard <[email protected]> * Makefile.am (noinst_LIBRARIES): Add libebl.a. diff --git a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c index db000632..6ce6c26f 100644 --- a/libebl/eblopenbackend.c +++ b/libebl/eblopenbackend.c @@ -41,14 +41,14 @@ #include <system.h> #include <libeblP.h> -const char *i386_init (Elf *, GElf_Half, Ebl *eh, size_t ehlen); -const char *x86_64_init (Elf *, GElf_Half, Ebl *eh, size_t ehlen); -const char *ppc_init (Elf *, GElf_Half, Ebl *eh, size_t ehlen); -const char *ppc64_init (Elf *, GElf_Half, Ebl *eh, size_t ehlen); -const char *ia64_init (Elf *, GElf_Half, Ebl *eh, size_t ehlen); -const char *s390_init (Elf *, GElf_Half, Ebl *eh, size_t ehlen); -const char *aarch64_init (Elf *, GElf_Half, Ebl *eh, size_t ehlen); -const char *bpf_init (Elf *, GElf_Half, Ebl *eh, size_t ehlen); +Ebl *i386_init (Elf *, GElf_Half, Ebl *); +Ebl *x86_64_init (Elf *, GElf_Half, Ebl *); +Ebl *ia64_init (Elf *, GElf_Half, Ebl *); +Ebl *aarch64_init (Elf *, GElf_Half, Ebl *); +Ebl *ppc_init (Elf *, GElf_Half, Ebl *); +Ebl *ppc64_init (Elf *, GElf_Half, Ebl *); +Ebl *s390_init (Elf *, GElf_Half, Ebl *); +Ebl *bpf_init (Elf *, GElf_Half, Ebl *); /* This table should contain the complete list of architectures as far as the ELF specification is concerned. */ @@ -322,7 +322,7 @@ openbackend (Elf *elf, const char *emulation, GElf_Half machine) } if (machines[cnt].init && - machines[cnt].init (elf, machine, result, sizeof(Ebl))) + machines[cnt].init (elf, machine, result)) { result->elf = elf; /* A few entries are mandatory. */ @@ -613,7 +613,9 @@ default_debugscn_p (const char *name) for (size_t cnt = 0; cnt < ndwarf_scn_names; ++cnt) if (strcmp (name, dwarf_scn_names[cnt]) == 0 || (strncmp (name, ".zdebug", strlen (".zdebug")) == 0 - && strcmp (&name[2], &dwarf_scn_names[cnt][1]) == 0)) + && strcmp (&name[2], &dwarf_scn_names[cnt][1]) == 0) + || (strncmp (name, ".gnu.debuglto_", strlen (".gnu.debuglto_")) == 0 + && strcmp (&name[14], dwarf_scn_names[cnt]) == 0)) return true; return false; diff --git a/libebl/eblsegmenttypename.c b/libebl/eblsegmenttypename.c index 14eda76e..23a85482 100644 --- a/libebl/eblsegmenttypename.c +++ b/libebl/eblsegmenttypename.c @@ -65,6 +65,8 @@ ebl_segment_type_name (Ebl *ebl, int segment, char *buf, size_t len) res = "GNU_STACK"; else if (segment == PT_GNU_RELRO) res = "GNU_RELRO"; + else if (segment == PT_GNU_PROPERTY) + res = "GNU_PROPERTY"; else if (segment == PT_SUNWBSS) res = "SUNWBSS"; else if (segment == PT_SUNWSTACK) diff --git a/libebl/libeblP.h b/libebl/libeblP.h index fd0fcc98..599f6378 100644 --- a/libebl/libeblP.h +++ b/libebl/libeblP.h @@ -80,8 +80,10 @@ struct ebl }; -/* Type of the initialization functions in the backend modules. */ -typedef const char *(*ebl_bhinit_t) (Elf *, GElf_Half, Ebl *, size_t); +/* Type of the initialization functions in the backend modules. + The init function returns the given Ebl * or NULL if it couldn't + initialize for the given Elf or machine. */ +typedef Ebl *(*ebl_bhinit_t) (Elf *, GElf_Half, Ebl *); /* gettext helper macros. */ |