diff options
Diffstat (limited to 'tools/objtool/elf.c')
-rw-r--r-- | tools/objtool/elf.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/objtool/elf.c b/tools/objtool/elf.c index 500e92979a31..7598c0a2633d 100644 --- a/tools/objtool/elf.c +++ b/tools/objtool/elf.c @@ -1059,7 +1059,7 @@ static int elf_add_string(struct elf *elf, struct section *strtab, char *str) } struct section *elf_create_section(struct elf *elf, const char *name, - unsigned int sh_flags, size_t entsize, int nr) + size_t entsize, int nr) { struct section *sec, *shstrtab; size_t size = entsize * nr; @@ -1117,7 +1117,7 @@ struct section *elf_create_section(struct elf *elf, const char *name, sec->sh.sh_entsize = entsize; sec->sh.sh_type = SHT_PROGBITS; sec->sh.sh_addralign = 1; - sec->sh.sh_flags = SHF_ALLOC | sh_flags; + sec->sh.sh_flags = SHF_ALLOC; /* Add section name to .shstrtab (or .strtab for Clang) */ shstrtab = find_section_by_name(elf, ".shstrtab"); @@ -1153,7 +1153,7 @@ static struct section *elf_create_rel_reloc_section(struct elf *elf, struct sect strcpy(relocname, ".rel"); strcat(relocname, base->name); - sec = elf_create_section(elf, relocname, 0, sizeof(GElf_Rel), 0); + sec = elf_create_section(elf, relocname, sizeof(GElf_Rel), 0); free(relocname); if (!sec) return NULL; @@ -1185,9 +1185,9 @@ static struct section *elf_create_rela_reloc_section(struct elf *elf, struct sec strcat(relocname, base->name); if (addrsize == sizeof(u32)) - sec = elf_create_section(elf, relocname, 0, sizeof(Elf32_Rela), 0); + sec = elf_create_section(elf, relocname, sizeof(Elf32_Rela), 0); else - sec = elf_create_section(elf, relocname, 0, sizeof(GElf_Rela), 0); + sec = elf_create_section(elf, relocname, sizeof(GElf_Rela), 0); free(relocname); if (!sec) return NULL; |