diff options
author | Joe Lawrence <joe.lawrence@redhat.com> | 2021-08-23 01:50:37 +0300 |
---|---|---|
committer | Josh Poimboeuf <jpoimboe@redhat.com> | 2021-10-05 22:03:21 +0300 |
commit | fe255fe6ad97685e5a4be0d871f43288dbc10ad6 (patch) | |
tree | 42bb188b0a18749c5dfa7ac7eaa89dbfa0052daf /tools/objtool/special.c | |
parent | dc02368164bd0ec603e3f5b3dd8252744a667b8a (diff) | |
download | linux-fe255fe6ad97685e5a4be0d871f43288dbc10ad6.tar.xz |
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
Diffstat (limited to 'tools/objtool/special.c')
-rw-r--r-- | tools/objtool/special.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/objtool/special.c b/tools/objtool/special.c index 83d5f969bcb0..06c3eacab3d5 100644 --- a/tools/objtool/special.c +++ b/tools/objtool/special.c @@ -159,13 +159,13 @@ int special_get_alts(struct elf *elf, struct list_head *alts) if (!sec) continue; - if (sec->len % entry->size != 0) { + if (sec->sh.sh_size % entry->size != 0) { WARN("%s size not a multiple of %d", sec->name, entry->size); return -1; } - nr_entries = sec->len / entry->size; + nr_entries = sec->sh.sh_size / entry->size; for (idx = 0; idx < nr_entries; idx++) { alt = malloc(sizeof(*alt)); |