dynamic-linking

Download and execute iOS code dynamically at runtime

独自空忆成欢 提交于 2019-12-05 01:19:07
问题 As an academic and mental exercise, how would one download a precompiled binary file and execute methods in it on an iOS device? I understand this violates Apple's License Agreement, section 3.2.2, but I am asking for personal projects and to learn more about the iOS runtime. Goal Download http://someexample.com/MyCoolBinary.a Save downloaded binary to device disk. Call a known method that exists in the binary. What I've tried I haven't attempted anything concrete, but I would imagine that it

Lua: C++ modules can't reference eachother, undefined symbol

…衆ロ難τιáo~ 提交于 2019-12-04 23:22:01
问题 I've created two modules (shared objects) CPU and SaveState as part of an emulator. Both are independently compiled into .so separate files, and loaded at runtime by a Lua script using require(); i.e.: SaveState = require("SaveState") CPU = require("CPU") Within CPU, there's a method that operates on a SaveState: int CPU::save_state(SaveState *state) { state->begin_section(savestate_namespace, savestate_data_size); state->write16(this->reg.af); state->write16(this->reg.bc); state->write16

How do I display randomly-chosen text with an associated image?

浪子不回头ぞ 提交于 2019-12-04 21:09:06
I'm a beginner web designer and I need to know how can I link one thing to another. The thing is that I'm making different quotes change every time the site refreshes. And I need to do the same thing with images that are located in a different div tag. The reason I need to link them is because the image needs to coordinate with the quote. For example: quote 0 with image 0. Here is the javascript code: var quotes=new Array(); quotes[0] = "text1"; quotes[1] = "Text2"; quotes[2] = "text3"; quotes[3] = "text4"; var q = quotes.length; var whichquote=Math.round(Math.random()*(q-1)); function

Statically and dynamically linking the same library

限于喜欢 提交于 2019-12-04 19:42:36
I have a program that's statically linking to a library ( libA.2.0.a ) and also dynamically links to another library ( libB.so ). libB.so also dynamically links to an older version of libA ( libA.1.0.so ). Is this configuration possible? And if so, how does the system know to use the symbols from libA.2.0.a for my program and the symbols from libA.1.0.so for libB.so ? Yes, this configuration is possible. In answer to your question as to how the system knows how to use the symbols, remember that all of the links happen at build time. After it's been built, it isn't a question of "symbols", just

linux cross compiling and dynamic libraries / linking

瘦欲@ 提交于 2019-12-04 12:32:38
i'm trying to develop for the BeagleBoard. Therefore i installed the CodeSourcery Sourcery_G++_Lite Toolchain. I want to use the opencv library. So I downloaded the sources to my Ubuntu devolepment system, compiled with gcc as shared library and installed the library. When i build a helloworld-application for the x86-Architecture, everything is fine. Now, i want to compile the same application with the other toolchain for the ARM-Architecture. I get these warnings/erros while compiling/linking: john@ubuntu:~/Downloads/BeagleTest$ arm-none-linux-gnueabi-g++ -c ImageProcessing.cpp -o

Symbol Resolution and Dynamic Linking

↘锁芯ラ 提交于 2019-12-04 10:30:47
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’s responsibility to receive control from the system and provide an environment for the application

dlopen a dynamic library from a static library, when the dynamic library uses symbols of the static one

北慕城南 提交于 2019-12-04 09:56:58
This question is closely related to dlopen a dynamic library from a static library linux C++ , but contains a further complication (and uses C++ instead of C): I have an application that links against a static library (.a) and that library uses the dlopen function to load dynamic libraries (.so). In addition, the dynamic libraries call functions defined in the static one. Is there a way to compile this without linking the dynamic libraries against the static one or vice versa? Here comes what I tried so far, slightly modifying the example from the related question: app.cpp: #include "staticlib

jQueryUI tabs - deeplinking into tab content

时光怂恿深爱的人放手 提交于 2019-12-04 09:45:25
问题 I am not sure if this is possible at the moment, and the testing ive done seems to offer odd results. I have on one page a section of 4 tabs, inside these tabs are several sections of text that i have each given a unique anchor name. What i am trying to do is link from another page to say the 4th block of content in tab 3... the tabs are all working great, and if i link to content sections on the first tab it works great.. its when i want to link to the tabs that arent the first that it gets

Why is my Linux application pulling in the wrong .so library?

亡梦爱人 提交于 2019-12-04 08:28:59
I have an application I'm building that's using the NetCDF C++ library, and NetCDF is pulling in the HDF-4 libary. However, it's pulling in the wrong HDF-4 library. Here's how my app is linked: /apps1/intel/bin/icpc -gxx-name=/apps1/gcc-4.5.0/bin/g++ -shared -o lib/libMyCustom.so -Llib -L/apps1/boost-1.48.0/lib -Wl,-rpath=/apps1/boost-1.48.0/lib -L/apps1/gdal-1.8.0-jasper/lib -Wl,-rpath=/apps1/gdal-1.8.0-jasper/lib -L/new_apps1/hdf4/lib -Wl,-rpath=/new_apps1/hdf4/lib -L/new_apps1/netcdf/lib -Wl,-rpath=/new_apps1/netcdf/lib -lboost_system -lboost_serialization -lboost_date_time -lboost_thread

how do I remove `GLIBC_2.27' requirement at compile time?

我的梦境 提交于 2019-12-04 03:35:18
问题 I've been using a docker image for c++ compilation. It's based on Ubuntu 18.04. When I attempt to run on some Ubuntu 16 systems, I get this message: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.27' not found I'll post the full ldd output below. I like using the newer compiler. I would prefer to not compile with an older Linux base image (but I will if necessary). I statically link most libraries, but I haven't been statically linking glibc. A number of web sources recommend against that.