core/elf: explicit return type on lambda function

This isn't mandatory but increase code readability.  Nadav writes:

  I can verify that this indeed clears the last false error message that
  eclipse sees in all OSv files. Amazing.  I think we should commit this
  patch.

Signed-off-by: Eduardo Piva <efpiva@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>