diff --git a/usr.bin/ldd/ldd.c b/usr.bin/ldd/ldd.c index 00c8797..5f950c4 100644 --- a/usr.bin/ldd/ldd.c +++ b/usr.bin/ldd/ldd.c @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #ifdef COMPAT_32BIT #define LD_ "LD_32_" +#define LD_COMPAT_ "LD_" #else #define LD_ "LD_" #endif @@ -211,6 +212,13 @@ main(int argc, char *argv[]) /* ld.so magic */ setenv(LD_ "TRACE_LOADED_OBJECTS", "yes", 1); +#ifdef COMPAT_32BIT + /* + * Set this for the benefit of linkers that don't know we're in + * compat mode. + */ + setenv(LD_COMPAT_ "TRACE_LOADED_OBJECTS", "yes", 1); +#endif if (fmt1 != NULL) setenv(LD_ "TRACE_LOADED_OBJECTS_FMT1", fmt1, 1); if (fmt2 != NULL)