symbol-table

Hook and Replace Export Function in the Loaded ELF ( .so shared library )

泪湿孤枕 提交于 2020-01-04 04:39:04
问题 I'm writing some C code to hook some function of .so ELF (shared-library) loaded into memory. My C code should be able to re-direct an export function of another .so library that was loaded into the app/program's memory. Here's a bit of elaboration: Android app will have multiple .so files loaded. My C code has to look through export function that belongs to another shared .so library (called target.so in this case) This is not a regular dlsym approach because I don't just want address of a

How to manage semantic rule of declaration of variable in bison

廉价感情. 提交于 2019-12-24 19:02:07
问题 I have to build a compiler that translates the java language into pyhton. I'm using the Flex and Bison tools. I created the flex file and I defined the syntactic grammar in Bison for some restrictions that I have to implement (such as array, management of cycles, management of a class, management of logical-arithmetic operators, etc.). I'm having trouble understanding how to handle semantic rules. For example, I should handle the semantics for import statement and variable declaration, add

How do I access a constant in Perl whose name is contained in a variable?

谁说胖子不能爱 提交于 2019-12-23 12:26:52
问题 I have a set of constants declared in Perl: use constant C1 => 111; use constant C2 => 222; .. use constant C9 => 999; my $which_constant = "C2"; How do I construct a Perl expression which, based on $which_constant , derives the value of a constant named with the value of this variable - e.g. "222". Please note that I can not change any of the conditions above - they are a simplification of a real scenario: I have a module (which I have no control over) from which these constants are imported

A Symbol Table in C

可紊 提交于 2019-12-23 12:14:38
问题 I am currently developing a kind of static analysis tool that performs pattern matching. I am using Flex to generate lexical analyzer, and I wrote code to manage the symbol table. I am not very experienced with C , so I decided to implement the symbol table as a linear linked list. #include <stdlib.h> #include <stdio.h> #include <string.h> struct symtab { int id; char *name; int type; struct symtab *next; }; enum types { KEYWORD = 1, CONSTANT, IDENTIFIER, OPERATOR, DELIMITER, WHITESPACE };

Symbol-table: deleting entries

∥☆過路亽.° 提交于 2019-12-23 07:47:09
问题 Why do I get the values from "$n" and "$m" after deleting the respective symbol-table-entries? #!/usr/bin/env perl use warnings; use 5.012; package Foo; our $n = 10; our $m = 20; delete $Foo::{'n'}; delete $Foo::{'m'}; say $n; # 10 say $m; # 20 回答1: Because the symbol table is only used at compile time (or via symbolic reference). The glob that is the value of $Foo::{...} is referenced directly by the compiled code so the no-longer-present symbol table entry has no effect. 来源: https:/

Symbol Resolution and Dynamic Linking

左心房为你撑大大i 提交于 2019-12-21 18:33:12
问题 I have been reading about the relocation and symbol resolution process and I have a few questions on the same. So the whole process(of loading the exec) starts with exec(BA_OS) command. During exec(BA_OS) , the system retrieves a path name from the PT_INTERP segment and creates the initial process image from the interpreter file’s segments. That is, instead of using the original executable file’s segment images, the system composes a memory image for the interpreter. It then is the interpreter

symbol table and relocation table in object file

牧云@^-^@ 提交于 2019-12-20 10:44:27
问题 From what I understand, instructions and data in an object file all have addresses. First data item start at address 0 and first instruction also start at address 0. The relocation table contains information about instructions that need to be updated if the addresses in the file change, for example if the file is linked together with another. Line A, in the example below, would be in the relocation table. I don't think B would be in the relocation table, since the address of label "equal" is

Build symbol table from grammar [closed]

依然范特西╮ 提交于 2019-12-17 07:54:10
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago . I am trying to build a symbol table from my grammar (done with antlr) by using eclipse. However I don't know by what to begin. I think I read somewhere that you would need the parser and lexer generated by antlr to do that. Does someone know an easy example so that I can

gdb no symbol table loaded for core file

会有一股神秘感。 提交于 2019-12-14 00:33:14
问题 There was a core dump produced at the customer end for my application and while looking at the backtrace I don't have the symbols loaded... (gdb) where #0 0x000000364c032885 in ?? () #1 0x000000364c034065 in ?? () #2 0x0000000000000000 in ?? () (gdb) bt full #0 0x000000364c032885 in ?? () No symbol table info available. #1 0x000000364c034065 in ?? () No symbol table info available. #2 0x0000000000000000 in ?? () No symbol table info available. One think I want to mention in here is that the

symbol lookup error: ./executableName: undefined symbol: _ZN18QXmlDefaultHandlerC2Ev

余生长醉 提交于 2019-12-13 11:40:39
问题 I am trying to run an executable on Linux Mint 16 x64 that was compiled for Ubuntu 12 x64. The executable uses Qt 5.1.1 dynamically during runtime. I get the error: loaded the dummy plugin loaded the Linux plugin updating server status ./executableName: symbol lookup error: ./executableName: undefined symbol: _ZN18QXmlDefaultHandlerC2Ev When I run ldd executableName | grep "not found" searching for missing dependencies I get no result; all dynamic dependencies seem to be found, but the