mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-21 16:32:25 +01:00
Suppress duplicate entries in ldd output.
This commit is contained in:
parent
93df8d681b
commit
63fac2b9ef
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=38740
@ -22,7 +22,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: rtld.c,v 1.4 1998/09/02 01:09:34 jdp Exp $
|
||||
* $Id: rtld.c,v 1.5 1998/09/02 02:00:20 jdp Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -1388,17 +1388,16 @@ trace_loaded_objects(Obj_Entry *obj)
|
||||
bool is_lib;
|
||||
|
||||
for (needed = obj->needed; needed; needed = needed->next) {
|
||||
name = (char *)obj->strtab + needed->name;
|
||||
if (!strncmp(name, "lib", 3)) {
|
||||
is_lib = true; /* XXX bogus */
|
||||
} else {
|
||||
is_lib = false;
|
||||
}
|
||||
|
||||
if (needed->obj == NULL)
|
||||
path = "not found";
|
||||
else
|
||||
if (needed->obj != NULL) {
|
||||
if (needed->obj->traced)
|
||||
continue;
|
||||
needed->obj->traced = true;
|
||||
path = needed->obj->path;
|
||||
} else
|
||||
path = "not found";
|
||||
|
||||
name = (char *)obj->strtab + needed->name;
|
||||
is_lib = strncmp(name, "lib", 3) == 0; /* XXX - bogus */
|
||||
|
||||
fmt = is_lib ? fmt1 : fmt2;
|
||||
while ((c = *fmt++) != '\0') {
|
||||
|
@ -22,7 +22,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: rtld.h,v 1.2 1998/04/30 07:48:02 dfr Exp $
|
||||
* $Id: rtld.h,v 1.3 1998/08/21 03:29:40 jb Exp $
|
||||
*/
|
||||
|
||||
#ifndef RTLD_H /* { */
|
||||
@ -109,6 +109,7 @@ typedef struct Struct_Obj_Entry {
|
||||
bool rtld; /* True if this is the dynamic linker */
|
||||
bool textrel; /* True if there are relocations to text seg */
|
||||
bool symbolic; /* True if generated with "-Bsymbolic" */
|
||||
bool traced; /* Already printed in ldd trace output */
|
||||
|
||||
struct link_map linkmap; /* for GDB */
|
||||
} Obj_Entry;
|
||||
|
Loading…
Reference in New Issue
Block a user