Date: Sat, 1 Dec 2001 00:24:52 -0800 (PST) From: Lamont Granquist <lamont@scriptkiddie.org> To: <freebsd-hackers@FreeBSD.ORG> Subject: another global LD_PRELOAD patch for rtld-elf Message-ID: <20011201001248.J72815-200000@coredump.scriptkiddie.org> In-Reply-To: <20011130102928.E30981@iguana.aciri.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. --0-858320923-1007195092=:72815 Content-Type: TEXT/PLAIN; charset=US-ASCII this adds a -p option to ldconfig so you can do something like: ldconfig -p /usr/local/lib/libsafe.so to set a preload, and: ldconfig -pm /usr/local/lib/libsafe.so to merge one. the major problem i know of with this patch is that setting a preload ELF library will hose your ability to run linux binaries. also, you probably need to: cp /usr/src/include/elf-hints.h /usr/include/elf-hints.h initially in order to build (is this indicative of larger build issues involved with installed include files being selected before the one in the source tree?) --0-858320923-1007195092=:72815 Content-Type: TEXT/PLAIN; charset=US-ASCII; name=rtld-elf-patch-2 Content-Transfer-Encoding: BASE64 Content-ID: <20011201002452.F72815@coredump.scriptkiddie.org> Content-Description: Content-Disposition: attachment; filename=rtld-elf-patch-2 LS0tIGluY2x1ZGUvZWxmLWhpbnRzLmh+CUZyaSBOb3YgMzAgMjM6MTA6MTIg MjAwMQ0KKysrIGluY2x1ZGUvZWxmLWhpbnRzLmgJRnJpIE5vdiAzMCAyMzox MToxNSAyMDAxDQpAQCAtNDAsNyArNDAsMTAgQEANCiAJdV9pbnQzMl90CWRp cmxpc3Q7CS8qIE9mZnNldCBvZiBkaXJlY3RvcnkgbGlzdCBpbg0KIAkJCQkJ ICAgc3RyaW5nIHRhYmxlICovDQogCXVfaW50MzJfdAlkaXJsaXN0bGVuOwkv KiBzdHJsZW4oZGlybGlzdCkgKi8NCi0JdV9pbnQzMl90CXNwYXJlWzI2XTsJ LyogUm9vbSBmb3IgZXhwYW5zaW9uICovDQorCXVfaW50MzJfd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cCBGbCBmIEFyIGhpbnRzX2ZpbGUNCiAuT3AgQXIgZGly ZWN0b3J5IHwgQXINCiAuU2ggREVTQ1JJUFRJT04NCkBAIC0xMjgsNiArMTI4 LDggQEANCiBmb3Igc2hhcmVkIGxpYnJhcmllcy4NCiAuSXQgRmwgdg0KIFN3 aXRjaCBvbiB2ZXJib3NlIG1vZGUuDQorLkl0IEZsIHANCitUaGUgYXJndW1l bnRzIGFyZSB0YWtlbiB0byBiZSBsaWJyYXJpZXMgdG8gZ2xvYmFsbHkgcHJl bG9hZC4NCiAuRWwNCiAuU2ggU2VjdXJpdHkNCiBTcGVjaWFsIGNhcmUgbXVz dCBiZSB0YWtlbiB3aGVuIGxvYWRpbmcgc2hhcmVkIGxpYnJhcmllcyBpbnRv IHRoZSBhZGRyZXNzDQo= --0-858320923-1007195092=:72815-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011201001248.J72815-200000>