Skip to content

Commit

Permalink
Add note on enabling RELRO for library dependencies
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Nyman <[email protected]>
  • Loading branch information
thomasnyman committed Oct 3, 2024
1 parent 29d86c7 commit 1ed0efb
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,10 @@ Applications that are sensitive to the performance impact on startup time should

Static linking avoids the need for dynamic symbol resolution altogether but can make it more difficult to deploy patches to dependencies compared to upgrading shared libraries. Developers need to consider whether static linking is discouraged in their deployment scenarios, e.g., major Linux distributions generally forbid static linking of shared application dependencies.

#### Additional considerations

To benefit from partial and full relro both the application executable and any libraries that are linked to the application must be built with the appropriate compiler options. If any non-RELRO libraries are loaded by `ld.so` they will prevent RELRO from being enabled for the applications.

---

### Build as position-independent code
Expand Down

0 comments on commit 1ed0efb

Please sign in to comment.