Skip to main content

Link order randomizing linker wrapper

Project description

https://readthedocs.org/projects/ldrand/badge/?version=latest&style=plain

A basic linker wrapper that randomizes the link order. This can be used for compiling benchmarked programs to reduce the impact of specific link orders on the benchmarking results.

Not all linking orders might work, due to dependencies, therefore ldrand currently tries a new linking order until it succeeds (or the maximum number of tries is reached which is current set to 10 but can be configured via the environment variable LDRAND_TRIES).

Installation

pip3 install ldrand

Usage

Calling the ldrandp command returns the path of the bin folder that contains the script that masks the ld tool. Setting the wrapped linker explicitly is supported by setting the environment variable LDRAND_LINKER.

A typical usage would look like:

PATH="`ldrandp`:$PATH" make

# Or with an explicit linker
PATH="`ldrandp`:$PATH" LDRAND_LINKER="/usr/bin/custom_linker/ld" make

Contributing

Bug reports and Code contributions are highly appreciated.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ldrand-0.42.tar.gz (3.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page