Rename add_elf_sym to set_elf_sym
add_elf_sym is a confusing name because it is not clear what the function does compared to put_elf_sym. As a matter of fact, put_elf_sym also adds a symbol in a symbol table. Besides, "add_elf_sym" fails to convey that the function can be used to update a symbol (for instance its value). "set_elf_sym" seems like a more appropriate name: it will set a symbol to a given set of properties (value, size, etc.) and create a new one if non exist for that name as one would expect.
This commit is contained in:
2
tcc.h
2
tcc.h
@ -1339,7 +1339,7 @@ ST_FUNC void greloca(Section *s, Sym *sym, unsigned long offset, int type, addr_
|
||||
|
||||
ST_FUNC int put_elf_str(Section *s, const char *sym);
|
||||
ST_FUNC int put_elf_sym(Section *s, addr_t value, unsigned long size, int info, int other, int shndx, const char *name);
|
||||
ST_FUNC int add_elf_sym(Section *s, addr_t value, unsigned long size, int info, int other, int sh_num, const char *name);
|
||||
ST_FUNC int set_elf_sym(Section *s, addr_t value, unsigned long size, int info, int other, int shndx, const char *name);
|
||||
ST_FUNC int find_elf_sym(Section *s, const char *name);
|
||||
ST_FUNC void put_elf_reloc(Section *symtab, Section *s, unsigned long offset, int type, int symbol);
|
||||
ST_FUNC void put_elf_reloca(Section *symtab, Section *s, unsigned long offset, int type, int symbol, addr_t addend);
|
||||
|
||||
Reference in New Issue
Block a user