2009-08-06 8 views
1

Ich versuche, unsere gemeinsame Bibliothek zu profilieren, aber wenn ich die Umgebungsvariable LD_PROFILE gesetzt habe, bekomme ich "PLTREL nicht im Objekt gefunden". Was gibt? Gibt es eine Art Linker-Flag, das ich vermisse oder was? Über das Internet scheint es keine Informationen zu geben. Die Manpage für Sprof ist ungefähr 10 Wörter lang.sprof "PLTREL nicht gefunden Fehler"

Antwort

1

Nach an unanswered question on Google Groups sieht es so aus, als ob Sie nicht die erste Person mit diesem Problem sind.

Ich denke, dass pltrel bedeutet plt-rel ative; in einigen 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.

Und here ‚s noch ein wenig mehr:

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.

ich Klingt wie ein Problem gibt es mit, wie die gemeinsame Bibliothek kompiliert wurde oder zusammengesetzt. Hoffentlich bringt dich ein paar mehr searches to elf PLT section auf die richtige Spur.

0

gefunden this, die für Sie relevante werden können:

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

Es scheint, das gleiche gilt für LD_PROFILE