Reputation: 9
So, I am trying to get gnatmake to give me a map file for a dll I am building.
But it i resisting every effort to do so. --create-map-file is only for executable, and it does make one for that, but I cannot get it to take for a .dll.
I have tried -M --print-map -M save.map but I am not getting anything to come out.
Thoughts?
Upvotes: -1
Views: 145
Reputation: 5941
You could try to build the DLL using gnatdll
. Here's a (very simplistic) example (without initialization/finalizing code):
Makefile
all:
gnatmake -v demo.adb
gnatdll -v -d demo.dll .\demo.ali -largs -Wl,-Map,demo.map
demo.ads
package Demo is
function Add (X, Y : Integer) return Integer
with Export, Convention => C;
end Demo;
demo.adb
package body Demo is
---------
-- Add --
---------
function Add (X, Y : Integer) return Integer is
begin
return X + Y;
end Add;
end Demo;
demo.def
LIBRARY LIBDEMO
EXPORTS
add
output (directory contents after build)
demo.adb
demo.ads
demo.ali
demo.def
demo.dll
demo.map <<<<<< A .map file
demo.o
libdemo.dll.a
Makefile
Upvotes: 2