This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Hidden PLT workaround


Hello,

?I need the functionality of the glibc configure build option
-disable-hidden-plt?(for example, to be able to override write under
printf ).

?Using that build option, the build crashes, and according to the bug
reports I saw, ?this option is not supported anymore. ( "Then don't
use the option.  This is why the Makefile rules are what they are." --
Ulrich Drepper ).

??I find this option very interesting and powerful, and wanted to find
a way to make some symbols overridable anyway.

?Since include/libc-symbols.h is included via command line, my first
attempt was to replace the "hidden" string by a macro, and then change
the value of the macro  in some parts of the source code.

For example, to "default" around the "write" hidden_proto macro in
unistd.h. That way the visibility of the internal "write" symbol is
changed from hidden to default.??This approach works well with uclibc
for example, and it makes it easy to build a library with overridable
symbols. But it does not work in glibc. I don't clearly understand
why. Is there another thing making calls to these symbols not go
through the PLT , such as an ?symbol export map, or something like
that ?

?Thanks!
?Boris Arnoux


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]