mirror of
https://github.com/intel/llvm.git
synced 2026-01-16 21:55:39 +08:00
[ELF] Pass Ctx & to Defined & CommonSymbol
This commit is contained in:
@@ -227,8 +227,8 @@ void LinkerScript::addSymbol(SymbolAssignment *cmd) {
|
||||
// write expressions like this: `alignment = 16; . = ALIGN(., alignment)`.
|
||||
uint64_t symValue = value.sec ? 0 : value.getValue();
|
||||
|
||||
Defined newSym(createInternalFile(ctx, cmd->location), cmd->name, STB_GLOBAL,
|
||||
visibility, value.type, symValue, 0, sec);
|
||||
Defined newSym(ctx, createInternalFile(ctx, cmd->location), cmd->name,
|
||||
STB_GLOBAL, visibility, value.type, symValue, 0, sec);
|
||||
|
||||
Symbol *sym = ctx.symtab->insert(cmd->name);
|
||||
sym->mergeProperties(newSym);
|
||||
@@ -244,7 +244,7 @@ void LinkerScript::declareSymbol(SymbolAssignment *cmd) {
|
||||
return;
|
||||
|
||||
uint8_t visibility = cmd->hidden ? STV_HIDDEN : STV_DEFAULT;
|
||||
Defined newSym(ctx.internalFile, cmd->name, STB_GLOBAL, visibility,
|
||||
Defined newSym(ctx, ctx.internalFile, cmd->name, STB_GLOBAL, visibility,
|
||||
STT_NOTYPE, 0, 0, nullptr);
|
||||
|
||||
// If the symbol is already defined, its order is 0 (with absence indicating
|
||||
|
||||
Reference in New Issue
Block a user