objtool: Remove redundant 'len' field from struct section

The section structure already contains sh_size, so just remove the extra
'len' member that requires extra mirroring and potential confusion.

Suggested-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Link: https://lore.kernel.org/r/20210822225037.54620-3-joe.lawrence@redhat.com
Cc: Andy Lavr <andy.lavr@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: x86@kernel.org
Cc: linux-kernel@vger.kernel.org
This commit is contained in:
Joe Lawrence
2021-08-22 18:50:37 -04:00
committed by Josh Poimboeuf
parent dc02368164
commit fe255fe6ad
5 changed files with 17 additions and 20 deletions

View File

@ -204,7 +204,7 @@ int orc_create(struct objtool_file *file)
/* Add a section terminator */
if (!empty) {
orc_list_add(&orc_list, &null, sec, sec->len);
orc_list_add(&orc_list, &null, sec, sec->sh.sh_size);
nr++;
}
}