Skip to content

Commit bc359ff

Browse files
committed
objtool: Rename elf_read() to elf_open_read()
'struct elf *' handling is an open/close paradigm, make sure the naming matches that: elf_open_read() elf_write() elf_close() Acked-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Sami Tolvanen <samitolvanen@google.com> Cc: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20200422103205.61900-3-mingo@kernel.org
1 parent 894e48c commit bc359ff

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎tools/objtool/check.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2614,7 +2614,7 @@ int check(const char *_objname, bool orc)
26142614

26152615
objname = _objname;
26162616

2617-
file.elf = elf_read(objname, orc ? O_RDWR : O_RDONLY);
2617+
file.elf = elf_open_read(objname, orc ? O_RDWR : O_RDONLY);
26182618
if (!file.elf)
26192619
return 1;
26202620

‎tools/objtool/elf.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ static int read_relas(struct elf *elf)
542542
return 0;
543543
}
544544

545-
struct elf *elf_read(const char *name, int flags)
545+
struct elf *elf_open_read(const char *name, int flags)
546546
{
547547
struct elf *elf;
548548
Elf_Cmd cmd;

‎tools/objtool/elf.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ static inline u32 rela_hash(struct rela *rela)
113113
return sec_offset_hash(rela->sec, rela->offset);
114114
}
115115

116-
struct elf *elf_read(const char *name, int flags);
116+
struct elf *elf_open_read(const char *name, int flags);
117117
struct section *elf_create_section(struct elf *elf, const char *name, size_t entsize, int nr);
118118
struct section *elf_create_rela_section(struct elf *elf, struct section *base);
119119
void elf_add_rela(struct elf *elf, struct rela *rela);

0 commit comments

Comments
 (0)