https://sourceware.org/bugzilla/show_bug.cgi?id=18859

Cary Coutant <ccoutant at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Cary Coutant <ccoutant at gmail dot com> ---
> Gold and ld behave differently when a shared library is first mentioned when
> -as-needed is in effect, and then again after -no-as-needed. Ld generates a
> DT_NEEDED entry for such library, and gold does not.

Why are you expecting a NEEDED entry for libutil? There's nothing in your main
program that depends on anything in that library, so by the definition of the
--as-needed option, gold is doing exactly what I would expect.

Your command line lists "-lutil" twice, once between the as-needed options, and
once after. Gold ignores any shared library listed on the command line that it
has already processed.

If you want the library in your DT_NEEDED list, remove the first copy from your
command line (the one between --as-needed and --no-as-needed).

-- 
You are receiving this mail because:
You are on the CC list for the bug.

_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to