Skip to content

-Wl,--no-copy-dt-needed-entries is not universally understood! Depends on the BFD linker. #923

Open
@exoosh

Description

@exoosh

docs/Compiler-Hardening-Guides/Compiler-Options-Hardening-Guide-for-C-and-C++.md should contain a warning in the section "TL;DR: What compiler options should I use?":

**NB:** `-Wl,--no-copy-dt-needed-entries` is not understood by `lld`, so if you use `-fuse-ld=lld` this flag needs to be dropped.

In fact I don't know which other linkers support this linker switch besides the BFD linker. But since the section starts out with:

[...] on compilers such as GCC and clang

it would make sense to point it out.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions