Commit 5acbe0f2 authored by Arjan Oortgiese's avatar Arjan Oortgiese

In a library not all the symbols are marked as GLOBAL. Read also the LOCAL symbols.

parent 1a9eef9f
......@@ -116,8 +116,7 @@ read_symbol_table symbol_n symbol_table_size string_table symbols exe_file
= read_symbol_table (symbol_n+1) symbol_table_size string_table symbols exe_file;
# object = i3 bitand 0xf;
bind = (i3>>4) bitand 0xf;
| (object==1 /*OBJECT*/ || object==2 /*FUNC*/ || object==0 /*NOTYPE*/) &&
bind==1 /* GLOBAL */
| (object==1 /*OBJECT*/ || object==2 /*FUNC*/ || object==0 /*NOTYPE*/) // bind==1 /* GLOBAL */
# symbol_name = string_from_string_table i0 string_table;
# symbols = [(symbol_name,i1):symbols];
= read_symbol_table (symbol_n+1) symbol_table_size string_table symbols exe_file;
......@@ -168,8 +167,8 @@ read_symbols file_name files
# (string_table,exe_file) = freads exe_file section_headers.string_table_size;
| size string_table<>section_headers.string_table_size
= abort "reading symbol table failed";
# section_n = section_headers.first_non_local_symbol;
# offset = section_headers.symbol_table_offset + (section_n<<4);
# section_n = 0;
# offset = section_headers.symbol_table_offset;
# (ok,exe_file) = fseek exe_file offset FSeekSet;
| not ok
= abort "fseek failed";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment