diff options
author | Mark Wielaard <[email protected]> | 2020-06-10 20:55:58 +0200 |
---|---|---|
committer | Mark Wielaard <[email protected]> | 2020-06-10 21:01:33 +0200 |
commit | 27a388bdd21e6bc1a27f111b803b7903b8851606 (patch) | |
tree | 852936990905cc4a40a97e1fc1b2473f9b1ddadb /backends/tilegx_init.c | |
parent | 815fe154e78c715ed2f467e8d17fac17e4255753 (diff) |
libebl: Remove Ebl struct size check and MODVERSION string.
We used to do several sanity checks when the ebl backend libraries
were loaded to make sure there was no version mismatch. When initializing
the backend we passed the current Ebl struct size so the library could
check it supported the given Ebl struct and we checked that the init
method returned the correct build time module version string. Neither
are necessary now that the backends are builtin.
Remove both the struct size check and the MODVERSION string (which
wasn't actually checked anymore). Make the init function return the
given Ebl handle or NULL on error (no init function currently indicates
any error).
Signed-off-by: Mark Wielaard <[email protected]>
Diffstat (limited to 'backends/tilegx_init.c')
-rw-r--r-- | backends/tilegx_init.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/backends/tilegx_init.c b/backends/tilegx_init.c index 66df9318..0f79542a 100644 --- a/backends/tilegx_init.c +++ b/backends/tilegx_init.c @@ -37,16 +37,11 @@ /* This defines the common reloc hooks based on tilegx_reloc.def. */ #include "common-reloc.c" -const char * +Ebl * tilegx_init (Elf *elf __attribute__ ((unused)), GElf_Half machine __attribute__ ((unused)), - Ebl *eh, - size_t ehlen) + Ebl *eh) { - /* Check whether the Elf_BH object has a sufficent size. */ - if (ehlen < sizeof (Ebl)) - return NULL; - /* We handle it. */ tilegx_init_reloc (eh); HOOK (eh, reloc_simple_type); @@ -54,5 +49,5 @@ tilegx_init (Elf *elf __attribute__ ((unused)), HOOK (eh, register_info); HOOK (eh, core_note); - return MODVERSION; + return eh; } |