mirror of
https://github.com/mikpe/pdp10-tools.git
synced 2026-01-23 19:08:00 +00:00
as: correct handling of ABS symbols
This commit is contained in:
parent
61cf333f58
commit
9d646d5fe8
@ -465,7 +465,7 @@ dot_byte(Location, Tunit, #s_dot_byte{} = Stmt0) ->
|
||||
|
||||
dot_file(_Location, Tunit, #s_dot_file{string = String}) ->
|
||||
Symbol = #symbol{ name = String
|
||||
, section = false
|
||||
, section = abs
|
||||
, st_value = 0
|
||||
, st_size = 0
|
||||
, st_info = ?ELF_ST_INFO(?STB_LOCAL, ?STT_FILE)
|
||||
|
||||
@ -136,9 +136,12 @@ process_symbol(Symbol, Context) ->
|
||||
#context{tunit = Tunit, strtab = StrTab} = Context,
|
||||
{StName, NewStrTab} = strtab_enter(StrTab, Name),
|
||||
StShndx =
|
||||
case tunit:get_section(Tunit, Section) of
|
||||
false -> ?SHN_ABS;
|
||||
#section{shndx = Shndx} -> Shndx % assigned in append_section/2 above
|
||||
case Section of
|
||||
false -> ?SHN_UNDEF;
|
||||
abs -> ?SHN_ABS;
|
||||
_ ->
|
||||
#section{shndx = Shndx} = tunit:get_section(Tunit, Section),
|
||||
Shndx % assigned in append_section/2 above
|
||||
end,
|
||||
NewSymbol = Symbol#symbol{st_name = StName, st_shndx = StShndx},
|
||||
NewTunit = tunit:put_symbol(Tunit, NewSymbol),
|
||||
|
||||
@ -149,7 +149,7 @@
|
||||
|
||||
-record(symbol,
|
||||
{ name :: string()
|
||||
, section :: false | string() % false if UNDEF or ABS
|
||||
, section :: false | abs | string()
|
||||
%% FIXME: should contain an #elf36_Sym{} here instead
|
||||
, st_value :: false | non_neg_integer()
|
||||
, st_size :: false | non_neg_integer()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user