Comments (3)
Alas, neither Ubuntu 12 or Ubuntu 14 can build wcc anymore.
from wcc.
Hi @dakami,
I suspect the second bug comes from the fact that python and /bin/ls have the same load base address, hence a load conflict. We could verify this assumption by attempting to give a non standard base address to the python interpreter, like done with wsh. The linker script is located here : https://github.com/endrazine/wcc/blob/master/src/wsh/script.lds
OSError: ls.so: undefined symbol: fgetfilecon
This is a different matter : the function fgetfilecon() isn't found by the dynamic linker when loading the library. Loading the corresponding library before loading ls.so should do the trick. Alternatively, you could try to tell gcc where to find this library when linking ls.so, so the import section of the resulting library contains a reference to the said shared library and the dynamic linker knows it needs to load it in memory when loading ls.so in the address space.
Note that you don't actually need to libify the library before loading it into wsh anymore, simply starting wsh with "wsh /bin/ls" should load the library entirely.
from wcc.
Hi Dan,
You don't need to use wcc before libifying using wld. See below:
jonathan@blackbox:/tmp/dan$ cp /bin/ls ./ls.so
jonathan@blackbox:/tmp/dan$ wld -libify ./ls.so
jonathan@blackbox:/tmp/dan$ file ls.so
ls.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/l, for GNU/Linux 3.2.0, BuildID[sha1]=9567f9a28e66f4d7ec4baf31cfbf68d0410f0ae6, stripped
jonathan@blackbox:/tmp/dan$ python
Python 2.7.15rc1 (default, Nov 12 2018, 14:31:15)
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
from ctypes import *
cdll.LoadLibrary("./ls.so")
<CDLL './ls.so', handle 559cd0aaa9d0 at 7fb3554c7190>
It works \o/
from wcc.
Related Issues (20)
- wsh/scripts/INDEX requires file `hashing` but this is missing HOT 1
- Segmentation fault upon running wsh HOT 26
- Segfault attempting to run wcc on libvivoxsdk.so HOT 1
- lua submodule ref missing HOT 3
- Support for MachO HOT 6
- Not an issue but a thank you... HOT 1
- cool! HOT 1
- Autotools support
- Undefined symbols when running 'wsh'. HOT 2
- wsh: invalid lua syntax from mangled symbols HOT 4
- ARM Compilation broken HOT 1
- Build problems; suggestions for the Readme HOT 3
- Linking troubles when building HOT 8
- Demangled symbols aren't displayed/made accessible HOT 1
- README.md: Dead links HOT 1
- conditional return in void function causes wcc to expect the function to end HOT 4
- wsh segfaulting on startup HOT 2
- Example usage of WSH under QEMU user-space emulation? HOT 8
- Ubuntu build issue HOT 1
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 wcc.