[prev in list] [next in list] [prev in thread] [next in thread] 

List:       binutils
Subject:    Re: ld: document static libraries when performing static linking
From:       Nick Clifton <nickc () redhat ! com>
Date:       2024-02-29 10:58:07
Message-ID: 424133c3-3682-49f6-ad07-c7d1a95dea63 () redhat ! com
[Download RAW message or body]

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic