Extend ld's -Map=<dir> functionality by allowing '%' to be replaced with the output...
authorNick Clifton <nickc@redhat.com>
Fri, 6 Nov 2020 14:36:45 +0000 (14:36 +0000)
committerNick Clifton <nickc@redhat.com>
Fri, 6 Nov 2020 14:36:45 +0000 (14:36 +0000)
commit2c72361c810f4b6223949363f635376e4311ac7a
tree12e8ff66e98cb6867f5c3d687ea84f53d0d83b15
parent9c905051aaa48bd07f243c1ed502fc88dbf1f3bb
Extend ld's -Map=<dir> functionality by allowing '%' to be replaced with the output file path.

* lexsup.c (parse_args): Add more checks of the mapfile.  If it is
a directory use the basename of the output file as the file
component.  If the % character is present, replace it with the
full output filepath.
* testsuite/ld-scripts/map-address.exp: Add test of %
functionality.
* ld.texi: Document the new behaviour.
ld/ChangeLog
ld/ld.texi
ld/lexsup.c
ld/testsuite/ld-scripts/map-address.exp