Comments (8)
You need the libc and libstdc++ debug packages. On your system, it should be libc6-dbg and libstdc++6-7-dbg. Please try installing those and doing a clean rebuild.
from egalito.
I have those libraries.
root@b1a068da59c6:
/egalito# apt install libc6-dbg libstdc++6-7-dbg/egalito# make clean
Reading package lists... Done
Building dependency tree
Reading state information... Done
libstdc++6-7-dbg is already the newest version (7.5.0-6ubuntu2).
libc6-dbg is already the newest version (2.31-0ubuntu9.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@b1a068da59c6:
make -C app clean
make[1]: Entering directory '/root/egalito/app'
rm -rf build_x86_64/ .symlinks etshell etshell2 pyshell etobjdump etsandbox libsandbox.so etcoverage libcoverage.so etharden libcet.so etelf etprofile ettwocode etorder
make[1]: Leaving directory '/root/egalito/app'
make -C src clean
make[1]: Entering directory '/root/egalito/src'
rm -rf build_x86_64/ .symlinks loader libegalito.a libegalito.so libaddon.so ex example symbols.elf
make[1]: Leaving directory '/root/egalito/src'
make -C test clean
make[1]: Entering directory '/root/egalito/test'
make[1]: *** No rule to make target 'clean'. Stop.
make[1]: Leaving directory '/root/egalito/test'
make: *** [Makefile:38: clean] Error 2
root@b1a068da59c6:~/egalito# make
make -C dep
make[1]: Entering directory '/root/egalito/dep'
make -C rtld
make[2]: Entering directory '/root/egalito/dep/rtld'
gdb -n -q -x reconstruct.py -x rtld.gdb /usr/lib/x86_64-linux-gnu/ld-2.31.so | grep -v 'done.' | grep -v 'Reading symbols'
| sed 's/struct rtld/struct my_rtld/' > build_x86_64/rtld.h
Python Exception <class 'gdb.error'> No struct type named rtld_global.:
rtld.gdb:2: Error in sourced command file:
Error occurred in Python: No struct type named rtld_global.
from egalito.
It looks like Ubuntu 20.04 has moved away from .build-id references for debug files, and starting to use full paths (like Fedora). Egalito handles both but Ubuntu's GDB doesn't seem to be configured that way. I added a hack to the ubuntu20.04 branch to work around this until GDB can find symbol files properly.
https://github.com/columbia/egalito/tree/ubuntu20.04
from egalito.
Thank You! did make some progress. But, could not build it.
Here is the error.
make -C config
make[1]: Entering directory '/home/basavesh/egalito/config'
make[1]: Leaving directory '/home/basavesh/egalito/config'
make -C src
make[1]: Entering directory '/home/basavesh/egalito/src'
CXX transform/data.cpp
In file included from transform/data.cpp:8:
./../dep/rtld/pthread.h:1:63: error: too many decimal points in number
1 | (No debugging symbols found in /usr/lib/x86_64-linux-gnu/libc-2.31.so)
| ^~~~~~~
./../dep/rtld/pthread.h:1:4: error: expected ‘)’ before ‘debugging’
1 | (No debugging symbols found in /usr/lib/x86_64-linux-gnu/libc-2.31.so)
| ~ ^~~~~~~~~~
| )
transform/data.cpp: In member function ‘address_t DataLoader::allocateTLS(address_t, size_t, size_t*)’:
transform/data.cpp:33:37: error: invalid application of ‘sizeof’ to incomplete type ‘DataLoader::allocateTLS(address_t, size_t, size_t*)::my_pthread’
33 | size += sizeof(struct my_pthread);
| ^
make[1]: *** [../env.mk:180: build_x86_64/transform/data.o] Error 1
make[1]: Leaving directory '/home/basavesh/egalito/src'
make: *** [Makefile:21: src] Error 2
from egalito.
It's doing code generation. Look at generate1.cpp for example. Every time it can't find a debug package gdb will print an error message and that ends up in the code instead. Try adding
add-symbol-file /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.31.so
to dep/rtld/symbols.gdb. You can also test with
gdb /lib/x86_64-linux-gnu/libc-2.31.so
gdb /lib/x86_64-linux-gnu/ld-2.28.so
Basically, those two have to find symbols.
from egalito.
I'm still having issues with Ubuntu 20.04. However, I'm able to compile it fine in Ubuntu 18.04. Thank you!
Error in Ubuntu 20.04
transform/data.cpp:8:14: fatal error: ../dep/rtld/pthread.h: No such file or directory
8 | #include "../dep/rtld/pthread.h"
| ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [../env.mk:180: build_x86_64/transform/data.o] Error 1
make[1]: Leaving directory '/root/egalito/src'
make: *** [Makefile:21: src] Error 2
from egalito.
The "dep/rtld" doesn't do make clean very well unless you explicitly go to that directory. To avoid problems, you can clone again from scratch. Glad 18.04 worked.
from egalito.
On Ubuntu 21.04:
diff --git a/dep/rtld/symbols.gdb b/dep/rtld/symbols.gdb
index 8ab65314..6582030a 100644
--- a/dep/rtld/symbols.gdb
+++ b/dep/rtld/symbols.gdb
@@ -1 +1 @@
-symbol-file /usr/lib/debug/lib/x86_64-linux-gnu/ld-2.31.so
+symbol-file /usr/lib/debug/lib/x86_64-linux-gnu/ld-2.33.so
from egalito.
Related Issues (17)
- Segfault in FallthroughFunctionPass HOT 12
- OffsetLink doesn't appear to work
- Assembly manipulation and generation
- Cross-platform analysis HOT 1
- Removing basic blocks / Removing instructions HOT 3
- Slack Channel HOT 1
- The argument useLoggingEnvVar not really used in EgalitoInterface::EgalitoInterface(bool verboseLogging, bool useLoggingEnvVar)
- egalito docker image HOT 7
- Unable to recompile aarch64 binaries HOT 3
- etelf mirror elf generation (1-1 output) failed to update function address in _start HOT 1
- Egalito UseDef analysis doesn't capture all writes to memory?
- [Question] How to remove symbols from symbol tables HOT 3
- SegFault with test library after `nop` etharden
- [Question or Issue] HOT 2
- Installation struggles HOT 4
- Fail on test suite and etshell
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from egalito.