objtool: Remove redundant .rodata section name comparison

If the prefix of section name is not '.rodata', the following
function call can never return 0.

    strcmp(sec->name, C_JUMP_TABLE_SECTION)

So the name comparison is pointless, just remove it.

Signed-off-by: Muchun Song <songmuchun@bytedance.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
Muchun Song 2020-04-12 22:44:05 +08:00 коммит произвёл Ingo Molnar
Родитель e378fa17d3
Коммит 1ee444700e
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -1354,8 +1354,8 @@ static void mark_rodata(struct objtool_file *file)
* .rodata.str1.* sections are ignored; they don't contain jump tables. * .rodata.str1.* sections are ignored; they don't contain jump tables.
*/ */
for_each_sec(file, sec) { for_each_sec(file, sec) {
if ((!strncmp(sec->name, ".rodata", 7) && !strstr(sec->name, ".str1.")) || if (!strncmp(sec->name, ".rodata", 7) &&
!strcmp(sec->name, C_JUMP_TABLE_SECTION)) { !strstr(sec->name, ".str1.")) {
sec->rodata = true; sec->rodata = true;
found = true; found = true;
} }