glibc

replace a dynamic shared library in run time

匿名 (未验证) 提交于 2019-12-03 02:48:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I need to use different dynamic library over a execution cycle of a program. Looking at dlfcn.h I thought this was possible. I confess of not reading much literature on dynamic library loading. OK here is what I do - I have created shared library called `libdynamicTest.so.1` The main APP opens this solib ( dlopen ), gets the function pointer ( dlsym ), run it and then close it back ( dlclose ) Everything is fine until here. Now suppose I replace my libdynamicTest.so.1 by another libdynamicTest.so.1 (some code diff) I see a Segmentation fault

undefined reference to sync_fetch_and_add_4

匿名 (未验证) 提交于 2019-12-03 02:31:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Whenever I try to use __sync_fetch_and_add with -m32 on a 64 bit machine, I get the following error, while it compiles fine with normal 64 bit. I am using gcc compiler 4.1.2. What can be the problem here and what is the solution? replication.cpp:(.text+0xb3b): undefined reference to `__sync_fetch_and_add_4' replication.cpp:(.text+0xb82): undefined reference to `__sync_fetch_and_add_4' replication.cpp:(.text+0xcc2): undefined reference to `__sync_fetch_and_add_4' /tmp/cc7u9FLV.o: In function `potential_barrier_leader(unsigned int, pthread

Can I make valgrind ignore glibc libraries?

匿名 (未验证) 提交于 2019-12-03 02:24:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Is it possible to tell valgrind to ignore some set of libraries? Specifically glibc libraries.. Actual Problem: I have some code that runs fine in normal execution. No leaks etc. When I try to run it through valgrind, I get core dumps and program restarts/stops. Core usually points to glibc functions (usually fseek, mutex etc). I understand that there might be some issue with incompatible glibc / valgrind version. I tried various valgrind releases and glibc versions but no luck. Any suggestions? 回答1: This probably doesn't answer your

How to upgrade glibc from version 2.13 to 2.15 on Debian?

匿名 (未验证) 提交于 2019-12-03 02:15:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I heard I can do it using apt-get install libc6 , but I need to add something to /etc/apt/sources.list to receive the newest glibc version. What should I do? 回答1: I was able to install libc6 2.17 in Debian Wheezy by editing the recommendations in perror's answer : IMPORTANT You need to exit out of your display manager by pressing CTRL - ALT - F1 . Then you can stop x ( slim ) with sudo /etc/init.d/slim stop (replace slim with mdm or lightdm or whatever) Add the following line to the file /etc/apt/sources.list : deb http://ftp.debian.org

building a .so that is also an executable

匿名 (未验证) 提交于 2019-12-03 02:11:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: So everyone probably knows that glibc's /lib/libc.so.6 can be executed in the shell like a normal executable in which cases it prints its version information and exits. This is done via defining an entry point in the .so. For some cases it could be interesting to use this for other projects too. Unfortunately, the low-level entry point you can set by ld's -e option is a bit too low-level: the dynamic loader is not available so you cannot call any proper library functions. glibc for this reason implements the write() system call via a naked

gcc/ld - create a new libc.so with __isoc99_sscanf@@GLIBC_2.7 symbol from glibc.2.6

匿名 (未验证) 提交于 2019-12-03 02:06:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have an application, which does a error when I try to run it: /lib/libc.so.6: version `GLIBC_2.7' not found But the only symbol it needs from glibc 2.7 is __isoc99_sscanf@@GLIBC_2.7 I want to write a small single function "library" with this symbol as alias to __sscanf() How can I do this with gcc/ld? My variant is not accepted because "@@" symbols int __isoc99_sscanf@@GLIBC_2.7(const char *, const char *, ...) __attribute__((alias("__sscanf"))); second my variant is #include int __isoc99_sscanf1(const char *a, const char *b, va_list args)

How to compile glibc 32bit on an x86_64 machine

匿名 (未验证) 提交于 2019-12-03 02:00:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to compile glibc (as a secondary, not a system replacement) 2.6 on an x86_64, and trying to get it to produce 32-bit objects. When I give it a standard configure, it compiles fine, producing the usual 64-bit library objects. Some info: $ uname -a Linux localhost.localdomain 2.6.18-164.11.1.el5 #1 SMP Wed Jan 20 07:32:21 \ EST 2010 x86_64 x86_64 x86_64 GNU/Linux $ cat /etc/redhat-release CentOS release 5.4 (Final) Among other things, I've tried the following: Attempt 1: $ # [in build/glibc-2.6] $ ../../src/glibc-2.6/configure -

/usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.15' not found

匿名 (未验证) 提交于 2019-12-03 01:58:03
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: How can I get GLIBCXX_3.4.15 in Ubuntu? I can't run some programs that I'm compiling. When I do: strings /usr/lib/libstdc++.so.6 | grep GLIBC I get: GLIBCXX_3.4 GLIBCXX_3.4.1 GLIBCXX_3.4.2 GLIBCXX_3.4.3 GLIBCXX_3.4.4 GLIBCXX_3.4.5 GLIBCXX_3.4.6 GLIBCXX_3.4.7 GLIBCXX_3.4.8 GLIBCXX_3.4.9 GLIBCXX_3.4.10 GLIBCXX_3.4.11 GLIBCXX_3.4.12 GLIBCXX_3.4.13 GLIBCXX_3.4.14 GLIBC_2.2.5 GLIBC_2.3 GLIBC_2.4 GLIBC_2.3.4 GLIBC_2.3.2 GLIBCXX_FORCE_NEW GLIBCXX_DEBUG_MESSAGE_LENGTH Thanks for any help! 回答1: I'm compiling gcc 4.6 from source, and apparently sudo

What does 'corrupted double-linked list' mean

匿名 (未验证) 提交于 2019-12-03 01:47:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've recently gotten the following error from my PHP: WARNING: [pool www] child 42475 said into stderr: "*** glibc detected *** php-fpm: pool www: corrupted double-linked list: 0x00000000013fe680 ***" I'm not very bothered by this issue, and not very interested in fixing it. But I'm very interested in understanding what this error 'corrupted double-linked list' actually means, because I haven't seen it before. I believe to know what a double-linked list is, but I failed to produce a program that triggers this error. Could somebody provide me

Yocto Jethro: How to choose a Yocto Default Compiler? glibc failed at do_compile when use gcc 4.9

匿名 (未验证) 提交于 2019-12-03 01:46:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Because of old Das u-boot from HEAD branch that do not have gcc 5 yet, I am planning on using gcc 4.8 or 4.9 as a default compiler instead of 5.2. GCC required virtual/libc glibc-2.22. glibc-2.22 complied successfully with 5.2. Unfortunately, it failed at do_compile with the error: ld: cannot find -lgcc with gcc 4.8 and 4.9 arm-poky-linux-gnueabi-gcc -march=armv7-a -marm -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a9 --sysroot=/yocto/hio-jethro/build-hio/tmp/sysroots/hio-imx6dl-board-tcbootstrap -nostdlib -nostartfiles -r -o