DT_FILTER problem

Ulrich Drepper drepper@redhat.com
Fri Jul 21 00:07:00 GMT 2000


When using the -F/--filter option of ld the appropriate DT_FILTER
entry is created, but there is also a DT_NEEDED entry for the same
object.  This is wrong.  The following is the output of readelf on one
of my test programs:


 0x00000001 (NEEDED)                     Shared library: [/work/glibc-builds/200
00720/elf/filtmod2.so]
 0x7fffffff (FILTER)                     Filter library: [/work/glibc-builds/200
00720/elf/filtmod2.so]


Since the filter object itself is never used (only at link time by ld)
it makes no sense to add a DT_NEEDED entry.  It might even cause
problems if the ld.so adds the object twice (because of the two
references).

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------


More information about the Binutils mailing list