public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Nick Clifton <nickc@redhat.com>
To: Christian Tramnitz <christian+gcc-gnu@tramnitz.com>,
	binutils@sourceware.org
Subject: Re: ld: document static libraries when performing static linking
Date: Thu, 29 Feb 2024 10:58:07 +0000	[thread overview]
Message-ID: <424133c3-3682-49f6-ad07-c7d1a95dea63@redhat.com> (raw)
In-Reply-To: <CADddEsDSmF7kaHXL-XKzjUcJNCaEKb1xckZ1w2v0D2Z3iL-+fA@mail.gmail.com>

Hi Christian,

> -Map does indeed provide the required information - thanks a lot for
> the hint, that is already much better than parsing through verbose
> build logs or the dependency-file.
> However, like --depedency-file, it has one major drawback: when
> multiple targets exist, the "last" action overwrites the output file.
> I haven't seen an option to use a dynamic file names (foo-$$.map
> doesn't seem to work).

Ah - but directory names do. :-)

Check out the linker manual's description of the -Map option.  In
particular:

   Specifying a directory as <mapfile> causes the linker map to be
   written as a file inside the directory.  Normally name of the file
   inside the directory is computed as the basename of the <output>
   file with .map appended.   If however the special character
   % is used then this will be replaced by the full path of the
   output file.  Additionally if there are any characters after the
   % symbol then .map will no longer be appended.

Cheers
   Nick


      reply	other threads:[~2024-02-29 10:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CADddEsCm7OpQ51GE+hfix2OntdnGmcWTppK8-g_2O175qS5VjA@mail.gmail.com>
2024-02-21 18:01 ` Christian Tramnitz
2024-02-21 20:55   ` Howard Chu
2024-02-22  3:49     ` Howard Chu
2024-02-28 14:02   ` Nick Clifton
2024-02-28 23:50     ` Christian Tramnitz
2024-02-29 10:58       ` Nick Clifton [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=424133c3-3682-49f6-ad07-c7d1a95dea63@redhat.com \
    --to=nickc@redhat.com \
    --cc=binutils@sourceware.org \
    --cc=christian+gcc-gnu@tramnitz.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).