elf: inline lose for error handling
authorSzabolcs Nagy <szabolcs.nagy@arm.com>
Tue, 24 Nov 2020 11:08:33 +0000 (11:08 +0000)
committerSzabolcs Nagy <szabolcs.nagy@arm.com>
Tue, 15 Dec 2020 10:13:12 +0000 (10:13 +0000)
commitcb5648b00f1f6f883d0d1691abc0d2fad2fcafd7
treea1f85665bfbbb67a6a686090a0a5d1ce71f4a2a3
parente182654151a0f6ebbe628c8f2f6b041c69adbac1
elf: inline lose for error handling

_dl_map_object_from_fd has complex error handling with cleanups.
It was managed by a separate function to avoid code bloat at
every failure case, but since the code was changed to use gotos
there is no longer such code bloat from inlining.

Maintaining a separate error handling function is harder as it
needs to access local state which has to be passed down. And the
same lose function was used in open_verify which is error prone.

The goto labels are changed since there is no longer a call.
The new code generates slightly smaller binary.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
elf/dl-load.c