#1003626 binutils-doc: --as-needed default is wrongly documented

#1003626#5
Date:
2022-01-12 19:32:49 UTC
From:
To:
The Info and man pages for ld say "--no-as-needed restores the default
behaviour", but the default changed at some stage to --as-needed.

  $ cc -shared -lm -o x.so
  $ lddtree x.so
  x.so => ./x.so (interpreter => none)
  $ cc -shared -Wl,--no-as-needed -lm -o x.so
  $ lddtree x.so
  x.so => ./x.so (interpreter => none)
      libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6
          ld-linux-x86-64.so.2 => /lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
      libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6