Skip to content

Commit

Permalink
Move linker wrapper to dedicated file.
Browse files Browse the repository at this point in the history
  • Loading branch information
yugr committed Apr 7, 2024
1 parent b4c8ef2 commit 53f7393
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ on:
push:
paths-ignore:
- 'LICENSE.txt'
- 'README.md'
- '**.md'
pull_request:
paths-ignore:
- 'LICENSE.txt'
- 'README.md'
- '**.md'
jobs:
Baseline:
strategy:
Expand Down
18 changes: 1 addition & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,23 +120,6 @@ By default the tool does not try to wrap vtables exported from the library. This
$ implib-gen.py --vtables ...
```

# Linker wrapper

Generation of wrappers may be automated via linker wrapper `scripts/ld`.
Adding it to `PATH` (in front of normal `ld`) would by default result
in all dynamic libs (besides system ones) to be replaced with wrappers.
Explicit list of libraries can be specified by exporting
`IMPLIBSO_LD_OPTIONS` environment variable:
```
export IMPLIBSO_LD_OPTIONS='--wrap-libs attr,acl'
```
For more details run with
```
export IMPLIBSO_LD_OPTIONS=--help
```

Atm linker wrapper is only meant for testing.

# Overhead

Implib.so overhead on a fast path boils down to
Expand Down Expand Up @@ -164,6 +147,7 @@ The tool also lacks the following important features:
* proper support for multi-threading
* symbol versions are not handled at all
* keep fast paths of shims together to reduce I$ pressure
* support for macOS and BSDs

Finally, there are some minor TODOs in code.

Expand Down
14 changes: 14 additions & 0 deletions doc/LinkerWrapper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Generation of wrappers may be automated via linker wrapper `scripts/ld`.
Adding it to `PATH` (in front of normal `ld`) would by default result
in all dynamic libs (besides system ones) to be replaced with wrappers.
Explicit list of libraries can be specified by exporting
`IMPLIBSO_LD_OPTIONS` environment variable:
```
export IMPLIBSO_LD_OPTIONS='--wrap-libs attr,acl'
```
For more details run with
```
export IMPLIBSO_LD_OPTIONS=--help
```

Atm linker wrapper is only meant for testing.

0 comments on commit 53f7393

Please sign in to comment.