]> git.dujemihanovic.xyz Git - u-boot.git/commit
tools: relocate-rela: Extract elf64 reloc to special function
authorMichal Simek <michal.simek@amd.com>
Fri, 24 Jun 2022 12:15:00 +0000 (14:15 +0200)
committerMichal Simek <michal.simek@amd.com>
Fri, 24 Jun 2022 12:15:00 +0000 (14:15 +0200)
commit582ffb5cb3784ec8f4981d464a11f043d1d63846
tree56b8bd29a26d7598e4bd2e3f2af5a1d48f81c05b
parent07c052be51d26264a865ae3634964beddca1e1f1
tools: relocate-rela: Extract elf64 reloc to special function

Adding support for new type requires to change code layout that's why move
elf64 code to own function for easier maintenance.

It also solves the problem with not calling fclose in case of error.
Return value from rela_elf64 is saved to variable that's why fclose() is
called all the time.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/21763b80527521c85ca7d4ac64ad6ff4885409c8.1655299267.git.michal.simek@amd.com
tools/relocate-rela.c