2009-08-06 52 views
1

我试图描述我们的共享库,但每当我有环境变量LD_PROFILE设置,我就会收到“在对象中找不到PLTREL”。是什么赋予了?是否有某种链接器标志我失踪或什么?在互联网上似乎没有关于这方面的信息。 sprof的手册页长约10个字。sprof“PLTREL未找到错误”

回答

1

根据an unanswered question on Google Groups,看起来你并不是第一个有这个问题的人。

我认为pltrel的意思是plt-rel ative;在一些ELF design notes

There is a .plt section created in the code segment, which is an array of function stubs used to handle the run-time resolution of library calls.

而且here的还多一点:

The next section I want to mention is the .plt section. This contains the jump table that is used when we call functions in the shared library. By default the .plt entries are all initialized by the linker not to point to the correct target functions, but instead to point to the dynamic loader itself. Thus, the first time you call any given function, the dynamic loader looks up the function and fixes the target of the .plt so that the next time this .plt slot is used we call the correct function. After making this change, the dynamic loader calls the function itself.

听起来好像有一个与共享库是如何被编译或组装的问题。希望更多的searches to elf PLT section让你走上正轨。

0

发现this可以relevante你:

Known issues with LD_AUDIT

➢ LD_AUDIT does not work with Shared Libraries with no code in them.

➢ Example ICU-4.0 “libicudata.so”

➢ Error: “no PLTREL found in object /usr/lib/libicudata.so.40”

➢ Recompile after patching libicudata by sed'ing -nostdlib etc away sed -i -- "s/-nodefaultlibs -nostdlib//" config/mh-linux

似乎同样适用于LD_PROFILE