mirror of
https://github.com/mikpe/pdp10-tools.git
synced 2026-01-13 15:27:35 +00:00
as: use SHN_ABS for section-less symbols in output stage, unbreaks .file
This commit is contained in:
parent
9854ccfbf3
commit
5c14e1a861
@ -233,13 +233,19 @@ static int finalize_symbol(struct hashnode *hashnode, void *data)
|
||||
{
|
||||
struct symbol *symbol = (struct symbol*)hashnode;
|
||||
struct finalize_symbol_context *fsctx = data;
|
||||
Elf36_Word st_shndx;
|
||||
|
||||
fsctx->symtab[fsctx->i].st_name = symbol->st_name;
|
||||
fsctx->symtab[fsctx->i].st_value = symbol->st_value;
|
||||
fsctx->symtab[fsctx->i].st_size = symbol->st_size;
|
||||
fsctx->symtab[fsctx->i].st_info = symbol->st_info;
|
||||
fsctx->symtab[fsctx->i].st_other = STV_DEFAULT;
|
||||
fsctx->symtab[fsctx->i].st_shndx = symbol->section->st_shndx;
|
||||
|
||||
if (symbol->section)
|
||||
st_shndx = symbol->section->st_shndx;
|
||||
else
|
||||
st_shndx = SHN_ABS;
|
||||
fsctx->symtab[fsctx->i].st_shndx = st_shndx;
|
||||
|
||||
++fsctx->i;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user