1
1
mirror of https://github.com/rui314/mold.git synced 2024-10-04 16:48:04 +03:00

[elf] Rename write_symtab to export_to_symtab.

write_symtab feels like we're writing to the input file, which isn't the
case. export_to_symtab conveys the meaning clearer.

Signed-off-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
This commit is contained in:
Tatsuyuki Ishi 2022-07-30 21:19:31 +09:00
parent 536e0e7dca
commit b83cb924a5
3 changed files with 6 additions and 6 deletions

View File

@ -1247,7 +1247,7 @@ void ObjectFile<E>::compute_symtab(Context<E> &ctx) {
}
template <typename E>
void ObjectFile<E>::write_symtab(Context<E> &ctx) {
void ObjectFile<E>::export_to_symtab(Context<E> &ctx) {
ElfSym<E> *symtab_base = (ElfSym<E> *)(ctx.buf + ctx.symtab->shdr.sh_offset);
u8 *strtab_base = ctx.buf + ctx.strtab->shdr.sh_offset;
@ -1493,7 +1493,7 @@ void SharedFile<E>::compute_symtab(Context<E> &ctx) {
}
template <typename E>
void SharedFile<E>::write_symtab(Context<E> &ctx) {
void SharedFile<E>::export_to_symtab(Context<E> &ctx) {
ElfSym<E> *symtab =
(ElfSym<E> *)(ctx.buf + ctx.symtab->shdr.sh_offset) + this->global_symtab_idx;

View File

@ -1116,7 +1116,7 @@ public:
void scan_relocations(Context<E> &ctx);
void convert_common_symbols(Context<E> &ctx);
void compute_symtab(Context<E> &ctx);
void write_symtab(Context<E> &ctx);
void export_to_symtab(Context<E> &ctx);
i64 get_shndx(const ElfSym<E> &esym);
InputSection<E> *get_section(const ElfSym<E> &esym);
@ -1198,7 +1198,7 @@ public:
std::function<void(InputFile<E> *)> feeder) override;
void compute_symtab(Context<E> &ctx);
void write_symtab(Context<E> &ctx);
void export_to_symtab(Context<E> &ctx);
bool is_needed = false;
std::string soname;

View File

@ -570,11 +570,11 @@ void SymtabSection<E>::copy_buf(Context<E> &ctx) {
// Copy symbols and symbol names from input files
tbb::parallel_for_each(ctx.objs, [&](ObjectFile<E> *file) {
file->write_symtab(ctx);
file->export_to_symtab(ctx);
});
tbb::parallel_for_each(ctx.dsos, [&](SharedFile<E> *file) {
file->write_symtab(ctx);
file->export_to_symtab(ctx);
});
}