shared-libraries

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

Can I use a shared library compiled on Ubuntu on a Redhat Linux machine?

扶醉桌前 提交于 2020-01-04 04:06:07
问题 I have compiled a shared library on my Ubuntu 9.10 desktop. I want to send the shared lib to a co-developer who has a Red Hat Enterprise 5 box. Can he use my shared lib on his machine? 回答1: First point: all of the answers regarding compiler version seem misguided. What's important are the linkages (and the architecture, of course). If you copy the .so file over to the start system (into its own /usr/local/* or /opt/* directory, for example) then try to run the intended executable using an LD

Including foreign shared library when running a binary with qemu

瘦欲@ 提交于 2020-01-04 03:55:06
问题 I have a foreign ARM binary I need to run with Qemu. It relies on an ncurses shared library, libncurses.so.5 . I've tried running qemu-arm -L /usr/arm-linux-gnueabihf/ ./program Which complains that it can't find libncurses.so.5 . I have the correct ncurses shared lib and added it to /usr/arm-linux-gnueabihf/lib/ . The filename is libncurses.so.5 and I have it symlinked to libncurses.so as well but running the program still fails. program: error while loading shared libraries: libncurses.so.5

Can I create 'shared library' in Jenkins Pipeline in other language than Groovy?

孤人 提交于 2020-01-04 00:39:06
问题 I have python script which does a REST command and processes the result. I want this script to be used by different Jenkins Pipelines, one way I found through Jenkins official documentation is to use 'Shared library' and that examples(also others example which I found online) they use the Groovy. My question is, is it possible to create a shared lib in other language than Groovy? For ex. python? 回答1: Short answer is no. All Jenkins Pipeline execution (right now) is specialized Groovy that is

program exits without error when linking boost library

二次信任 提交于 2020-01-03 19:08:14
问题 I have a problem with linking boost library into my cross-compiled c++ program. The code I write is cross-compiled with CodeSourcery under Ubuntu 12.04 for an arm-target (Pandaboard, also Ubuntu 12.04). Compiling simple test-programs without library works fine, even OpenCV with static libraries works fine. But here is the problem when linking boost 1.52.0 libraries: When crosscompiled WITH linking boost libraries (-lboost_thread -lboost_system) the program compiles without errors, but when

Share a LotusScript library between databases

不想你离开。 提交于 2020-01-03 18:39:01
问题 Is it possible to create a LotusScript library in one database and then access it from another database? Without simply copying the library into each database that needs to use it. What I would like to achieve is a single location where I can update the library and not have to manually copy it over to each database that is using it. I can't use a design template as the databases that use this script library all use different design templates. I guess another solution would be to create an

Share a LotusScript library between databases

好久不见. 提交于 2020-01-03 18:38:08
问题 Is it possible to create a LotusScript library in one database and then access it from another database? Without simply copying the library into each database that needs to use it. What I would like to achieve is a single location where I can update the library and not have to manually copy it over to each database that is using it. I can't use a design template as the databases that use this script library all use different design templates. I guess another solution would be to create an

How can I debug runtime library interpositioned process?

吃可爱长大的小学妹 提交于 2020-01-03 05:18:34
问题 I'm now studying library interpositioning with C in Ubuntu 18.04, and I'm testing two simple codes to wrap strlen : "mystrlen.c", "mystrlenTest.c". Here is the code I wrote: mystrlen.c #ifdef RUNTIME #define _GNU_SOURCE #include <stdio.h> #include <string.h> #include <dlfcn.h> /* strlen wrapper function */ size_t strlen(const char *str) { size_t (*strlenp)(const char *) = NULL; printf("%s\n", *str); strlenp = dlsym(RTLD_NEXT, "strlen"); // Get address of libc strlen printf("length: %ld\n",

/usr/bin/ld: cannot find shared library

拜拜、爱过 提交于 2020-01-03 04:50:10
问题 I am having libcommon.so in the /usr/local/lib and I am linking this library in my program. gcc -o test test_prog.c -L/usr/local/lib -llibcommon.so and I have tried this too gcc -o test test_prog.c -L/usr/local/lib -llibcommon It's giving /usr/bin/ld: cannot find -llibcommon.so collect2: ld returned 1 exit status It is there: $ locate libcommon.so /usr/local/lib/libcommon.so /usr/local/lib/libcommon.so.0 /usr/local/lib/libcommon.so.0.1.0 $ 回答1: When you use the -l , you specify just the

Can't add dependency to Android Project

自古美人都是妖i 提交于 2020-01-03 03:15:08
问题 I'm trying to add 'commons-validator' to my android project in Android Studio based on gradle. I use UrlValidator for my needs. So I add a dependency in build.gradle of an app module: dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:23.0.1' compile 'commons-validator:commons-validator:1.4.1' // this one } And uses-library to the AndroidManifest in application tag: <uses-library android:name="org.apache.commons.validator.routines